From 33dcde48652d7caa63a27f8c38fdf06baacaa41e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 17 Jan 2019 11:56:56 +0100 Subject: [PATCH] =?UTF-8?q?RNA=20Depsgra=C4=A5:=20add=20a=20warning=20abou?= =?UTF-8?q?t=20not=20using=20object=5Finstances=20as=20a=20sequence.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- source/blender/makesrna/intern/rna_depsgraph.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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");