[33dcde48652] master: RNA Depsgraĥ: add a warning about not using object_instances as a sequence.
Bastien Montagne
noreply at git.blender.org
Thu Jan 17 12:36:32 CET 2019
Commit: 33dcde48652d7caa63a27f8c38fdf06baacaa41e
Author: Bastien Montagne
Date: Thu Jan 17 11:56:56 2019 +0100
Branches: master
https://developer.blender.org/rB33dcde48652d7caa63a27f8c38fdf06baacaa41e
RNA Depsgraĥ: add a warning about not using object_instances as a sequence.
Due to how this is generated, each item is freed when steping iteration
to the next one, which means that subscriptions etc. will make blender
crash.
===================================================================
M source/blender/makesrna/intern/rna_depsgraph.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c
index d03dfc65ef4..843c53d5fd3 100644
--- a/source/blender/makesrna/intern/rna_depsgraph.c
+++ b/source/blender/makesrna/intern/rna_depsgraph.c
@@ -668,7 +668,10 @@ static void rna_def_depsgraph(BlenderRNA *brna)
"rna_Depsgraph_object_instances_end",
"rna_Depsgraph_object_instances_get",
NULL, NULL, NULL, NULL);
- RNA_def_property_ui_text(prop, "Object Instances", "All object instances to display or render");
+ RNA_def_property_ui_text(prop, "Object Instances",
+ "All object instances to display or render "
+ "(WARNING: only use this as an iterator, never as a sequence, "
+ "and do not keep any references to its items)");
prop = RNA_def_property(srna, "updates", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "DepsgraphUpdate");
More information about the Bf-blender-cvs
mailing list