ScriptSpot

Forum topic · General Scripting

Vray Properties Callbacks

By chooj · 2015-09-06

Description

I have connected my script spinner to vray environment multiplier, and now I want to do conversely. The new value of vray environment should update my spinner. Do I have to use callbacks? If so, than what type of callbacks should I use? Is there some special callbacks for vray properties?

Comments (4)

`

pixamoon · 2015-09-06

I'm not sure if there is a callback for this but you can use just timer:


try(destroyDialog ::abc)catch()
rollout abc "abc"
(
	spinner sp1 "Env" 
	timer tm1 interval:250
	
	on abc open do sp1.value = renderers.current.environment_gi_color_multiplier
	
	on sp1 changed e do renderers.current.environment_gi_color_multiplier = sp1.value
	
	on tm1 tick do if sp1.value != renderers.current.environment_gi_color_multiplier then sp1.value = renderers.current.environment_gi_color_multiplier
	
)
createDialog abc

timer

chooj · 2015-09-06

please, can you explain how this works?

timer

chooj · 2015-09-07

thanks for help!