Setting up object for Aim con in motionbuilder?


Hey all,

I’m trying to do something pretty simple; setting up a aim constraint with python in motionbuilder. But I can’t figure out how to set the world up object??

I found the property in the property list but can’t find any way to set it. Could anyone point me in the right direction? Below is an example of what I have been trying ( which is not working ):frowning:

con_manager = FBConstraintManager()
con = con_manager.TypeCreateConstraint(0)

con.ReferenceAdd(00, child)
con.ReferenceAdd(01, parent)

con.PropertyList.Find(‘World Up Object’).Data = world_up_object

con_manager = FBConstraintManager()
con = con_manager.TypeCreateConstraint(0)

con.ReferenceAdd(0, child)
con.ReferenceAdd(1, parent)
con.ReferenceAdd(2, world_up_object)

You need to add it via the “ReferenceAdd” method ^^^^.


I’d just figured that out, but thanks anyhow :). strange way of setting constraints up in mobu. I hadn’t looked at that before because I was using this to assign more parents:

for x in (parent1, parent2 etc):
pos = 1
pos += 1

Should of figured that out though, when noticing you can’t do ReferenceAdd( 2… to add the second parent…



Haha yeah, MotionBuilder doens’t like to always make things clear :stuck_out_tongue:

Glad you got there though!