Fix T65490: linked property in object duplicate should not persist
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 6 Jun 2019 04:37:35 +0000 (06:37 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 6 Jun 2019 10:19:05 +0000 (12:19 +0200)
These things are somewhat arbitrary, but since there are separate shortcuts
and menu entries this seems the more expected behavior.

source/blender/editors/object/object_add.c

index dc2a353bd8657baff19a39bb0e169fdcdfd644f9..5e5537992e420742fc2be40650fbff97bffb38ac 100644 (file)
@@ -2566,11 +2566,13 @@ void OBJECT_OT_duplicate(wmOperatorType *ot)
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
   /* to give to transform */
   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
   /* to give to transform */
-  RNA_def_boolean(ot->srna,
-                  "linked",
-                  0,
-                  "Linked",
-                  "Duplicate object but not object data, linking to the original data");
+  prop = RNA_def_boolean(ot->srna,
+                         "linked",
+                         0,
+                         "Linked",
+                         "Duplicate object but not object data, linking to the original data");
+  RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+
   prop = RNA_def_enum(
       ot->srna, "mode", rna_enum_transform_mode_types, TFM_TRANSLATION, "Mode", "");
   RNA_def_property_flag(prop, PROP_HIDDEN);
   prop = RNA_def_enum(
       ot->srna, "mode", rna_enum_transform_mode_types, TFM_TRANSLATION, "Mode", "");
   RNA_def_property_flag(prop, PROP_HIDDEN);