* __OSL__ is now defined for CPU when building with OSL.
* First batch of compile fixes, remove some unneeded std namespace declarations and added missing includes.
Issue was caused by fact that viewer node might re-size ImBuf used for
viewer node result, so if several viewer nodes are running for inputs
with different resolutions it'll result in a crash,
Now copied behavior or pre-tile compositor -- execute viewer node which
has NODE_DO_OUTPUT flag, so no several nodes would be calculated at once.
Should be pretty ok because calculation of several viewers doesn't actually
make sense because there's only one buffer they might use and it's getting
re-calculated when changing active viewer node.
The issue was caused by CDDM_tessfaces_to_faces not dealing with CD layers.
There was already function BKE_mesh_convert_mfaces_to_mpolys which converted
mfaces to mpolys with converting all CD layers. Made it a bit more general so
it might work with given arrays of faces/polys and re-used it from CDDM module.
Checked with UV and sculpt data from Blender 2.61 and it loaded nice, so
hopefully there's no regressions in loading older files.
Added new flag to Imageuser which indicates whether user frame calculation is needed.
This flag is getting set in BKE_image_signal and handled in actual image usage areas
where both image user and current frame is known.
Some operators like curve presets, color sample and some more were using object's
mode to distinguish in which mode user is currently painting. Such approach fails
in cases when there's paint mode active in 3D viewport and Image Editor.
Changed logic here to use some context's state like active space which helps
distinguishing current paint mode more accurate.
Ported all areas which uses paint_get_active() to new paint_get_active_from_context().
There're still some calls to paint_get_active(), but that shouldn't be harmful due
to that places indeed have object's mode as priority when getting paint mode.
* NLA Strip colors are now themable
* Changed the "Active Action"/"Summary" colors to be a bit more muted. The new
colors are now closer to those for keyframes, though they are still different
enough to be clearly distinguishable.
* Removed some colors wihch don't seem to be used (from NLA theme colors)
* Added function to get theme colors + alpha as floats
finally works
This commit finally hooks up the Mask Modifier's "Armature" option with the
relevant depsgraph updates on bone selection. Hence, this feature finally works
as it was originally intended - that is, bone selections can be used to control
which parts of the mesh that the mask modifier is applied to are displayed,
giving riggers more freedom to experiment with rigs that don't necessarily
feature overbearing/cluttering widgets.
Regarding the implementation ("has_viz_deps" flag):
This feature is just the "tip of the iceberg" of a number of related set of
rigging/visual animation tools I've had in mind for a while now (dating back to
the introduction of this modifier). Key considerations
- Not all rigs will use this, so we don't want an extra (depsgraph-flush +
search) recalc cost for those that don't use this.
- There are some planned features which will also use this
'Armature' mode for the Mask Modifier was not working at all anymore even when
the selection <-> depsgraph recalc issue was patched to work (this latter fix is
coming in another commit). It appears that this probably happened during one or
more of the refactors which may have taken place around here over the years
since I first introduced it.
This commit does two things:
* Removed the unused/redundant "vgroupHash"
* Fixed the incorrect assumption used for determining if the vertex actually
belonged to a vgroup corresponding to a selected bone.
* More fixes, replaced all remaining size variables with scale ones.
* Remove nonzero check in OSL textures, not needed anymore, was there to prevent division by zero for the size variable.
* More fixes for r41599, removed clouds and distorted noise textures and ported the Noise texture to OSL.
ToDo: Color output is still commented, needs a closer look.
* Some more fixes (comments, uninitialized variables)
* The random output had a range from -0.5 to 0.5, added an offset of 0.5 to bring it into the 0.0 / 1.0 range, which is in alignment with Shader Node Guidelines.
Patch by Agustin Benavidez, thanks!