Locked alembic in a reference LOP

   2013   3   0
User Avatar
Member
2 posts
Joined: Jan. 2015
Offline
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?
User Avatar
Member
7758 posts
Joined: Sept. 2011
Online
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.
User Avatar
Member
2 posts
Joined: Jan. 2015
Offline
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.
User Avatar
Staff
4438 posts
Joined: July 2005
Offline
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)
  • Quick Links