Isotropix Forums

Get kenimatic world path of abc mesh

Clarisse Scripting related topics

Get kenimatic world path of abc mesh

Unread postby qinyao » Wed Jan 15, 2020 12:14 pm

Hi, friends,
I import a abc mesh which exported from maya including groups, how can I get the parent/child full structure path by script? I found this path in hierarchey view, just wanna know how to get this variable.
qinyao
 
Posts: 82
Joined: Fri Aug 26, 2016 11:29 am

Re: Get kenimatic world path of abc mesh

Unread postby anemoff » Wed Jan 15, 2020 1:49 pm

Hi,

You can use the ModuleSceneItem API, like this:

py code

obj = ix.get_item('path/to/item')
mod = obj.get_module()
if mod.is_kindof(ix.api.ModuleSceneItem.class_info()):
print mod.get_kinematic_full_name()
else:
ix.log_error('Error: {} is not a SceneItem, it has no kinematic hierarchy.'.format(obj))


Result example:
Code: Select all
world://Trex_TREX/Trex_TrexMod/Trex_HeadGrp/Trex_skullShape

Is this what you are looking for?

Cheers,
Anthony Nemoff
Isotropix
R&D Engineer
User avatar
anemoff
 
Posts: 247
Joined: Wed Jan 13, 2016 10:10 am

Re: Get kenimatic world path of abc mesh

Unread postby qinyao » Thu Jan 16, 2020 2:43 am

Exactly what I want! Thank you!
qinyao
 
Posts: 82
Joined: Fri Aug 26, 2016 11:29 am


Return to Scripting