[Closed] Remove "lost" plugins
Hi Guys! I did a quick search, but didn’t turn up anything on the subject…
Essentially, I need to remove the references to any “old” plugins in a file.
We were doing a project in 8 and moved up to 9, but an old plugin in 8 has attached itself to some elements of the file and is causing us no end of headaches now.
Any ideas, appreciated
Shane
try something like this…
str = stringStream ""
apropos "missing" to:str
str = str as string
classApropos = (filterString str ":")
classNames = for c in classApropos collect ( (filterString c " ")[1] )
classes = for c in classNames collect ( execute c )
format "===== START REPORT =====
"
for c in classes do (
local instances
try (
instances = getClassInstances c
)
catch (
format "Could not run getClassInstances for class: %
" c
continue
)
for inst in instances do (
local deps
try (
deps = refs.dependents inst
)
catch (
format "Could not run refs.dependents for instance: %
"
continue
)
format "Instance: %
" inst
try ( format "Name: %
" inst.name ); catch ()
format "Dependents:
"
for dep in deps do (
format " %
" dep
)
)
)
format "===== END REPORT =====
"
It should essentially report all instances* of plugins that are ‘missing’ (i.e. the plugin referenced in the scene is not installed), and give you some information on what is referencing it.
- getClassInstances unfortunately does not return 100% of all possible references, but it should get you most of the way there.
If the above does not help… what’s the plugin? What type of plugin is it, etc.? Would give more of a hook into writing something more specific.
Hay man! Thanks for that…now I just need to figure out how to untangle the mess
Cheers
Shane
Okay, I’ve been able to identify that a plugin has attached “something” to our vray materials and is causing use the missing plugin problems…what I don’t know is how to remove it?!
Cheers
Shane
What’s the output for one of those look like?
Is there anything odd about the material’s display in the material editor? (i.e. a rollout that’s not normally there, or perhaps it’s just a ‘missing’ submap?) What about Track View? If you use “showproperties meditmaterials[activemeditslot]” while the material is selected in medit, does that print out any properties that are normally not there?
This is really the kind of thing where you’ll want a scripter to take a direct look at the file to poke at it more closely
Okay, in max 8, the plugin (sorry for vaugness, but the plugin has been provided by our client so I don’t want to say to much) adds a rollout to the VRayMtl, adding custom material attributes.
Now, obviously, when we hit max 9, we get a “Missing Material/Map” rollout in its place…
There doesn’t appear to be anything new in the properties lists, but I did find an entry in the track view … one step closer …
The item appears in both max 8 (as the named plugin) and max 9 as Custom Attribute…now all I need to know is how to kill it >)
Back to the docs…
Thanks for the ideas…!
Shane
gotcha… although a CA block shouldn’t make max complain about missing plugins, itself, it may be referencing a plugin somewhere inside it.
mat = [b][b]meditmaterials[activeMeditSlot][/b][/b]
numCAs = [b][b]custAttributes[/b][/b].[b][b]count mat[/b][/b]
for i = 1 to numCAs do (
[b][b] custAttributes[/b][/b].[b][b]delete mat i
)
[/b][/b][font=Verdana] Should get rid of any and all custom attribute blocks on the currently selected (in the material editor) material.
You can have it run on all your materials as well, etc. All the necessary info should be in the Custom Attribute topics [/font][b][b]
Edit: Whoops… font went whack in my post. Ayee, it’s doing it again. ‘ll leave it be :banghead:
[/b][/b]
You know what, that’s what I thought, but nope, it doesn’t work…numCAs = custAttributes.count mat returns 0, actually, it returns 0 on all the effected shaders…
Right now, I say, screw, re-map ’em
Shane
Might be on the base object… or somewhere else on the material somewhere (the parent node in the trackview tree)… without a direct look from somebody – difficult to tell
That’s always an option – I hope the materials are simple If not…do you have a minion?