More Proxy ideas

Just a thought but a global or selected option for switching btwn bounding box and preview from file in the viewports.

-dave

Hi Syclone1,

Looong time reader, first time poster…

I hope this can be of some use. Two days ago I wrote two very simple scripts (if you want to call them that) to do just that. I have never wrote a script before. And probably never will again as I have basically no idea what I’m doing :sweat_smile: . Having said that…

I created a button to turn all VRay proxies to a bounding box with:

select $VRayProxy*
$.display = 0
$.boxmode = on

First line selects all proxy objects that start with “VRayProxy” (the default proxy name). Second line turns them all to bounding box. Third line is the Max version of the bounding box to make the boxes wireframe so you can see through them.

Then I created another button to turn them all back to preview by doing the opposite:

select $VRayProxy*
$.display = 1
$.boxmode = off

This is how I toggle them on and off. If someone has a better way of doing this I’m all ears…er…eyes :wink: .

Cool thanks Horizon Ill give it a shot, me and maxscript are like oil and water :lol:

-dave

A more universal one


objs = $objects
for i = 1 to objs.count do

(
if classof objs[i] == vrayproxy do
	(
	if objs[i].display == 0 then
		(objs[i].display = 1)
		else (objs[i].display = 0)
	)
)

That’s a toggle that goes for the class, what means that you can rename them whatever you want. Also no Objects get selected.
Toggle the state of all your proxies at once means, that it turns any proxy displayed as a mesh into box and vice versa. So to work in the way you exspect it to, all proxies should be set to one view mode in the beginning.
that’s an easy one, too:


objs = $objects
for i = 1 to objs.count do

(
if classof objs[i] == vrayproxy do
	(
	objs[i].display = 0
	)
)

You can easily turn that into a shortcut or quad entry.

Best regards,
Michael

Thanks Sushidelic! That’s great! Just ignore the junk I wrote before. :sweat_smile: Would it be possible to throw Max’s “Display as Box” command in there as well? When applying VRay’s “bounding box” option they show up solid which can get in the way when you’ve got a lot of proxies. To overcome this I apply “Display as Box” to make them show as wireframe.

Thanks again.

Thanks Sushidelic, I will be trying that soon :slight_smile:

-dave

The one with box mode


objs = $objects 
for i = 1 to objs.count do 

( 
	if classof objs[i] == vrayproxy do 
	( 
		if objs[i].display == 0 then 
			(
			objs[i].display = 1
			objs[i].boxmode = off
			) 
		else
			(
			objs[i].display = 0
			objs[i].boxmode = on
			) 
	) 
) 

Best regards,
Michael

:smile: Excellent! Thanks for taking the time Michael!

Okay, these scripts don’t seem to work for me…I don’t think they work if you’re running the N-Vida drivers for MAX.

The “solid box” script only affects some proxies, and when I’m in wireframe the proxies are completely invisible.

The “bounding box” script makes all proxies invisible.

Any ideas?

Thats a problem with the proxys themselves, not the script..

I’m having the same issue here on Nvidia’s OpenGL, and on maxtreme 7.00.03,

Thats a problem with the proxys themselves, not the script..

I’m having the same issue here on Nvidia’s OpenGL, and on maxtreme 7.00.03

Turns out it’s the Maxtreme driver. Seems that is not only effects this script but the VRay Proxies themselves. If you run max without it, it seems fine.