Page MenuHome

Separate operators (mesh/curve/armature/gpencil): take user preferences into account for duplicating actions
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Oct 23 2019, 12:58 PM.

Details

Summary

Previously actions remained linked after duplication, now this is based on the User Preferences (PreferencesEdit.use_duplicate_action).

note: default is ON here, so this changes default behavior of separate operators.

First intuition was to respect _all_ preferences here (e.g. also duplicating materials if chosen in the User Preferences) but after consideration this is probably not what the User would expect from such modeling opertions (e.g. separate by loose parts resulting in possibly many duplicate materials)

Fixes T71038

Diff Detail

Repository
rB Blender

Event Timeline

Making the case for current functionality.

It's possible some users run into problems with this change, if they have duplicate materials enabled for e.g. They might not expect separate loose parts to give them many different materials.

It's also less predictable to use operators from scripts when they're using preferences you might not expect.


OTOH, duplicating actions is what users probably expect in most cases, so we could select the flags used from the preferences.

Unless there is a good argument for following material & other options, think this is more predictable.

USER_DUP_MESH | (U.dupflag & USER_DUP_ACT)

  • only do this for actions
  • also do this for curves
Philipp Oeser (lichtwerk) retitled this revision from MESH_OT_separate: take user preferences into account for what data to duplicate along to Separate operators (mesh/curve): take user preferences into account for duplicating actions.Feb 27 2020, 2:08 PM
Philipp Oeser (lichtwerk) edited the summary of this revision. (Show Details)

note:

  • would also do this for armatures, but armature separate operator seem to be broken (happened somewhere between 2.81a and 2.82 - will report separately)
  • surfaces already done along with curves
  • greasepencil object could be done as well

also do this for separating bones (to test, you might want to apply D6949 as well since separating bones is broken atm.)

also do this for gpencil object actions

Philipp Oeser (lichtwerk) retitled this revision from Separate operators (mesh/curve): take user preferences into account for duplicating actions to Separate operators (mesh/curve/armature/gpencil): take user preferences into account for duplicating actions.Feb 27 2020, 4:48 PM
Sybren A. Stüvel (sybren) accepted this revision.EditedFeb 28 2020, 3:36 PM

LGTM, just some tiny nags.

source/blender/editors/armature/armature_relations.c
670–672

Comments should be a sentence, so start with a capital.

source/blender/editors/gpencil/gpencil_edit.c
4098

IMO this newline can be removed, as the lines above & below it are tightly connected.

This revision is now accepted and ready to land.Feb 28 2020, 3:36 PM