## Get Kinematics Information

General Discussion about Isotropix and CG related topics

### Get Kinematics Information

Hi,

I have an issue of getting kinematics information here.
I tried to solve it by the link.
( viewtopic.php?f=21&t=3504&p=14395&hilit=rotation#p14395 )
But I got different translate and rotation values from the data in Maya(mel: xform, xform -q -ro) by clarisse API: extract_translation, compute_euler_angles.
Can I get a solution for two elements from API?
tdsj4571

Posts: 7
Joined: Wed Apr 17, 2019 8:22 am

### Re: Get Kinematics Information

Hi,

Tell us a bit more. What do you want to achieve?

Cheers
Démian
Isotropix
Technical Artist - Clarisse Specialist

dboude

Posts: 1206
Joined: Mon Jul 03, 2017 10:51 am

### Re: Get Kinematics Information

Hi,

for example,
In Maya, I could get what I want: 199.626257 94.375322 198.365088
but in Clarisse, I couldn't: -17.6580270966 -85.6751926069 16.2331687039
Isn't there any ways for solving it?
tdsj4571

Posts: 7
Joined: Wed Apr 17, 2019 8:22 am

### Re: Get Kinematics Information

Ok,

Try this :

#### python code

```obj = ix.get_item("project://scene/Rotate_Cube/pCubeShape1")# Move to frame N to get values at that time (or you can disable this line to alway get values at the current frame)ix.set_current_frame(0) # Get Clarisse transformobj.get_attribute("pivot_mode").set_long(0) # "Use matrix"rotate = obj.get_attribute("rotate")print "Clarisse rotate: (" + str(rotate[0]) + ", " + str(rotate[1]) + ", " + str(rotate[2]) + ")" # Get Alembic transformobj.get_attribute("pivot_mode").set_long(1) # "Use Attributes"rotate = obj.get_attribute("rotate")print "Alembic rotate: (" + str(rotate[0]) + ", " + str(rotate[1]) + ", " + str(rotate[2]) + ")" # Revert pivot mode to remove the override (if the alembic is referenced)obj.get_attribute("pivot_mode").revert()
```

Let me know if it works.

Cheers
Démian
Isotropix
Technical Artist - Clarisse Specialist

dboude

Posts: 1206
Joined: Mon Jul 03, 2017 10:51 am

### Re: Get Kinematics Information

Attribute Error is occurred..!

Message
> error: AttributeErrorerror: : error: 'NoneType' object has no attribute 'set_long' error
tdsj4571

Posts: 7
Joined: Wed Apr 17, 2019 8:22 am

### Re: Get Kinematics Information

Hi,

Sorry, I haven't explained. This script returns the rotation of an object contained in an alembic reference. You have to replace the path of the object in the first line.

Cheers
Démian
Isotropix
Technical Artist - Clarisse Specialist

dboude

Posts: 1206
Joined: Mon Jul 03, 2017 10:51 am