how to create a button on toolbar to vray distributed render

Hello Guys!!!

I would like to create a only button in my toobar that changes the state of the vray distributed render to on or off.

I would also like that button show if the DR is on or off.

I could only do it with 2 buttons and I still can not showing that they are pressured state.

I try use the checked function, but is not work.

Here is my current script:

macroScript Leo_Distributed_render_On
 
            category:"Leo_DR" 
            internalCategory:"Distributed_Render" 
            tooltip:"Distributed_Render_ON" 
            buttontext:"DR ON"
 
(
 
	(
		renderers.current.system_distributedRender = true
	)	
 
)
 
----------------------------------------------------------------------------
 
macroScript Leo_Distributed_render_Off
 
            category:"Leo_DR" 
            internalCategory:"Distributed_Render" 
            tooltip:"Distributed_Render_OFF" 
            buttontext:"DR OFF"
 
(
 
	(
		renderers.current.system_distributedRender = false
	)
 
)

Thank you for your attention and sorry my bad english.

Comments

Comment viewing options

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

.

This have to solve your problem.
Since I don't have Vray I can't test it.

macroScript Leo_Distributed_render_On 
category:"Leo_DR" 
internalCategory:"Distributed_Render" 
tooltip:"Distributed_Render_ON" 
buttontext:"DR ON"
 
(
	on isChecked return (renderers.current.system_distributedRender)
	on execute do
	(
		renderers.current.system_distributedRender = not (renderers.current.system_distributedRender)
	)	
 
)
LeandroM's picture

It worked perfectly. Thank

It worked perfectly.

Thank you very much.

Comment viewing options

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