Fix T63864 Duplicate Data options don't exist for Light Probe and Grease Pencil
See revision D4766
This commit is contained in:
parent
d48a2f4a37
commit
9a4fd6da0f
Notes:
blender-bot
2023-02-14 06:21:59 +01:00
Referenced by issue #63864, Duplicate Data options don't exist for Light Probe and Grease Pencil
|
@ -318,6 +318,7 @@ class USERPREF_PT_edit_objects_duplicate_data(PreferencePanel, Panel):
|
|||
col.prop(edit, "use_duplicate_curve", text="Curve")
|
||||
# col.prop(edit, "use_duplicate_fcurve", text="F-Curve")
|
||||
col.prop(edit, "use_duplicate_light", text="Light")
|
||||
col.prop(edit, "use_duplicate_lightprobe", text="Light Probe")
|
||||
col = flow.column()
|
||||
col.prop(edit, "use_duplicate_material", text="Material")
|
||||
col.prop(edit, "use_duplicate_mesh", text="Mesh")
|
||||
|
@ -327,6 +328,7 @@ class USERPREF_PT_edit_objects_duplicate_data(PreferencePanel, Panel):
|
|||
col.prop(edit, "use_duplicate_surface", text="Surface")
|
||||
col.prop(edit, "use_duplicate_text", text="Text")
|
||||
col.prop(edit, "use_duplicate_texture", text="Texture")
|
||||
col.prop(edit, "use_duplicate_grease_pencil", text="Grease Pencil")
|
||||
|
||||
|
||||
class USERPREF_PT_edit_cursor(PreferencePanel, Panel):
|
||||
|
|
|
@ -1651,7 +1651,7 @@ Object *BKE_object_duplicate(Main *bmain, const Object *ob, const int dupflag)
|
|||
}
|
||||
break;
|
||||
case OB_LIGHTPROBE:
|
||||
if (dupflag != 0) {
|
||||
if (dupflag & USER_DUP_LIGHTPROBE) {
|
||||
ID_NEW_REMAP_US2(obn->data)
|
||||
else
|
||||
{
|
||||
|
@ -1673,7 +1673,7 @@ Object *BKE_object_duplicate(Main *bmain, const Object *ob, const int dupflag)
|
|||
}
|
||||
break;
|
||||
case OB_GPENCIL:
|
||||
if (dupflag != 0) {
|
||||
if (dupflag & USER_DUP_GPENCIL) {
|
||||
ID_NEW_REMAP_US2(obn->data)
|
||||
else
|
||||
{
|
||||
|
|
|
@ -530,6 +530,12 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
|
|||
}
|
||||
}
|
||||
|
||||
/* patch to set Dupli Lightprobes and Grease Pencil */
|
||||
if (!USER_VERSION_ATLEAST(280, 58)) {
|
||||
userdef->dupflag |= USER_DUP_LIGHTPROBE;
|
||||
userdef->dupflag |= USER_DUP_GPENCIL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Include next version bump.
|
||||
*/
|
||||
|
|
|
@ -993,6 +993,8 @@ typedef enum eDupli_ID_Flags {
|
|||
USER_DUP_ARM = (1 << 9),
|
||||
USER_DUP_ACT = (1 << 10),
|
||||
USER_DUP_PSYS = (1 << 11),
|
||||
USER_DUP_LIGHTPROBE = (1 << 12),
|
||||
USER_DUP_GPENCIL = (1 << 13),
|
||||
} eDupli_ID_Flags;
|
||||
|
||||
/** Max anti alias draw method
|
||||
|
|
|
@ -4472,6 +4472,16 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
|
|||
RNA_def_property_ui_text(
|
||||
prop, "Duplicate Particle", "Causes particle systems to be duplicated with the object");
|
||||
|
||||
prop = RNA_def_property(srna, "use_duplicate_lightprobe", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LIGHTPROBE);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Duplicate Light Probe", "Causes light probe data to be duplicated with the object");
|
||||
|
||||
prop = RNA_def_property(srna, "use_duplicate_grease_pencil", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_GPENCIL);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Duplicate GPencil", "Causes grease pencil data to be duplicated with the object");
|
||||
|
||||
/* Currently only used for insert offset (aka auto-offset),
|
||||
* maybe also be useful for later stuff though. */
|
||||
prop = RNA_def_property(srna, "node_margin", PROP_INT, PROP_NONE);
|
||||
|
|
Loading…
Reference in New Issue