Page MenuHome

Add trackball loop to rotate manipulator
Closed, ArchivedPublicPATCH

Description

The existing manipulator code allows for trackball rotation (r, r) to be activated from the rotation manipulator if a loop with the appropriate name is drawn.

This fixes a "bug" in the documentation that describes this functionality already existing - http://wiki.blender.org/index.php/Doc:Manual/3D_interaction/Manipulation/Manipulators

This is a first attempt to add this.

Issues with this patch:
The loop can't be drawn at the "center" of the manipulator like the outer ring, because the ray-casting for detecting which part was clicked will always hit an axis first, so I've moved the loop to the front of the manipulator ball.

Unfortunately, there's some pretty significant distortion of the manipulator by scene perspective, so this skews the loop off the 2D center when the manipulator is moved from the center of the view. This isn't an issue just with this part of the manipulator, it affects the X/Y/Z loops towards the extreme edge of the viewport as well. (see attached image)

It'd probably look better to set the perspective transform on the manipulator so that its center is always at the origin of the manipulator, but I've had no luck figuring out how to do that.

Note: the translation to the front is only necessary if the loop is smaller than the 2D radius of the axes - if it's OK to make it larger, near the outer transform circle, then it'll work just fine at the origin, and look good to boot! (you can drop the glPushMatrix(), glPopMatrix(), glTranslate(0,0,size), and just drawcircball at something larger than 1.0f * size - see attached)

This is my first patch submission, so my apologies if anything is wonky about it! Would MUCH appreciate any help on fixing the issue listed above. Thanks!

Event Timeline

Moving back the circle at the center (removing the translation), I don't get any of the issues with selection that you described. It just picks whatever axis/line/circle is closest.

I've committed the patch with that modification, I'll ask others to confirm whether or not they get the same problem as you did.

Thanks

Seems fine to me, I'll close this, if people find the bug, they can report it :)

Matt Ebb (broken) changed the task status from Unknown Status to Unknown Status.Dec 3 2009, 5:27 AM