Page 1 of 1

Can't Get UI Objects

Unread postPosted: Wed Jun 02, 2021 4:29 pm
by will_wilson
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?

Re: Can't Get UI Objects

Unread postPosted: Wed Jun 02, 2021 4:36 pm
by anemoff
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,

Re: Can't Get UI Objects

Unread postPosted: Wed Jun 02, 2021 4:45 pm
by will_wilson
Thank you. That seems to do the trick.