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.
This commit is contained in:
Bastien Montagne
2019-01-17 11:56:56 +01:00
parent 06ee560da7
commit 33dcde4865

View File

@@ -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");