MotionBuilder Forum
Welcome to Autodesk’s MotionBuilder Forums. Share your knowledge, ask questions, and explore popular MotionBuilder topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Parent/Child enable snap button in python

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
angelo.samson
1005 Views, 2 Replies

Parent/Child enable snap button in python

Hi 

 

I want to enable the snap button in python for motion builder 2014 is there a way to manipulate this button? Please see image below.

 

 

constraint.jpg

 

 

Thanks in advance!

 

Gelo

2 REPLIES 2
Message 2 of 3
middlek
in reply to: angelo.samson

Hi Gelo,

 

There is a property exposed called 'Snap' in the class FBConstraint. So you would first need to to find the Constraint you would like to work with and then set call Snap().

 

from pyfbsdk import *

for lComp in FBSystem().Scene.Constraints:
    if lComp.Name == "Parent/Child":
        lComp.Snap()

Hope that works for you,

 

Kristine

 

 

 

 

KRISTINE MIDDLEMISS | SENIOR MOTION CAPTURE ENGINEER
Message 3 of 3
angelo.samson
in reply to: middlek

Hi

 

This code works! Thank you so much! Smiley Happy

 

Gelo

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report