|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
| Reach & Pull exposed in ORSDK or Python?
|
|
|
So in the Character Settings pane you’ve got all sorts of goodies to help you with your solve. Are any of the Reach or Pull sliders exposed in the SDK or in Python? It doesn’t look like it ... :-(
|
|
|
|
You can access the Reach properties per effector this way:
from pyfbsdk import *
lEffector = FBFindModelByName("LeftWristEffector")
IKReachTProperty = lEffector.PropertyList.Find('IK Reach Translation')
IKReachTProperty.Data = 50
I am changing the value to 50 in this Python example.
The Pull property is missing from Python but it is available in the OR SDK FBCharacterManipulatorCtrlSet class.
This has been logged as an issue.
Thanks!
|
|
|
|
I guess I’m just dumb? The above code doesn’t work in 2009. I keep getting the error
AttributeError: ‘NoneType’ object has no attribute ‘PropertyList’
so apparently FBFindModelByName is finding anything named “LeftHandEffector”?
|
|
|
|
Hey again,
A couple of things:
#1. Make sure you have a Character with a Control Rig in the scene. I used the tutorials/mia_characterized sample file and created the default Control Rig for her to test this. Make sure you can select LeftWristEffector
#2. You can also find the Pull settings in Python - they live in the Property List of the Character:
from pyfbsdk import *
lEffector = FBFindModelByName("LeftWristEffector")
IKReachTProperty = lEffector.PropertyList.Find('IK Reach Translation')
IKReachTProperty.Data = 50
lCharacter = FBSystem().Scene.Characters[0]
HeadPullProperty = lCharacter.PropertyList.Find('Head Pull')
HeadPullProperty.Data = 50
So, sorry for the incomplete/incorrect answer yesterday and hopefully you can actually run this code with the sample file. I am also testing in 2009 for this.
Please let me know if you can make it work?
Thanks!
|
|
|
|
Still can’t make it work!
I’ve plotted to a control rig and selected the LeftWristEffector. All’s well there.
But if I do this:
for foo in lEffector.PropertyList:
print foo.Name
The resulting list doesn’t contain “IK Reach Translation”, which jives with the new error message I was getting:
Traceback (most recent call last):
File “X:/Apps/Tools/Blade/User/SP/Scripts/Python-Dev/plot_test.py”, line 11, in <module>
IKReachTProperty.Data = 50
AttributeError: ‘NoneType’ object has no attribute ‘Data’
|
|
|
|
raitch,
How about IK Effect Pinning?
Thanks,
|
|
|
|
|
|