Jeff Raines

Jeff Raines

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

writing a custom lookat constraint in a python node June 20, 2013, 4:41 p.m.

I've actually been pouring over the documentation on most everything mentioned in the error report, but thanks for the advice.

writing a custom lookat constraint in a python node June 20, 2013, 4 p.m.

Im attempting to create a look-at node with a bit more control than the built in look-at constraint has. I have most of it figured out except for the actual look-at constraint part.

here's the code that's causing problems


if self_dist1 < max_dist:
lookatnode = lookat_obj
up_vec = hou.Vector3((0,1,0))

rotmat = self_node.buildLookatRotation(lookatnode, up_vec)

self_node.setCookTransform(rotmat)


and the python node I have it running in is spitting out the following error


Error: Python error: Traceback (most recent call last):
File “<stdin>”, line 41, in <module>
File “/op/hfs.current/houdini/python2.6libs/hou.py”, line 6917, in setCookTransform
return _hou.objNode_setCookTransform(*args)
OperationFailed: The attempted operation failed.
Python object is not cooking


any help would be much appreciated.

Thanks