Removing Vray missing DLL's

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 07 July 2013   #1
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?

Cheers,

D.
__________________
"i'd rather have a full bottle in front of me than a full frontal lobotomy"
 
Old 07 July 2013   #2
Just checking the obvious, but you have reassigned production, material editor and active shade renderers to use anything other than VRay?
 
Old 07 July 2013   #3
For anybody who may be interested or suggest improvements here is a snippet of code I managed to source from http://scripts.breidt.net 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 July 2013   #4
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 01:01 AM.


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