Copy Global Transforms: SKIP_SAVE on paste

Add the `SKIP_SAVE` option to the 'Paste Global Transform' operator
properties.

This fixes a bug with following repro steps:
- Specify a relative object
- Use relative copy/paste
- Try to use non-relative copy/paste
- It will fail because after you used the relative paste operator, the
  `use_relative` property is saved for ever as True.

Pull Request: https://projects.blender.org/blender/blender/pulls/145262
This commit is contained in:
Demeter Dzadik
2025-09-01 15:21:09 +02:00
committed by Sybren A. Stüvel
parent 79ab23e063
commit eb4c22c0a4

View File

@@ -488,6 +488,7 @@ class OBJECT_OT_paste_transform(Operator):
items=_method_items,
name="Paste Method",
description="Update the current transform, selected keyframes, or even create new keys",
options={'SKIP_SAVE'},
)
bake_step: bpy.props.IntProperty( # type: ignore
name="Frame Step",
@@ -495,12 +496,14 @@ class OBJECT_OT_paste_transform(Operator):
min=1,
soft_min=1,
soft_max=5,
options={'SKIP_SAVE'},
)
use_mirror: bpy.props.BoolProperty( # type: ignore
name="Mirror Transform",
description="When pasting, mirror the transform relative to a specific object or bone",
default=False,
options={'SKIP_SAVE'},
)
mirror_axis_loc: bpy.props.EnumProperty( # type: ignore
@@ -508,18 +511,21 @@ class OBJECT_OT_paste_transform(Operator):
name="Location Axis",
description="Coordinate axis used to mirror the location part of the transform",
default='x',
options={'SKIP_SAVE'},
)
mirror_axis_rot: bpy.props.EnumProperty( # type: ignore
items=_axis_enum_items,
name="Rotation Axis",
description="Coordinate axis used to mirror the rotation part of the transform",
default='z',
options={'SKIP_SAVE'},
)
use_relative: bpy.props.BoolProperty( # type: ignore
name="Use Relative Paste",
description="When pasting, assume the pasted matrix is relative to another object (set in the user interface)",
default=False,
options={'SKIP_SAVE'},
)
@classmethod