CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 07-04-2013, 06:09 PM   #1
David Venables
Freelance artist
United Kingdom
Join Date: Sep 2002
Posts: 68
Removing Vray missing DLL's

Does anybody have any idea how the Vray render embeds itself into a max scene?
I have been handed a scene setup for Vray, which I don't use and I am looking at writing a script to remove it from the scene.

I have managed to remove the usual missing maps etc but I am getting one stubborn Missing Dlls

FileName: vrender2012.dlr Class:VRayShadow Superclass:0x10D0

I have removed all the scene lights and any render elements. I have tried exporting the scene to fbx and re-importing back in. It's more out of curiosity as to how Vray embeds itself into the scene? Anybody have any useful suggestions?


"i'd rather have a full bottle in front of me than a full frontal lobotomy"
Old 07-04-2013, 09:28 PM   #2
Mike Owen
London, United Kingdom
Join Date: Nov 2004
Posts: 131
Just checking the obvious, but you have reassigned production, material editor and active shade renderers to use anything other than VRay?
Old 07-05-2013, 03:37 PM   #3
David Venables
Freelance artist
United Kingdom
Join Date: Sep 2002
Posts: 68
For anybody who may be interested or suggest improvements here is a snippet of code I managed to source from that removes / replaces missing DLL plugins. This seems to resolve my problem, hopefully this may be of use to somebody else?

Note this does not target Vray specifically, it just searches for any missing plugins and removes the dll references.

Fn ClearMissingPluginInstances = ( Local str = stringStream "" apropos "*missing*" to:str seek str 0 Local cls = #() while not (eof str) do ( Local ln = readLine str Local tk = filterString ln " " if tk.count == 4 do ( Local clsName = tk[1] try ( Local val = (execute clsName) Local sc = superClassOf val -- Alternative: check for .classID == #(-1,0) if sc==MAXWrapper or sc==node or sc==material or sc==MAXWrapperNonRefTarg do ( append cls val ) ) catch () ) ) Local c = 0 Local foundMissing = #() for j = 1 to cls.count do ( Local cc = cls[j] Local ci = getClassInstances cc if ci.count > 0 then ( for i = 1 to ci.count do ( Local myClass = classOf cc -- get current class append foundMissing myClass allClasses = myClass.classes-- get list of all subclasses for k = 1 to allClasses.count do ( if allClasses[k].creatable then -- search for useful replacement ( newInst = createInstance allClasses[k] -- create new instance of default (first) class try ( -- replace all instances (requires 3ds Max 2008+ or AVG extensions) q = replaceInstances ci[i] newInst c += 1 -- and exit for k loop exit ) catch() ) ) -- end: for k ) -- end: for i ) -- end: if ) -- end: for j if c > 0 then -- produce summary message for user ( Local str = "Replaced " append str (c as string) append str " missing plugin(s) with default objects:\n" for i in foundMissing do ( append str "\t" append str (i as string) append str "\n" ) append str "\nUSE RESULT WITH CAUTION!\nSAVE TO A DIFFERENT FILE NAME!" messageBox str title:"removeMissingPlugins v0.1" beep:true print foundMissing ) else ( messageBox "No missing plugins found" title:"removeMissingPlugins v0.1" ) )
"i'd rather have a full bottle in front of me than a full frontal lobotomy"
Old 07-05-2013, 03:37 PM   #4
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 12:44 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.