Physics Property Joint: setting High and Low limits for XYZ rotation axis

Physics Property Joint: setting High and Low limits for XYZ rotation axis

KikoBarahona
Advocate Advocate
748 Views
1 Reply
Message 1 of 2

Physics Property Joint: setting High and Low limits for XYZ rotation axis

KikoBarahona
Advocate
Advocate

 Hello,

 

I'm looking into setting the high and low limits for a physics property Joint with Python.

So far I can get hold of the joint high and low limits from the property list, i.e.

physJoint_HighLimit = myProperty.PropertyList.Find("phys_null 0 Joint.High Limits")

 

Unfortunately I can not get or set the values using Data or Value

physJoint_HighLimit.Data()

 

Which returns

NotImplementedError: Unable to access the data for this type of property.

 I've tried .GetMax and .GetMin, but they seem unrelated (they return 100 and 0)

How does one get hold of the XYZ values for this property?

Thanks!

0 Likes
Accepted solutions (1)
749 Views
1 Reply
Reply (1)
Message 2 of 2

KikoBarahona
Advocate
Advocate
Accepted solution

Ok, missed it the other day, but doing a dir() on the handle for that Joint Physical property reveals ".Components" as the one we need to fetch individual joint links.

So you can iterate through the components (joints) and assign them the values with something like this:

myLimits = FBVector3d(50, 40, 30)
for comp in myJointPhysProperty.Components:
    comp.PropertyList.Find('High Limits').Data = myLimits

On a side note, individual phys joint links can be accessed directly by FullName as listed in the navigator, i.e.

'PhysicalProperties::mylink_01_jt 0 Joint'

Cheers!

0 Likes