2 new attributes to ImageViewport and ImageRender object:
depth: set to True to retrieve the depth buffer as an array of float
(not suitable for texture source).
zbuff: set to True to retrieve the depth buffer as a grey scale pixel array
(suitable for texture source).
A new mode 'F' is added to VideoTexture.imageToArray() to allow returning the image
buffer as a one dimensional array of float. This mode should only be used to retrieve
the depth buffer of ImageViewport and ImageRender objects.
Example:
viewport = VideoTexture.ImageViewport()
viewport.depth = True
depth = VideoTexture.imageToArray(viewport,'F')
# show depth of bottom left pixel
# 1.0 = infinite, 0.0 = on near clip plane.
print(depth[0])
The idea behind this is that gettext lib has a func that mimics usual setlocale, but doing also the conversion to windows locale names. Let's hope it works everywhere!
This uses the weighted average of polygon centroids based on area
It work well in most cases but will be slightly wrong when polygons have
many vertices.
User preferences, keymap editor: it allowed to set any event for "key modifier", and not
even to NULL the option. Now it limits to keyboard events, on mouseclicks it clears,
on ESC it exits without changes.
transmission pass and filter glossy option.
The BSDF closure class is now more similar to the SVM closures, and includes
some flags and labels that are needed to properly categorize the BSDF's for
render passes. Phong closure is gone for the moment, needs to be adapated to
the new structure still.
- define array sizes for functions that take vectors.
- quiet some -Wshadow warnings.
- some copy/paste error in readfile.c made it set the same particle recalc flag twice.
Center Cursor uses BKE_object_minmax(), which uses pchans' bone member to check whether a bone is visible or not. But after a duplication, the duplicated pchan->bone are NULL, skiping in this case (as if they were hidden, not optimal but should do the work for now - anyway, using pchan's values in Edit mode does not really make sense, imho).
Made it so meshes, curves, surfaces and metaballs are scaling to a grid cell size,
which makes them behave consistently now.
There're still issues to be resolved still:
- Lattice is not scaled to grid cell size yet, it uses slightly different add
function which makes scaling a bit tricky and hacky. Would prefer to do a
bit bigger refactor here, so it's a TODO for now.
- Cameras, speakers and other helpers are not scaling. They don't have data
on which scale could be applied and perhaps it should be some kind of draw
scale. Also would consider it's a TODO for now.
When inset and bevel used the mouse input as a distance value, the change could be far too great when zoomed in, or far too small when zoomed out. Now get the pixel-size based on the center point of the selection.
Seems the issue was caused by G.is_break set to Truth on both escape
press and release. This ended up in situation when after press event
compositor was tagged to redraw and new job was started. On escape
release this compositor job was cancelled.
Made it so G.is_break is setting on escape press event only.
don't think its needed to print the full path of each addon.
also remove the __MACOX check, its harmless and people can make sure there zips dont have cruft in them before distributing them.