Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / Add Camera Switcher to Relation Constraint
  RSS 2.0 ATOM  

Add Camera Switcher to Relation Constraint
Rate this thread
 
23522
 
Permlink of this thread  
avatar
  • mondog
  • Posted: 02 March 2009 01:55 PM
  • Total Posts: 27
  • Joined: 24 May 2007 12:39 PM

Hi,

I’m trying to add the camera switcher to a relation constraint without success in MB 2009. I can do it via the gui but when doing it via python, nothing happens:

#The relations constraint:
mConstraintRelation FBConstraintRelation'Test' )
mCamSwitcher FBFindModelByName ('Camera Switcher')
mCamSwitchBox mConstraintRelation.SetAsSourcemCamSwitcher )

If i try to set the box position, MB asserts and quits.

mConstraintRelation.SetBoxPosition(mCamSwitchBox10030)

Is there something i’m missing?

Thanks
Mondo



Replies: 0
avatar
  • CPaulin
  • Posted: 04 March 2009 10:17 AM

Hi, This seem to be a bug…

By trying this :

from pyfbsdk import *
mConstraintRelation FBConstraintRelation'Test' )
mCamSwitcher FBFindModelByName ('Camera Switcher')
mCamSwitchBox mConstraintRelation.SetAsSourcemCamSwitcher )
if 
mCamSwitchBox:
    print 
mConstraintRelation.GetBoxPosition(mCamSwitchBox)
else:
    print 
"Error: Box not created"

I realised that mb doesn’t create a box and return None…
This is logged as Bug #324075
(Python) Relation Contraint,Box Creation from camera switcher does not work



CHARLES PAULIN | SQA AUTOMATION ANALYST
AUTODESK Media & Entertainment

Replies: 0