検索 - User list
Full Version: Locked alembic in a reference LOP
Root » Solaris and Karma » Locked alembic in a reference LOP
Leire Foguez
Hi,

I have a scene with a reference LOP that references an alembic file. While the scene is opened, I cannot overwrite the alembic file, as expected. But even when I close that scene, the alembic file cannot be overwritten. It can only be overwritten once Houdini is closed.

I have tried the same with usdview, having a usd with a reference to an alembic. While the usd file is open I cannot overwrite the alembic, but once I change the usd file to a new one, I can overwrite the alembic file.

Is there any way to unlock the alembic file without closing Houdini?
jsmack
Leire Foguez
I have a scene with a reference LOP that references an alembic file. While the scene is opened, I cannot overwrite the alembic file, as expected. But even when I close that scene, the alembic file cannot be overwritten. It can only be overwritten once Houdini is closed.

I don't know about referencing alembic, but I noticed when I reference USD the lock is removed when the referencing node is deleted. Maybe that will work for alembic as well? Loading alembic in sops usually requires closing Houdini to release the lock. Locking alembics when read in sops may be a windows-only thing.
Leire Foguez
Even when I remove the reference LOP, the alembic is still locked.
In sops I can close the scene, disable the node or delete the node to release the lock.
mtucker
Using low level Sdf Layer muting seems to allow this to work fairly robustly:
n = hou.node("/stage/sublayer1")
# Bypass the node loading the alembic and force it to recook
n.bypass(True)
n.stage()
l = Sdf.Layer.FindOrOpen("/path/to/alembic.abc")
# SetMuted seems to throw an exception, even though it appears to work properly...
try:
    l.SetMuted(True)
except:
    pass

# Copy the new file over /path/to/alembic.abc using shutil or whatever...

# Unmute the layer (now with new contents), and unbypass the node so it will
# recook again next time it is asked for its stage.
l.SetMuted(False)
n.bypass(False)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB