Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-01-17 13:56:56 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-01-17 14:34:08 +0300
commit33dcde48652d7caa63a27f8c38fdf06baacaa41e (patch)
treeb3e053672d7f5b4b7f6c7d1c3fd14a8ac2e2f2dc /source/blender/makesrna/intern/rna_depsgraph.c
parent06ee560da740d58c546b9b7bb70e0f4d146e4f25 (diff)
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_depsgraph.c')
-rw-r--r--source/blender/makesrna/intern/rna_depsgraph.c5
1 files changed, 4 insertions, 1 deletions
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");