Skip to content

onerobotband/bpy

 
 

Repository files navigation

Contents:

addons for blender 2.80

addons for blender 2.7x



addons for blender 2.80



Point Cloud Visualizer (for blender 2.80)

Display colored point cloud PLY in Blender's 3d viewport. Works with binary point cloud PLY files with 'x, y, z, red, green, blue' vertex values. All other values are ignored. Color values must be in 0-255 range.

Point Cloud Visualizer

Point Cloud Visualizer

General info

  • Usage: Install and activate addon in a usual way. Add any object to scene. Go to 3d View Sidebar (N) > Point Cloud Visualizer panel, click file browser icon, select ply file, click Load PLY. Click Draw button to display point cloud, Erase to hide point cloud. Adjust percentage of displayed points with Display and point size with Size.
  • Transforming parent object transforms point cloud as well.
  • Huge speed improvements compared to 2.7x version.

Point cloud rendering

Currently only sigle point cloud per render/frame is supported. If you need more clouds at once, select another cloud parent and re-render with different suffix in Render subpanel. Output image is RGBA 8bit PNG - transparent background with colored point cloud, which can be composed over something else later.

Usage:
  • Load and display ply first.
  • Make a camera and adjust as needed.
  • Set render image size in Properties > Output > Dimensions. Resolution X, Y and % are used.
  • Set render path in Properties > Output > Output. Just path is used.
  • Select cloud parent object, set point size with Render Size and hit Render or Animation.
Render options:
  • Render Size - point render size in pixels
  • Suffix - rendered image filename suffix. If filename in Output path is defined result filename will be NAME_SUFFIX_######.png, if only path is given, result is SUFFIX_######.png
  • Leading Zeros - image filename frame number leading zeros count

BlenderArtist.org thread

changelog:

  • 0.6.2 fixed point size display in viewport, separated view and render point size
  • 0.6.1 single cloud rendering almost completely rewritten to be better and faster
  • 0.6.0 single cloud rendering
  • 0.5.2 refactored some logic, removed icons from buttons
  • 0.5.1 load ply without vertex colors, uniform grey will be used
  • 0.5.0 performance improvements using numpy for loading and processing data
  • 0.4.6 fixed crash when parent object is deleted while drawing, fixed removal of loaded data when parent is deleted
  • 0.4.5 added 'Display' percentage, better error handling during .ply loading
  • 0.4.0 almost complete rewrite for blender 2.80, performance improvements using shaders, simplified ui
  • 0.3.0 new ply loader, can be used with any binary ply file with vertex coordinates and colors
  • 0.2.0 display percentage
  • 0.1.0 first release

Tube UV Unwrap (for blender 2.80)

UV unwrap tube-like meshes (all quads, no caps, fixed number of vertices in each ring)

Tube UV Unwrap

notes:

  • Works only on tube-like parts of mesh defined by selection and active vertex (therefore you must be in vertex selection mode) and the selection must have a start and an end ring. Tube-like mesh is: all quads, no caps, fixed number of vertices in each ring. (Best example of such mesh is mesh circle extruded several times or beveled curve (not cyclic) converted to mesh.) There must be an active vertex on one of the boundary loops in selection. This active vertex define place where mesh will be 'cut' - where seam will be placed.
  • Result is rectangular UV for easy texturing, scaled to fit square, horizontal and vertical distances between vertices are averaged and proportional to each other.

usage:

  1. tab to Edit mode
  2. select part of mesh you want to unwrap, tube type explained above
  3. make sure your selection has boundaries and there is an active vertex on one border of selection
  4. hit "U" and select "Tube UV Unwrap"
  5. optionally check/uncheck 'Mark Seams' or 'Flip' in operator properties

BlenderArtist.org thread

changelog:

  • 0.3.0 blender 2.8 update

Fast Wavefront^2 (for blender 2.80)

Import/Export single mesh as Wavefront OBJ. Fast. Now with Cython. Binaries not included.

