Isotropix Forums

How to get the original object through combiner object?

Clarisse Scripting related topics

How to get the original object through combiner object?

Unread postby Alice556 » Mon May 25, 2020 4:09 pm

Hello! :)

I know how to create and set up combiner through the Python API. But for an existing combiner object (Type: SceneObjectCombiner), how to get the original object it is connected to? I spent a lot of time and did not find an Python API that can achieve this function. :(

Thank you!
Alice556
 
Posts: 2
Joined: Tue Nov 20, 2018 11:18 pm

Re: How to get the original object through combiner object?

Unread postby anemoff » Mon May 25, 2020 5:10 pm

Hi!

You need to use the API from the parent class ModuleSceneObjectTree: https://www.clarissewiki.com/4.0/sdk/cl ... _tree.html
get_base_objects() will give you the list of combined objects.

Here is an example:

python code

combiner = ix.get_item("project://scene/combiner").get_module()
base_objects = combiner.get_base_objects()
for mod in base_objs:
print(mod.get_object().get_full_name())


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

Re: How to get the original object through combiner object?

Unread postby Alice556 » Mon May 25, 2020 5:37 pm

Wow, That's it! :D Thank you, the problem is solved! Thank you very much!
Alice556
 
Posts: 2
Joined: Tue Nov 20, 2018 11:18 pm


Return to Scripting