From 65dbeb1d81bff6c5742eb5f503b59207485041a9 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 22 Oct 2021 12:33:03 +0200 Subject: Fix T90638: Inconsistent object data behavior when link-duplicating collections. Camera, lattice and speaker object types were missing there own proper `USER_DUP_` flags, leading to not properly handling duplication of their object data. NOTE: We could probably simply opions here, by using categories (like 'GEOMETRY', 'SHADING', etc.) instead of exact object types. But this is beyond bugfix scope. --- source/blender/makesrna/intern/rna_userdef.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index c80ba4ef6e6..37d2b711b7d 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -5181,6 +5181,11 @@ static void rna_def_userdef_edit(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Duplicate Curve", "Causes curve data to be duplicated with the object"); + prop = RNA_def_property(srna, "use_duplicate_lattice", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LATTICE); + RNA_def_property_ui_text( + prop, "Duplicate Lattice", "Causes lattice data to be duplicated with the object"); + prop = RNA_def_property(srna, "use_duplicate_text", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FONT); RNA_def_property_ui_text( @@ -5196,6 +5201,16 @@ static void rna_def_userdef_edit(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Duplicate Armature", "Causes armature data to be duplicated with the object"); + prop = RNA_def_property(srna, "use_duplicate_camera", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_CAMERA); + RNA_def_property_ui_text( + prop, "Duplicate Camera", "Causes camera data to be duplicated with the object"); + + prop = RNA_def_property(srna, "use_duplicate_speaker", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_SPEAKER); + RNA_def_property_ui_text( + prop, "Duplicate Speaker", "Causes speaker data to be duplicated with the object"); + prop = RNA_def_property(srna, "use_duplicate_light", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP); RNA_def_property_ui_text( -- cgit v1.2.3