Select all path-missing VrayProxy objects?

Is there a way to just select all Vrayproxies (which are missing path) in the opened scene?

Sometimes, empty VRayproxy causes crashing error in 3ds Max when rendering with MultiScatters, and they're nowhere to be found on projects folders. So it's easier to just select all of them, manually check those missing/empty VrayProxies and delete from the scene.

There's old script called Vrayproxies Manager in here but it's too old, >10 years ago and no longer works, the interface looks neat though (scriptspot.com/3ds-max/scripts/vrayproxies-manager)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
obaida's picture

Check This

First make sure all proxies have correct paths , then run this code .

(
	max create mode
	local temp_arr = #()
	local VPxs = getClassInstances VRayProxy
	for i in VPxs where not doesFileExist i.fileName do (
		for r in refs.dependents i where try(classof r == VRayProxy)catch(false) do appendIfUnique temp_arr r
	)
	select temp_arr ; format "%\n" temp_arr 
)
nnq2603's picture

Thanks Obaida but there's problem...

Firstly, thanks for your help and quick reply. But this one does not work on my end, at all. What version of max/vray did you run test this script sucessfully?

I tried the script on both max 2022 and 2020, 2014 (3 different Vray as well) none of that works as intended so far. The way I do was: save your code into a *.ms file and run that script.

What happened when I run the script:

It selects all proxy in the scene even they have correct path. It occurs the same way in all 3 different max instance in my PC.

All the proxy use the same network folder location with format:
\\192.168.1.250\data\ECOLIFE\Tong The Ecolife\***.vrmesh
Did that somehow cause problem?

obaida's picture

Thanks

I'm using max 2020 with vray 5 .
its Working for me even in network paths .
the script function is simple :
if the proxy.filename is exist in its path then false
so you need to check manually
select missing proxy object (in your scene)
then , F11 , write (doesFileExist $.fileName) , press enter
if true its ok , false it should be selected by the script as missing

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.