View Full Version : removing missing procedural maps.....
3rd Dimentia 06-03-2009, 05:19 AM I need to remove a bunch of missing procedural maps from a few scenes that were made in an older version of max. The plugin is listed as blendmodes_max9.dlt. Now for a start, I can't find what the plugin is listed as inside the material editor. Apparently it's loading in max 2008 but there is no plugin lsted in the material editor called that.
I have managed to collect an array of all the "Missing_TextureMap" classes with the getClassInstances. But I'm stumped as to how I can go any further with this. All I need to do is remove them.
Anyone got any tips as to where I need to head next? Or another path I can head down to solve this?
Cheers,
Cg.
|
|
Maybe you can do a search on the dependent nodes or other dependencies to figure out which nodes they apply to. If you have the nodes, you can easily traverse the material tree of that node, removing/replacing the materials. In theory, but haven't tried it myself...
-Johan
magicm
06-03-2009, 09:01 PM
Something along these lines should work:
-- Collect all instances of the "Missing_TextureMap" class. The asTrackViewPick causes the function
-- to return trackViewPick values instead of the actual instances. trackViewPick values allow you to
-- get the owner/parent of the object which in turn can be used to assign a new value.
inst = getClassInstances Missing_TextureMap asTrackViewPick:true
#(TrackViewPick:"Some Missing TextureMap")
-- Assign a new value to the subanim (check the docs on "trackViewPick" for more info on this value)
inst[1].client[inst[1].subNum].value = undefined
This only replaces the first instance, simply place inside a loop to traverse all instances.
Hope this helps,
Martijn
I'm trying to do the same here, except its just one map, and its nowhere to be found ;)
first try was:
tex = GetClassInstances missing_texturemap
arr = refs.dependents tex
with the results
#(Map #4161:Missing TextureMap)
undefined
Am i missing something? This seems like the obvious way to find a map thats causing a plugin exception?
I tried your version with the results of
#(TrackViewPick:"Diffuse map", TrackViewPick:"Diffuse map")
-- Error occurred in anonymous codeblock; filename: ; position: 0
-- Unable to convert: undefined to type: Float
Any thoughts?
ZeBoxx2
06-05-2009, 05:45 PM
you'll want to use:
refs.dependents tex[1], as refs.dependents returns an array of the results, and you're looking at getting the first (and in your case, only) one.
If you're using the trackViewPick, you can also use the trackviews methods to zoom in on it in a track view if you prefer to work with it manually.
semi on-topic: if you get a missing plugin error and getClassInstances isn't yielding anything, check the Scene States; it might be stuck in one of those.
3rd Dimentia
06-09-2009, 03:11 AM
Thanks guys, I ended up using a combination of the refs.dependents and asTrackViewPick options.
Cheers,
Cg.
CGTalk Moderation
06-09-2009, 03:11 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.