still a little 'bug' setEuler in 2.28c

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
Posts: 33
Joined: Wed Oct 16, 2002 9:46 am

still a little 'bug' setEuler in 2.28c

Post by xand »

in 2.28c (cvs from this morning), there's still a little bug in setEuler.
it works great with values in direct - ob.setEuler(1,2,3)
but this script returns the 'three float argument' :


i know it's not a real bug but it's a bit anoying to make string conversion for this kind of thing


Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv »

Maybe not a bug, but at least an inconsistency. As a quick hack-around, in setEuler(), you can change the PyArg_ParseTuple code to accept a tuple of 3 floats. Something like this:

Code: Select all

    if (!PyArg_ParseTuple (args, "(fff)", &rot1, &rot2, &rot3))
        return (PythonReturnErrorObject (PyExc_AttributeError,
                "expected tuple with three floats "));
There is a similar thing going on with get/setLocation().

Post Reply