Message 1 of 1
Control Constraint Priority Programmatically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In my plugin I need to change constraint priority, the only info I found about this is here:
However it seems like there is no way to do this programmatically (either C++ or python).
I tried to do a test by moving the last constraint to the first position however this is not allowed
import pyfbsdk
scene = pyfbsdk.FBSystem().Scene
# Test, try to put the last constraint in the list in the first position
constraints = scene.Constraints
myConstraint = constraints.pop()
constraints.insert(0, myConstraint)
# Returns the following error:
# Traceback (most recent call last):
# File "<string>", line 1, in <module>
# NotImplementedError: can only insert at the end of a property list
Is there any way to do this? Obviously you can do in the navigator, however I did not see any way of doing it in my plugin...
Any help would be appreciated.