Way to lock component definition
-
I am trying to find a way to lock a definition of a component, so that the end user can move an instance of it, but not modify the contents.
Is this possible, assuming the plugin will always be installed?
-
I guess you can monitor the active entity path and close the instance when the user tries to open it..?
-
@thomthom said:
I guess you can monitor the active entity path and close the instance when the user tries to open it..?
That would need the end user to have loaded your script - so disabling it makes it editable anyway ?
-
@cjthompson said:
assuming the plugin will always be installed?
@thomthom said:
I guess you can monitor the active entity path and close the instance when the user tries to open it..?
I thought of that, but there are still plugins that can modify a definition without having to go into edit mode.
Another idea I had was to save the component to a temp file, and then reload it, but that might be really slow. Which leads me to another question: Is there any way to load a component from a file twice? Whenever I've tried it, it doesn't create a new definition, it just ignores the command.
-
@cjthompson said:
I thought of that, but there are still plugins that can modify a definition without having to go into edit mode.
Have you tried locking all the entities inside the definition?
-
@thomthom said:
@cjthompson said:
I thought of that, but there are still plugins that can modify a definition without having to go into edit mode.
Have you tried locking all the entities inside the definition?
How do you do that?
-
hmm.... I thought you could lock any entity... but looking at the API - it'd appear only groups and instances can be locked...
Advertisement