Isotropix Forums

Can't Get UI Objects

Clarisse Scripting related topics

Can't Get UI Objects

Unread postby will_wilson » Wed Jun 02, 2021 4:29 pm

The code I've previously been using to get UI objects

Code: Select all
widgets = ix.api.OfObjectArray()
ix.application.get_factory().get_all_objects("WidgetImageView", widgets)


seems to have stopped working in Clarisse 5 using Python 3. After running the above the "widgets" array is empty. The same is true if I try to get "Widget3dView" or "WidgetTextureView". The above code still works with scene objects such as "Image" or "Geometry". Has the method of access UI objects changed in Clarisse 5?
will_wilson
 
Posts: 4
Joined: Wed Feb 19, 2020 4:15 pm

Re: Can't Get UI Objects

Unread postby anemoff » Wed Jun 02, 2021 4:36 pm

Hi,

Since Clarisse 5.0 widgets have their own dedicated root "widgets:/".
Please read the following documentation: https://clarissewiki.com/5.0/sdk/api_ch ... cial_roots

You should use:
Code: Select all
ix.application.get_factory().get_widgets_root().get_all_objects(...)


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

Re: Can't Get UI Objects

Unread postby will_wilson » Wed Jun 02, 2021 4:45 pm

Thank you. That seems to do the trick.
will_wilson
 
Posts: 4
Joined: Wed Feb 19, 2020 4:15 pm


Return to Scripting