PDA

View Full Version : Checking for installed/loaded plugins


Aearon
02-18-2006, 07:07 PM
I could neither find this in the manual nor doing a search around here.. is there a way to check for installed/loaded (c++) plugins using maxscript?

Bobo
02-19-2006, 01:34 AM
I could neither find this in the manual nor doing a search around here.. is there a way to check for installed/loaded (c++) plugins using maxscript?

Don't think you can get the data found in File>Summary or the Plugin Manager.
But if you know what classes a plugin is implementing, you could check the .classes property of the corresponding superclass to see if it is there or not.

For example

findItem modifier.classes edit_poly

returns 95 on my machine, meaning that the array of modifier classes contains the class edit_poly.

findItem modifier.classes edit_poly > 0

will return true if the class edit_poly is present on the system (Max 7 and higher), or false if not.

You can do the same with

GeometryClass.classes
Helper.classes
Light.classes

and so on...

Aearon
02-19-2006, 01:51 AM
that's something new, thanks for stopping by bobo

but, i need this for kees' helium plugin, which is a rolloutControl (the constructor is 'schematiccontrol'

now if i just evaluate 'classof schematiccontrol' i get 'Value'

this code returns "RolloutControl"

rollout test "test"
(
schematiccontrol bla

)

superclassof test.bla

only rolloutcontrol doesn't seem to have a classes property

can you maybe think of a way to solve this for this case?

Aearon
02-19-2006, 01:55 AM
mh i guess i could just do something like

schematiccontrol != undefined

Bobo
02-19-2006, 04:38 AM
Edit: Yep, check against undefined

CGTalk Moderation
02-19-2006, 04:38 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.