Page MenuHome

Multi-Objects: VIEW3D_OT_snap_selected_to_cursor
AbandonedPublic

Authored by Leon Eckardt (Leon95) on May 22 2018, 10:34 PM.

Details

Summary

Adds Multi object edit support for VIEW3D_OT_snap_selected_to_cursor
same operator as D3376, but rebased in contrary to D3376
See T54643

For future patches if you want I can have the patch authored by you (using your name/email) as submitted by arc.

yes would be nice

Diff Detail

Repository
rB Blender
Branch
arcpatch-D3425 (branched from blender2.8)
Build Status
Buildable 1835
Build 1835: arc lint + arc unit

Event Timeline

Leon Eckardt (Leon95) retitled this revision from Adds Multi object edit support for VIEW3D_OT_snap_selected_to_cursor See T54643 to Multi-Objects: VIEW3D_OT_snap_selected_to_cursor.May 22 2018, 10:38 PM
Leon Eckardt (Leon95) edited the summary of this revision. (Show Details)

Saw it now, this operator is already under review(D3376). I did it some time ago and got stuck and had no time to continue. but his diff in contrary to 3376 has support for posemode (in theory when it would not crash)

It works for Meshes, but crashes for all other object types. I tested VIEW3D_OT_snap_selected_to_grid before Code Review with armatures and it worked. Now VIEW3D_OT_snap_selected_to_grid and VIEW3D_OT_snap_selected_to_cursor both crash with Segmentation fault on "non mesh objects" in Edit Mode. So it seems it it caused by some other change.

I tried to set up single step debugging with qt but it did not work. How do I set it up?

rebase and update

  • Merge branch 'blender2.8' into arcpatch-D3425
  • Removed Face/Vert/Edge-count check, since it causes crash on non-mesh-objects
  • Moved CTX_DATA loop to the right place
  • Readded one line I removed accidentaly
Leon Eckardt (Leon95) edited the summary of this revision. (Show Details)Aug 24 2018, 11:24 PM

Hi Leon,

I don't think this is the way the operator should behave. Try this:

Compare this

  1. Add and select two cubes in object mode
  2. perform snap_selection_to_cursor (use offset)

With this:

  1. Add and select two cubes in edit mode
  2. perform snap_selection_to_cursor (use offset)

The result with your patch is not the same. See D3648 for my proposed solution based on your code.

Best,
Habib.