Page 1 of 1

Changing path of reference crash Clarisse

Unread postPosted: Tue Feb 09, 2021 6:11 pm
by sylvainberger
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?

Re: Changing path of reference crash Clarisse

Unread postPosted: Wed Feb 10, 2021 9:27 am
by dcourtois

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/")

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 ?)