Only active mesh is exported. Only single mesh is expected on import. Supported obj features: UVs, normals, vertex colors using MRGB format (ZBrush) or 'Extended' format (import only) where vertex is defined as (x,y,z,r,g,b).

Fast Wavefront^2

changelog:

  • 0.3.2 import 'extended' vertex colors (x,y,z,r,g,b), optionally apply gamma correction
  • 0.3.1 import obj (python only)
  • 0.3.0 export implemented in cython
  • 0.2.0 ported to blender 2.80

requirements:

  • python 3.7.0 (the same as shipped with blender 2.8)
  • Cython (easiest is to install with pip)

installation on mac (win/linux should be very similar):

  1. download repository and copy whole directory io_mesh_fast_obj to /Users/*USERNAME*/Library/Application Support/Blender/2.80/scripts/addons/
  2. in terminal cd to /Users/*USERNAME*/Library/Application Support/Blender/2.80/scripts/addons/io_mesh_fast_obj/
    1. $ git clone http://git.blender.org/blender.git
    2. $ python3 setup.py build_ext --inplace
  3. now delete blender directory, it is no longer needed until blender is updated, then you (might) need to repeat the process

Import cameras from Agisoft PhotoScan xml. Works with xml version 1.4.0 which is exported from PhotoScan 1.4.x versions. If you want to have images actually aligned with model, undistort images first. This is done in PhotoScan by Export > Undistort Photos... Because you can't in Blender set resolution for cameras independently, xml with different cameras or image resolutions might not work well.

Import Agisoft PhotoScan Cameras

usage:

  1. go to Properties > Scene > Import Agisoft PhotoScan Cameras panel
  2. Cameras XML: set path to xml
  3. set import options:
    • Camera Display Size: size of imported cameras in viewport
    • Load Camera Images: load images or not
    • Images Directory: path to directory with undistorted images
    • Image Extension: images extension, they all should be the same (currently)
    • Alpha: camera image alpha, 0.0 - 1.0
    • Depth: camera display depth, front / back
  4. there are some more optional properties:
    • Create Chunk Region Borders
    • Align to Active Object: if you import mesh from PhotoScan first, the transform it to correct size and orientation, this option will copy transformation from that mesh if it is active
  5. hit Import
  6. import done..
  7. now you can quickly swap cameras in alphabetical order in PhotoScan Cameras Utilities panel

BlenderArtist.org thread

changelog:

  • 0.1.1 first release

Ever-evolving set of small tools, workflows and shortcuts focused mainly on processing photogrammetry scans.

Carbon Tools

Subtools

  • Extract selected part of mesh to a new object. If edges of extracted mesh are changed, it won't be able to merge back seamlessly - use option to hide edges (lock button) to protect them.
  • Insert it back when finished editing.
  • Extract Non-Manifold elements with part of mesh around them (10x expanded selection) as subtool

Dyntopo

  • Dyntopo Setup - Quick setup for optimizing mesh resolution. Set desired Constant Resolution and Method and hit Dyntopo Setup Mode is switched to Sculpt with Dyntopo, brush is set to strength 0 - affecting only mesh resolution.
  • Dyntopo Live Settings - current settings which can be changed during sculpting

Texture Paint

  • Texture Paint Setup - Quick setup for retouching texture in Photoshop, set Resolution of exported images and hit TP Setup (Photoshop must be set in preferences as Image Editor)
  • External TP Live Commands: Quick Edit - export image and open in PS, Apply - project image back to model, Save All Images - save all edited textures

IO

  • Import from ZBrush (depends on other addon Fast Wavefront^2)
  • Export to ZBrush (depends on other addon Fast Wavefront^2)
  • Transformation: Selected > Active - Copy transformation from selected to active. Useful for setting correct scale and orientation after initial import from PhotoScan.
  • Matrix: Selected > Active - Select matrix source object first and then target object. Matrix will be copied while keeping visual transformation intact.
  • Export to PhotoScan (depends on other addon Fast Wavefront^2)

End

  • End ends current procedure: Dyntopo and Texture Paint back to Object mode and reset all settings

