Page MenuHome

Multi-Object-Editing : Support for MESH_OT_select_axis

Authored by Lucas Boutrot (thornydre) on May 11 2018, 12:24 AM.

Diff Detail

rB Blender

Event Timeline

Campbell Barton (campbellbarton) requested changes to this revision.May 11 2018, 7:53 AM

This needs to use the active vertex of the active object as a reference, then all other vertices should be selected based on this as a reference point.

This revision now requires changes to proceed.May 11 2018, 7:53 AM

Can we fix select axis first, before moving to multi-object?
Before or after this patch I can't get it to work for the simplest of the cases:

  • Add cube
  • Subvidivide 2x
  • Select a vertice in the middle and Select Axis.

The fix should be done as a separate patch though. Which makes me wonder, how did you test this patch? Is this feature working in a different case?

It works for me with these following steps :

  • Create Monkey
  • Select one of the upper vertices
  • Select axis (Positive Axis, Z Axis)
  • And play with the threshold

I'll have a go tonight to make it behave as Campbell said.

I miss only one thing before making it based on the active vertex of the active object :

v_act->co[axis] and v->co[axis] are local, and I can't find a way to get an offset for the non-active objects and their selection based on a "v_act->co[axis] world value", don't know if that makes sense ?

Dalai Felinto (dfelinto) requested changes to this revision.May 14 2018, 1:55 PM

Your patch needs to include all your changes, not only the last one.

It is easier if you keep all your changes in a branch and use arcanist to submit them:

To update an existing patch (like this one) make sure your branch is updated in relation to blender2.8 and use: arc diff origin/blender2.8 --update D3337.

This revision now requires changes to proceed.May 14 2018, 1:55 PM

Sorry for that, here it is. Commit all the changes at once.

Dalai Felinto (dfelinto) requested changes to this revision.May 16 2018, 12:51 PM
Dalai Felinto (dfelinto) added inline comments.

This is shadowing the declaration of em, and bm inside the loop. It is probably throwing some compile warnings (not to be ignored ;).

This whole block should go away, and BMVert *v_act = BM_mesh_active_vert_get(bm); can be checked inside the for loop.


Please move the { to the previous line with a space between it and the (.


You should report errors only once and only if all the objects fail for the same reason.


Also since we are using continue, there is no need for the else. This way you can unindent this whole block of code (under else).

This revision now requires changes to proceed.May 16 2018, 12:51 PM
Lucas Boutrot (thornydre) marked 4 inline comments as done.

I corrected the mistakes you told me, but I am still a bit stuck about selecting the points on a non-active mesh based on the active point of the active mesh. Would you have a little hint for me ?

Every should work now, I found a solution by getting obedit->loc[axis], I don't know if this is a good way to do it, let me know !

Hi, check the following commits:

  • 00ab0b039995db7dfae6284d1ed1f7f034420366
  • ce34f9348fa35a66a1ffebdaef6e007c5e39eb25
  • c899f21800533f0d188c505e3909a3e1f2a0c7f2

As it turned out the original operator wasn't operating in the world space. So a rotated object was going to get its local X/Y/Z axis selected instead of the world one.
I addressed that and then the conversion to multi-object support in the commits above.