[Closed] how to delete a scripted plugin
Hi
I have a simple scripted plugin that i was testing out and now i have copied the code i wanted from the test one to mine that i want to keep so i now what to delete the temp scripted plugin and i cant see a way of doing it?
dont know if it makes a difference but it is a scripted helper plugin.
Thanks
Dave
Once you’ve created an instance of the plugin in memory, it seats there until you restart 3ds Max.
arg dam it, i tried that but i had the test plugin in the depot that gets automatically read in during max boot so it automatically read the test plugin in again, my fault
Removing it from that depot works exactly as you suggest
Thanks
Dave
thanks for the help but i have another question about good way to structure plugins
I have the plugin definition saved as for example rotHlpr3D.ms and the plugin defined as
plugin Helper rotHlpr3D
which means i can then script the helper creation with
rotHlpr3D()
but this is in global scope? I want this to be in a stuct so i can make sure im calling my specific plugin, but adding a plugin inside a struct with rotHlpr3d() after the definition seems a bit weird.
Is this normal practice or am i missing something?
Thanks
Dave
Edit:I guess it doesent matter if it is in global scope because as long as the classID is unique and the script fileIn`s to max then the funcion call will definitely be a uniqe name as well right?
You can put it inside a struct, the classID has to be unique eitherway. As for the class name itself – doesn’t matter, you can make another Teapot class if you’re into that kind of thing (that wouldn’t work in global scope):
struct pluginContainer
(
private Teapot = plugin Helper Teapot -- it's a Teapot! ... or is it?
name:"Teapot Impostor"
extends:Dummy
classID:#(0xBAADC0DE, 0xBAADC0DE)
invisible:true
replaceUI:true
(
parameters main rollout:params
(
size type:#float ui:spnSize default:5.
on size set val do delegate.boxSize = Point3 val val val
)
rollout params "Settings"
(spinner spnSize "Size" type:#worldUnits)
);,
public fn createHelper size = Teapot size:10
)
mpc = pluginContainer()
testHelper = mpc.createHelper 10
(classOf testHelper) size:20 prefix:"Gotcha" -- any user can always create more 'Teapots' this way, though
thanks for the reply
I guess what I was asking is it worth it to put it into a struct or is it common practice to do this?
Im also getting some odd errors when doing this so i missing something at the moment
I might consider it when you’d be creating lots of scripted primitives/helpers/modifiers that are distributed by script anyway. Other than that, I stand by the classID I used there.