Jump to content
Sign in to follow this  
Shalinar

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

Share this post


Link to post
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.

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×