[Bf-blender-cvs] [0692fc9665] blender2.8: CollectionEngineSettings calculate: set COLLECTION_PROP_USE for combined property
Dalai Felinto
noreply at git.blender.org
Thu Feb 9 11:48:34 CET 2017
Commit: 0692fc9665d089cbb7779a444864fa431986abf2
Author: Dalai Felinto
Date: Thu Feb 9 11:48:09 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB0692fc9665d089cbb7779a444864fa431986abf2
CollectionEngineSettings calculate: set COLLECTION_PROP_USE for combined property
This way the render engines can have a fallback value (scene or layer default value) for the shader values that were never set.
===================================================================
M source/blender/blenkernel/intern/layer.c
===================================================================
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 667b40751e..a674d08442 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -910,6 +910,8 @@ static void collection_engine_settings_copy(CollectionEngineSettings *ces_dst, C
*/
static void collection_engine_property_set (CollectionEngineProperty *prop_dst, CollectionEngineProperty *prop_src){
if ((prop_src->flag & COLLECTION_PROP_USE) != 0) {
+ /* mark the property as used, so the engine knows if the value was ever set*/
+ prop_dst->flag |= COLLECTION_PROP_USE;
switch (prop_src->type) {
case COLLECTION_PROP_TYPE_FLOAT:
((CollectionEnginePropertyFloat *)prop_dst)->value = ((CollectionEnginePropertyFloat *)prop_src)->value;
More information about the Bf-blender-cvs
mailing list