Page MenuHome

Object: Enable transfer mode functionality for switching objects in Sculpt Mode
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Apr 11 2021, 6:54 PM.

Details

Summary

This implements the changes discussed in T87134 for including switch
object funcionality in 2.93. This includes:

  • Remove the switch object operator experimental option
  • Remove the option for switching objects in Edit Mode.
  • Rename switch_object to transfer_mode.
  • Enable the operator only in sculpt mode.
  • Expose the operator in the Sculpt menu with an eyedropper modal

option.

On later releases, we could revisit enabling the operator in other mode
and object types as well as its place in the UI.

Diff Detail

Repository
rB Blender
Branch
sculpt-enable-object-switch (branched from master)
Build Status
Buildable 13998
Build 13998: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Apr 11 2021, 6:54 PM
Pablo Dobarro (pablodp606) created this revision.

This addresses all the left over to do's for 2.93.

This revision is now accepted and ready to land.Apr 13 2021, 12:41 PM

@Jacques Lucke (JacquesLucke) I added you as a reviewer in case you want to take a look at the code before committing it for bcon3 (this is mostly a refactor of the previous operator, it just adds the modal callback with the eyedropper).

Looks fine for the most part. Accepting under the assumption that you fix the minor inline comments.

It's not too be, since it rarely makes sense to do this, but it seems there are some missing redraws.

source/blender/editors/object/object_modes.c
488
/home/jacques/blender-git/blender/source/blender/editors/object/object_modes.c: In function ‘object_transfer_mode_modal’:
/home/jacques/blender-git/blender/source/blender/editors/object/object_modes.c:488:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
  488 |       if (event->val == KM_PRESS) {
      |          ^
/home/jacques/blender-git/blender/source/blender/editors/object/object_modes.c:509:5: note: here
  509 |     case RIGHTMOUSE: {
      |     ^~~~
520

unnecessary newline

523

object should be lower case here afaik