Isotropix Forums

Changing path of reference crash Clarisse

Clarisse Scripting related topics

Changing path of reference crash Clarisse

Unread postby sylvainberger » Tue Feb 09, 2021 6:11 pm

Hi, I have made this script that changes the path of the selected references for a different version, In my case I am switching from a static asset to an animated asset. As soon as I change the filename attribute value in python, Clarisse crashes violently with a crash dump.

I have tried different approach to set the path but I always get a crash. I have tried setting the value in the attribute,
Code: Select all
attr = sub_context.get_attribute('filename')
attr.set_string(new_path, 0)


Tied using the ix.cmds.SetReferenceFilename() function, the ix.cmds.SetExpression() function...always the same crash.

Using the Path Manager and doing a find and replace works and doesn't crash...but if I copy/paste the command executed by the find and replace and put in a python script and call this script from a shelf button or a custom menu I get a crash.

I am stuck...anyone would have an idea?
sylvainberger
 
Posts: 9
Joined: Fri Jan 25, 2013 11:33 pm

Re: Changing path of reference crash Clarisse

Unread postby dcourtois » Wed Feb 10, 2021 9:27 am

Hi,

I tried to reproduce but I couldn't. I referenced a static Alembic asset, then I executed the following script:

python code

context = ix.item_exists("project://scene/cube")
ix.cmds.SetReferenceFilename([ context ], "D:/Documents/3DContent/Alembic/trex.abc")

and it worked fine (trex is animated)

Can you provide us with a bit more information ? (e.g. what version of Clarisse, what OS, and ideally a repro ?)
User avatar
dcourtois
 
Posts: 104
Joined: Tue Jul 25, 2017 3:15 pm


Return to Scripting