Creating A Marker or “Helper”
Creating a simple marker in MotionBuilder using Python scripting.
So here was a script that took some time for me.
Changing the Look of the marker through Python had me stumped (luckily I had a friend
who could help).
Changing the color of the null/model was a long and exhausting process. There was a lot of google searching as well as tons of trial and error in trying to get Python to set the color. Finally I solved it on my own and it felt great!
The biggest thing I learned through this Python exercise was how to list out a model’s properties within the MotionBuilder Python Editor. This opened up a lot for me. The bit of code to list a models properties starts on line 12.
Another note is that below (in the codes comment) I added all the visuals for the Marker. You can read the “visual guide” and change the marker to visually fit your needs.
from pyfbsdk import * #Creat our "marker" and names it 'VicMarker' marker = FBModelMarker('VicMarker') #Set our Marker to be visible marker.Show = True #Set the size of the marker marker.Size = 1000 #List all poperties for "marker" so we can see what we want to set up for property in marker.PropertyList: # The following name can be used to obtain a property in FBComponent.PropertyList.Find(<name>) print property.Name #Set the "Look" property of the marker, the end # is the visual stle. See list below to find numeric values for each visual style marker.PropertyList.Find('LookUI').Data=1 # visual style values # 0 = Cube # 1 = Hard Cross # 2 = Light Cross # 3 = Sphere # 4 = Capsule # 5 = Box # 6 = Bone # 7 = Circle # 8 = Square # 9 = Stick # 10 = None # 11 = Rigid Goal # 12 = Rotation Goal # 13 = Aim/Roll Goal #Set the color value for the marker marker.Color = FBColor(0,1,1)
I hope this helps.
Where I can find parametr, for marker to made him transparency like in control rig?
That I don’t know, the Control rigs are heavily scripted so that maybe a question for the MotionBuilder Forum or maybe creating a Shader that has oppacity set to 70%.
The Easiest answer would be either to use X-ray (Ctrl+A) or switch the type of maker you are using.
# Bone Marker Style
marker.PropertyList.Find(‘LookUI’).Data=6
I there a way to have the “marker” as a hard cross by default instead of always selecting the marker (cube) and going into properties and manually changing to hard cross everytime?
I always use hardcross, would be great if I could make it the default
Thanks
Brad
You could create a script to do that, execute it by dragging it into your scene assign it to a short cut key. 🙂
As for “set by default”, not to my knowledge.