Utilities

  • Smooth / Flat shading, just shortcuts
  • UV Coverage calculate and print how much percent covers active uv layout
  • Seams From Islands mark seams from UV islands
  • Select Seams select seam edges
  • Seams > Wireframe copy seams edges to a new mesh object
  • Export UV Layout
  • Wireframe set display to shaded + wire + all edges and deselect object
  • Select Non-Manifold select non-manifold elements and optionally focus camera on them (eye icon)

Conversions

  • UVTex > VCols - Copy image colors from active image texture node in active material using active UV layout to new vertex colors
  • Group > VCols - Active vertex group to new vertex colors, vertex weight to rgba(weight, weight, weight, 1.0)
  • VCols > Group - Active vertex colors to new vertex group, vertex weight by color perceived luminance
  • Difference > Group - Calculate difference between two selected meshes and write as vertex group to active mesh. Selected is consedered to be original, active to be modified. Objects should have the same transformation.

changelog:

  • 2.2.2 ui changes, mesh difference to group, calculate uv coverege
  • 0.2.1 uvtex / vcols / group conversions
  • 0.2.0 first release

Time Tracker (for blender 2.80)

Simple time tracker inside blender. After you install and enable it, it will log loaded and saved files and time spent of file until it is saved. All ui is inside addon preferences.

Time Tracker

Here you can enable / disable logging, clear data collected so far, set custom data path (.csv) and see short summary of collected data and open individual project directories in file browser. The project name is determined by directory name where the blend is. For example if you have project in directory named "MyNewOutstandingProject" and all blends are inside subdirectory "models", set level number to 1 and you will see project name in results. 0 is directory directly above blend, 1 is one directory above blend, and so on. If you are like me and all your projects have the same subdirectory structure, sent directory level and you are good to go.

BlenderArtist.org thread

changelog:

  • 0.2.0 updated for 2.80
  • 0.1.0 added simple ui
  • 0.0.8 ui tweaks, more advanced options, minor bugfixes
  • 0.0.7 fixed performance and sorting, added tracking of files which were closed without saving once a minute (can be enabled in preferences: check Track Scene Update)
  • 0.0.6 first release


addons for blender 2.7x



Point Cloud Visualizer (for blender 2.7x)

Display colored point cloud PLY in Blender's 3d viewport. Works with binary point cloud PLY files with 'x, y, z, red, green, blue' vertex values. All other values are ignored. Color values must be in 0-255 range.

  • Add an Empty object
  • Load and display point cloud at Properties (N) panel with Empty selected
  • Available controls: auto loading of selected ply file, pixel point drawing or OpenGL smooth point, drawing enable/disable, percentage of displayed points and reset button which resets all (except autoload option)
  • Transforming Empty transforms point cloud as well
  • Works reasonably fast with 4m points on my machine, 5 years old, not top of the line at its time

Point Cloud Visualizer

BlenderArtist.org thread

changelog:

  • 0.3.0 new ply loader, can be used with any binary ply file with vertex coordinates and colors
  • 0.2.0 display percentage
  • 0.1.0 first release

Simple and effective access to Solid OpenGL Lights for your viewport. Comes with clean, simple interface and endless possibilities. No more fiddling with preferences and other similar confusing, complex and view obscuring addons!

OpenGL Lights

BlenderArtist.org thread

changelog:

  • 2018.04.07 new ui

OpenGL Lights

  • 2014.08.25 more presets
  • 2014.08.24 added defaults, created when no presets are available
  • 2014.08.19 first release

Fast Wavefront (for blender 2.7x)

Import/Export single mesh as Wavefront OBJ.

Only active mesh is exported. Only single mesh is expected on import. Supported obj features: UVs, normals, shading, vertex colors using MRGB format (ZBrush) or so called 'extended' format when each vertex is defined by 6 values (x, y, z, r, g, b). Export is ~3x faster than built-in obj exporter and import ~2x. It lacks some features, but saves quite a bit time when you need to move high resolution mesh from blender to ZBrush and back a few times per hour while cleaning up scans.

