algorithmic modeling for Rhino
Hi All,
I would like to ensure that my custom components can't be copied, by the user selecting the component and using crtl+C.
As far as I can tell I can't stop this behavior by override the GH_ObjectResponse of the component, so how can I implement this code?
Many thanks!
Tags:
Are you doing this in Visual Studio?
There is no difference programmatically between adding a component from the clipboard, or by merging files, or by placing a new one on the canvas. What you can do is handle the method that gets called when a component is added to a document, then see if that document already contains another component like it and disable the new instance.
Do you not want people to have more than one instance of the same type of component, or are they allowed to add multiple components, as long as they don't share some sort of state?
Oh I see, you're not worried about one of your components being copy+pasted, you just don't want its serialized data ending up in the clipboard? Why? Do you also not want your component to be included in the gh/ghx file? Because that's exactly the same thing.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by