Page MenuHome

python templates: update operator_modal_view3d_raycast to 2.8

Authored by Philipp Oeser (lichtwerk) on May 21 2019, 3:28 PM.

Diff Detail

rB Blender

Event Timeline

The code looks correct to me, but I still have to learn the new depsgraph API. @Sergey Sharybin (sergey) should say if this is the right usage.

Can you elaborate why you are yielding original objects instead of evaluated?

@Sergey Sharybin (sergey): these are later selected [ see best_obj.select_set(True) ] -- which only works for originals I assume?
(but I guess this could be changed so that getting the original is done later?)

Probably indeed better to go original later, when is actually needed.
And maybe add a comment about why original is needed there.

P.S. Was just somewhat confusing to see iterator yielding original objects which has no modifiers or anything in an example which is related on ray casting (which tests intersection against geometry).

Philipp Oeser (lichtwerk) updated this revision to Diff 15514.EditedMay 21 2019, 4:17 PM
  • yield evaluated object, use original later for selection etc.
  • added comment about original (which I hope is correct, bit on shaky ground here...)

P.S. yes, raycasting non-evaluated ob is indeed not so usefull... :) thx for spotting it

Looks good to me.

This revision is now accepted and ready to land.May 21 2019, 4:27 PM
This revision was automatically updated to reflect the committed changes.