Jump to content

HDAs: Lock Asset Parms


Recommended Posts

Hello,

I'm creating a digital asset publication system, and I want to be able to prevent artists from changing the asset's parameters outside of the system. So basically, I want my assets to be just like SideFX's digital assets, in the sense that you can't modify the Type Properties, you can only add spare parameters. But then when they use my "Modify" button, the Type Properties dialog unlocks and they can edit the base definition. Then "publishing" the asset re-locks the Type Properties. How can this be achieved? I immediately went to hou.hda.setSafeguardHDAs(), but that makes it so NO asset can be modified; I just want our custom assets to be modified through the new system.

Chris

Link to comment
Share on other sites

The usual method to prevent modifications would be through the use of file permissions on your repository files:

A normal tool that artist would be using should be coming to them from a read only file that is created/managed by your tool system.  Since the file has no write permissions artists are not able to make changes to it (think SESI otls that exist inside $HFS, you can't modify these by default because they are read only).  When you hit your "Modify" button your system would make a local copy of that otl to the users work directory and the file would have write permissions so they'd be able to add/update/remove the contents and parameters.  You'd then "Publish" the tool back to your system, removing their local copy and creating a new, read only copy that artists would then pick up.

Link to comment
Share on other sites

2 hours ago, graham said:

The usual method to prevent modifications would be through the use of file permissions on your repository files:

A normal tool that artist would be using should be coming to them from a read only file that is created/managed by your tool system.  Since the file has no write permissions artists are not able to make changes to it (think SESI otls that exist inside $HFS, you can't modify these by default because they are read only).  When you hit your "Modify" button your system would make a local copy of that otl to the users work directory and the file would have write permissions so they'd be able to add/update/remove the contents and parameters.  You'd then "Publish" the tool back to your system, removing their local copy and creating a new, read only copy that artists would then pick up.

I forgot all about just doing it through the OS permissions, got my head too deep in HOM :rolleyes: Thanks Graham!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...