Hi All,
I’m wondering if there is a way to ‘lock’ or protect the Rhino 6 Attribute User Text that is easy to implement within a script? In particular, the ‘Object Name’ is a causing a bit of a problem for me at the moment:
I have a short script and dialogue window to accept/set a series of user-determined parameters which are applied to an object and stored in Attribute User Text fields. That all works fine and in my script I can set the object name in the Attribute User Text using the line:
…
rs.SetUserText(objectInstance, ‘Object Name’, ‘%<ObjectName(“{}”)>%’.format(str(objectInstance)))
…
to ‘set’ the Object Name in the Attribute User Text properly using the script. This seems to mimic the action of the ‘Text Field’ button and selecting ‘Object Name’ from the list. So if the name is updated in the ‘Properties’ it auto-updates in the Attribute User Text which is good.
The problem comes later on, as the user is working away and the Attribute User Text panel is there, it’s easy to accidentally try and rename the Object through the Attribute User Text panel, rather than back on the ‘Properties’ panel. This then breaks the link and causes problems down the line…
So, is there any easy way to ‘lock’ or ‘protect’ the Attribute User Text from accidental overwriting? I’d like the user to be able to see the params as they work, just not be able to (try and) overwrite the object name through the panel - only through the pop-up dialog that I’m writing or on the Properties dialogue.
Any thoughts on how to implement such a protection are much appreciated!!
thanks,
-Ed