NEW: Protect Your Shelves With <readOnly/>

   4047   6   1
User Avatar
Member
133 posts
Joined: July 2005
Offline
Hey Guys;

Say you have a write-protected shelf in your production. A user goes and drags a tool onto that shelf. All of a sudden, their shelf is saved in their home dir as Default.shelf!! Now, they can't receive any updates to the shelf!

How do you stop this insanity? Side FX has graciously created a <readOnly/> tag that you can add to the .xml code. From now on, no one can muck with the shelves. They'll have to manually edit the .xml code. (Which is a more reliable way of working).

Ideally, the shelf system would be more robust so that you wouldn't have to concern yourself with this. But, it's a great workaround, methinks.
Francisco Rodriguez
Effects Animator | Walt Disney Animation Studios
User Avatar
Member
79 posts
Joined: April 2011
Offline
Any reference on how to use this tag on say a shelf or a shelf tool?
User Avatar
Staff
1450 posts
Joined: July 2005
Offline
You need to manually edit the .shelf file and if you type <readOnly/> tag within a shelf or a shelf tool xml element, that element will be unmodifiable the next time Houdini starts (since that's when it's loading the shelf file with your edit).
User Avatar
Member
79 posts
Joined: April 2011
Offline
I had tried inserting the tag but with no success… I was just wondering if there was any documentation or examples somewhere that I had missed (not the best with xml).

Anyways, got a hold of this document if anyone else is interested in HOW to do this.

Attachments:
shelfFileFormat.txt (6.7 KB)

User Avatar
Member
79 posts
Joined: April 2011
Offline
Actually the document didn't help me much either Rafal….

There were no examples of how to make a shelf uneditable. They just state that it is possible using this tag - but where to put the tag is a mystery. I've tried inserting it all over the place and I just keep getting errors.

I'm using some shelf definitions in conjunction with shelf tool definitions. Considering the following, how would I be able to make both the shelf and the shelf tools uneditable with this tag?

Shelf:

<?xml version=“1.0” encoding=“UTF-8”?>
<shelfDocument>


<toolshelf name=“HoudiniUtils” label=“Houdini Utils”>
<memberTool name=“Hou_Noah”/>
<memberTool name=“To_Nuke”/>
<memberTool name=“CIS_Mantra”/>
<memberTool name=“Studio_Mantra”/>
<memberTool name=“CIS_OpenGL”/>
<memberTool name=“Tif_to_Rat”/>
<memberTool name=“CIS_Stereo”/>
<memberTool name=“CIS_DSM”/>
<memberTool name=“STUDIO_FR”/>
<memberTool name=“Get_Proxies”/>
</toolshelf>
</shelfDocument>

Shelf tool:

<?xml version=“1.0” encoding=“UTF-8”?>
<shelfDocument>
<!– This file contains definitions of shelves, toolbars, and tools.
It should not be hand-edited when it is being used by the application.
Note, that two definitions of the same element are not allowed in
a single file. –>

<tool name=“Tif_to_Rat” label=“Tif to Rat” icon=“../pic/convert.png”>
<script scriptType=“hscript”><![CDATA]></script>
</tool>
</shelfDocument>

Any and all help appreciated.
User Avatar
Staff
1450 posts
Joined: July 2005
Offline
Upon request, the <readOnly/> tag has been backported to 12.0 from the main development branch (which will become a future release of Houdini), hence somewhat scant documentation on it. The main branch does have more extensive docs on it. This tag is available in version 12.0.650 onwards, and in all H12.1 versions since it was forked from H12.0.677. So makes sure you are using a version of Houdini where this tag is available.

In case of your shelf, you can make it non-editable like this:

<?xml version=“1.0” encoding=“UTF-8”?>
<shelfDocument>
<toolshelf name=“HoudiniUtils” label=“Houdini Utils”>
<readOnly/>
<memberTool name=“Hou_Noah”/>
</toolshelf>
</shelfDocument>


and your tool like this:

<tool name=“Tif_to_Rat” label=“Tif to Rat” icon=“../pic/convert.png”>
<readOnly/>
<script scriptType=“hscript”><![CDATA]></script>
</tool>


hope this helps,
Rafal
User Avatar
Member
79 posts
Joined: April 2011
Offline
Indeed,

Awesome and thank you!
  • Quick Links