Commit: 2acf4ace511292a66451b7842b2725d1776a6656
Author: Sergey Sharybin
Date: Wed Jun 20 10:29:49 2018 +0200
Branches: temp-dynamic-overrides
https://developer.blender.org/rB2acf4ace511292a66451b7842b2725d1776a6656
Cleanup: Create ID property only once
Avoids refining ID pointer for every property which is being applied.
===================================================================
M source/blender/blenkernel/intern/layer.c
===================================================================
diff --git a/source/blender/blenkernel/intern/layer.c
b/source/blender/blenkernel/intern/layer.c
index 32f4f63f74d..1c44350d340 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -1333,6 +1333,9 @@ void BKE_dynamic_override_apply(const struct Depsgraph
*depsgraph, ID *id)
return;
}
+ PointerRNA ptr;
+ RNA_id_pointer_create(id, &ptr);
+
ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph);
int i = 0;
for (OverrideSet *override_set = view_layer->override_sets.first;
@@ -1352,9 +1355,6 @@ void BKE_dynamic_override_apply(const struct Depsgraph
*depsgraph, ID *id)
if ((dyn_prop->flag & DYN_OVERRIDE_PROP_USE) ==
0) {
continue;
}
-
- PointerRNA ptr;
- RNA_id_pointer_create(id, &ptr);
RNA_struct_dynamic_override_apply(&ptr,
dyn_prop);
}
}
@@ -1375,10 +1375,7 @@ void BKE_dynamic_override_apply(const struct Depsgraph
*depsgraph, ID *id)
if ((dyn_prop->flag & DYN_OVERRIDE_PROP_USE) ==
0) {
continue;
}
-
/* If object is in collection ... */
- PointerRNA ptr;
- RNA_id_pointer_create(id, &ptr);
RNA_struct_dynamic_override_apply(&ptr,
dyn_prop);
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs