PDA

View Full Version : Remove "lost" plugins


RustyKnight
07-15-2008, 01:51 AM
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

ZeBoxx2
07-15-2008, 03:44 AM
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 =====\r\n"
for c in classes do (
local instances
try (
instances = getClassInstances c
)
catch (
format "Could not run getClassInstances for class: %\r\n" c
continue
)

for inst in instances do (
local deps
try (
deps = refs.dependents inst
)
catch (
format "Could not run refs.dependents for instance: %\r\n"
continue
)
format "Instance: %\r\n" inst
try ( format "Name: %\r\n" inst.name ); catch ()
format "Dependents:\r\n"
for dep in deps do (
format " %\r\n" dep
)
)
)
format "===== END REPORT =====\r\n"


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.

RustyKnight
07-15-2008, 05:16 AM
Hay man! Thanks for that...now I just need to figure out how to untangle the mess ;)

Cheers
Shane

RustyKnight
07-15-2008, 08:13 AM
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

ZeBoxx2
07-15-2008, 12:46 PM
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?!

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 :)

RustyKnight
07-16-2008, 12:33 AM
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

ZeBoxx2
07-16-2008, 12:48 AM
gotcha... although a CA block shouldn't make max complain about missing plugins, itself, it may be referencing a plugin somewhere inside it.


mat = meditmaterials[activeMeditSlot]
numCAs = custAttributes.count mat
for i = 1 to numCAs do (
custAttributes.delete mat i
)

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 :)

Edit: Whoops.. font went whack in my post. Ayee, it's doing it again. 'll leave it be :banghead:

RustyKnight
07-16-2008, 01:03 AM
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

ZeBoxx2
07-16-2008, 01:21 AM
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...
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 :)

Right now, I say, screw, re-map 'em ;)
That's always an option - I hope the materials are simple :) If not..do you have a minion? ;)

RustyKnight
07-16-2008, 01:49 AM
If not..do you have a minion? ;)Yeah, ME...:P

CGTalk Moderation
07-16-2008, 01:49 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.