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 <bastien@blender.org>2021-10-22 13:33:03 +0300
committerBastien Montagne <bastien@blender.org>2021-10-22 13:35:40 +0300
commit65dbeb1d81bff6c5742eb5f503b59207485041a9 (patch)
treeb00961f1d03f95d2f4ac8b67fc71132ab4f9ae64 /source/blender/makesrna/intern/rna_userdef.c
parentd092933abbadb3a6d5ab53a0b2b3b865cd5c9079 (diff)
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c15
1 files changed, 15 insertions, 0 deletions
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(