Isotropix Forums

How to create a PyQt Context Browser?

Clarisse Scripting related topics

How to create a PyQt Context Browser?

Unread postby mhamid3d » Fri Feb 07, 2020 7:14 pm

I am trying to create a context browser to use with a PyQt application. When I even try to access the class I get an error that GuiBrowser does not exist:

Code: Select all
browser = ix.api.GuiBrowser()

>>> Traceback (most recent call last):
>>>  File "<string>", line 3, in <module>
>>> AttributeError: 'module' object has no attribute 'GuiBrowser'


This also brings up a point that a lot of the classes in the Clarisse SDK seem to throw errors that they do not exist. Is there some workflow I'm missing here?
mhamid3d
 
Posts: 8
Joined: Wed Dec 04, 2019 5:20 pm

Re: How to create a PyQt Context Browser?

Unread postby anemoff » Tue Feb 11, 2020 4:24 pm

Hi,

Sorry but GuiBrowser is not available in Python. However, there are built-in helpers to workaround this voluntary limitation.

If you just want to show a context browser and get the selected context, check this other topic: viewtopic.php?p=22632#p22632

Note that there is a variant "pick_contexts" if you need to select multiple contexts.
See documentation here: https://www.clarissewiki.com/4.0/sdk/cl ... b7cc5a55ec

For information, currently, Python bindings are not 100% complete compared to the C++ API. We have chosen to not expose all C++ classes in Python, yet, because some C++ APIs need polishing and/or simplifications to be more Python friendly and simpler once exposed.

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


Return to Scripting