Comes with a few presets (created upon activation) for following workflow: import raw mesh obj from Agisoft PhotoScan, export raw mesh obj to ZBrush, import cleaned/uv unwrapped mesh obj from ZBrush, export cleaned mesh to Agisoft PhotoScan for texture generation.

changelog:

  • 0.1.2 import zbrush mask as vertex group
  • 0.1.1 first release

Equalizes scale of UVs of selected objects to active object.

  • Use when tileable texture needs to be applied on all objects and its scale should be the same across them.
  • Available in Object menu of 3d view while in object mode.
  • To enable, more than two mesh objects must be selected, one must be active.
  • Default behavior is active object determines scale and all other objects will be adjusted. This can be overrided unchecking 'Use Active', then all objects will be averaged.
  • Island scale averaging and repacking is optional and will yeld better result.

UV Equalize

BlenderArtist.org thread

changelog:

  • 0.2.3 better fix for bug fixed in previous version..
  • 0.2.2 fixed bug which prevented script to work, operators are used for transforming uvs, but when in image editor is loaded 'Render Result', UV will not be displayed and therefore operators will not work.. it's one line fix, just set displayed image to None..
  • 0.2.1 auto deselect non mesh objects
  • 0.2.0 complete rewrite, now it is pure math
  • 0.1.2 fixed different uv names bug
  • 0.1.1 uuid windows workaround
  • 0.1.0 first release

Tube UV Unwrap (for blender 2.7x)

UV unwrap tube-like meshes (all quads, no caps, fixed number of vertices in each ring)

notes:

  • Works only on tube-like parts of mesh defined by selection and active vertex (therefore you must be in vertex selection mode) and the selection must have a start and an end ring. Tube-like mesh is: all quads, no caps, fixed number of vertices in each ring. (Best example of such mesh is mesh circle extruded several times or beveled curve (not cyclic) converted to mesh.) There must be an active vertex on one of the boundary loops in selection. This active vertex define place where mesh will be 'cut' - where seam will be placed.
  • Result is rectangular UV for easy texturing, scaled to fit square, horizontal and vertical distances between vertices are averaged and proportional to each other.

usage:

  1. tab to Edit mode
  2. select part of mesh you want to unwrap, tube type explained above
  3. make sure your selection has boundaries and there is an active vertex on one border of selection
  4. hit "U" and select "Tube UV Unwrap"
  5. optionally check/uncheck 'Mark Seams' or 'Flip' in operator properties

Tube UV Unwrap

BlenderArtist.org thread

changelog:

  • 0.2.4 removed redundant and buggy parts
  • 0.2.0 almost full rewrite, now it works on selection only, any mesh will work, if selection comply to requirements
  • 0.1.3 fail nicely when encountered 2 ring cylinder
  • 0.1.2 got rid of changing edit/object mode
  • 0.1.1 fixed accidental freeze on messy geometry, fixed first loop vertex order (also on messy geometry), uv creation part completely rewritten from scratch
  • 0.1.0 first release

Simple time tracker inside blender. After you install and enable it, it will log loaded and saved files and time spent of file until it is saved. All ui is inside addon preferences.

Time Tracker

Here you can enable / disable logging, clear data collected so far, set custom data path (.csv) and see short summary of collected data and open individual project directories in file browser. The project name is determined by directory name where the blend is. For example if you have project in directory named "MyNewOutstandingProject" and all blends are inside subdirectory "models", set level number to 1 and you will see project name in results. 0 is directory directly above blend, 1 is one directory above blend, and so on. If you are like me and all your projects have the same subdirectory structure, sent directory level and you are good to go.

BlenderArtist.org thread

changelog:

  • 0.1.0 added simple ui
  • 0.0.8 ui tweaks, more advanced options, minor bugfixes
  • 0.0.7 fixed performance and sorting, added tracking of files which were closed without saving once a minute (can be enabled in preferences: check Track Scene Update)
  • 0.0.6 first release

About

blender python scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%