Page MenuHome

Multi-Objects: Calculate Transform origin with all Editmode Meshes
AbandonedPublic

Authored by Leon Eckardt (Leon95) on Jul 16 2018, 1:53 PM.

Details

Summary

Fixes the calculation of the transform origin in multi-object editmode.


Takes all selected parts into account, not only parts of the active object.

For now it the implementation is only for Mesh edit mode, to check if code style and implementation is all right.

Diff Detail

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

Event Timeline

Leon Eckardt (Leon95) edited the summary of this revision. (Show Details)Jul 17 2018, 11:56 AM

I haven't tried the patch, but it should skip the object if there is no selected vertex.

Dalai Felinto (dfelinto) requested changes to this revision.Aug 23 2018, 6:23 PM

(I can confirm the issue though)

This revision now requires changes to proceed.Aug 23 2018, 6:23 PM
  • Merge branch 'blender2.8' into arcpatch-D3550
  • skip objects without selected verts/edges/faces
source/blender/editors/transform/transform_gizmo_3d.c
852

Should I add a if case for the active object, since it will be multiplied with the identity matrix here?

Dalai Felinto (dfelinto) requested changes to this revision.Sep 28 2018, 10:25 PM

This works, but I'm not a big fan of it. I think instead of transforming all the points in the active object local space we should have it in the world space.
@Campbell Barton (campbellbarton) what do you think of this? Any reason to stick to the local space of the active object?

Besides, you are calculating the active object invert matrix once per object in the loop.

This revision now requires changes to proceed.Sep 28 2018, 10:25 PM
  • Merge branch 'blender2.8' into arcpatch-D3550
  • Move Matix inversion out of the loop

@Dalai Felinto (dfelinto), we could use world-space, it would need an update to WIDGETGROUP_xform_cage_refresh though.

Committed rB32de646d3d03852949b5622e1ce978fe8a3ea077 w/ minor edits