On 10/07/2015 at 07:45, xxxxxxxx wrote:
I'm still not sure, I understood your request completely. In the following I assume, you are familiar with the Py-RoundedTube example and its code.
I'll describe the steps to add a free handle to this example, which delivers a Vector offset from object center.
For A) :
In function GetHandle() :
- for the new handle set info.type to c4d.HANDLECONSTRAINTTYPE_FREE
- for info.postion simply set your offset value (most likely from your offset description)
- info.direction can be set to c4d.Vector(0.0, 0.0, 0.0), it's not needed
In function SetHandle() :
Here you get the new position on handle movements. Simply store the given new position p in your object description.
In Draw() :
Actually nothing to do, assuming you want your handle drawn as a simple dot.
And that's already it.
Now, for b) : This one I still don't understand. Do you describe a second handle here? Or is it another mode for the first handle (not sure how one would achieve this)? And maybe it's a translation issue, but "move the handle in to extend direction"... I have no idea, what you mean. Sorry. I think, a screenshot with a few quick brushstrokes, showing who you want to move where, could help me. If you have problems adding such to a forum post, you could still mail it to sdk_support.