Page MenuHome

Fix T81079: Switch object ignoring visibility settings
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Oct 18 2020, 6:24 PM.

Details

Summary

The operator now uses ED_transform_snap_object_context_create_view3d

Diff Detail

Repository
rB Blender
Branch
T81079 (branched from master)
Build Status
Buildable 10829
Build 10829: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Oct 18 2020, 6:24 PM
Pablo Dobarro (pablodp606) created this revision.

While this is OK, I'm not sure why this is used instead of Base *base = ED_view3d_give_base_under_cursor(C, event->mval); as is used for dropping materials onto objects - for example.

This has the advantage that it works for non-geometry objects (armatures for e.g.)

@Campbell Barton (campbellbarton) Because it needs the surface location to update the view orbiting point as you change between different objects.

Why not use ED_view3d_autodist_simple & ED_view3d_depth_unproject for this?

Then this can support non geometry objects (armatures for eg)

  • Use ED_view3d_give_base_under_cursor

Committed with minor edits rB1ad100d5568c: Fix T81079: Switch object ignoring visibility settings.

  • Only set average_stroke_accum when last_mode is a paint mode.
  • ED_view3d_autodist_simple may fail, don't set average_stroke_accum in that case.
This revision is now accepted and ready to land.Oct 21 2020, 4:56 AM