Isotropix Forums

Standlone Python and Module Paths

Clarisse Scripting related topics

Standlone Python and Module Paths

Unread postby mati » Wed Mar 18, 2020 10:27 pm

Hi. I'm trying to initialize Clarisse in a standalone interpreter like so:
Code: Select all
from ix_helper import *
create_application('/path/to/installed/clarisse/module')

I need to also include other module paths for the application to load. I tried colon-separated, semi-colon-separated, space-separated, and a list of paths, but it doesn't seem to want to accept more than one path.

Is this supported currently? Is there another way to do it?

Thanks!
mati
 
Posts: 51
Joined: Fri Apr 19, 2019 8:35 pm

Re: Standlone Python and Module Paths

Unread postby sam » Wed Mar 18, 2020 11:12 pm

You should be able to create a CoreStringVector.
Try with this:

python code

modules = ix.api.CoreStringVector()
modules.add("/path/to/module")
modules.add("/another/path/to/module")
create_application(modules)
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 1477
Joined: Fri Jan 25, 2013 11:33 pm

Re: Standlone Python and Module Paths

Unread postby mati » Thu Mar 19, 2020 12:12 am

Thanks for the quick reply Sam. A Python list of string paths might have been working, but I get this error with both a Python list and your snippet:
Code: Select all
00:00:00      128/128MB  ERROR: Failed to load library "/path/to/custom/module
                        /usd.so". Error: /path/to/custom/module/usd.so: undefined symbol: _ZTI14CoreBaseObject
00:00:00      128/128MB  ERROR: OfClassFactory.add_module: Failed to add module in '/path/to/custom/module/usd.so' library.

All I'm doing is prepending our version of usd.so before Clarisse's built-in modules. This works interactively and with cnode, but fails here. It seems like it's trying to load the USD plugin before everything else? Switching the path order obviously loads the built-in usd.so and ignores mine.

Thanks for the help.
mati
 
Posts: 51
Joined: Fri Apr 19, 2019 8:35 pm

Re: Standlone Python and Module Paths

Unread postby sam » Thu Mar 19, 2020 12:15 am

I see. Can't you remove our usd library? You custom usd module isn't suppose to run alongside ours. You should remove ours.
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 1477
Joined: Fri Jan 25, 2013 11:33 pm

Re: Standlone Python and Module Paths

Unread postby mati » Thu Mar 19, 2020 6:16 pm

Thanks Sam. I can give that a try. We can use that as a workaround for now, but we do like to not mess with the installation so that we can launch vanilla Clarisse. I often rely on it for building bug repros to report to you all. Does filing a bug for this issue sound good? I'd expect similar experiences and consistent configurations between interactive, cnode, and python standalone.
mati
 
Posts: 51
Joined: Fri Apr 19, 2019 8:35 pm

Re: Standlone Python and Module Paths

Unread postby dcourtois » Fri Mar 20, 2020 1:45 pm

Hi,

Normally you can run your own module without having to remove ours, provided the module_path to your module is the first path.
At first it reminded me of this post: viewtopic.php?f=21&t=6156 where the recent change from USD (they removed the lib prefix to their libraries) was causing some problems, but then you're on Linux, so it shouldn't matter...

It seems like the path to the Clarisse libs is not correctly set (the usd.so module depends on the ix_*.so libraries, so they must be discoverable)
Can you tell us the paths that you're using ?
User avatar
dcourtois
 
Posts: 69
Joined: Tue Jul 25, 2017 3:15 pm

Re: Standlone Python and Module Paths

Unread postby mati » Fri Mar 20, 2020 6:31 pm

Thanks. I'll follow up on the private forum.
mati
 
Posts: 51
Joined: Fri Apr 19, 2019 8:35 pm


Return to Scripting