It has been requested to add a button to change the environment map direction via button press.
Below is a rhino toolbar macro to rotate the vray environment. Feel free to adjust the comments for left/right rotation/prompt.
For information on making a rhino toolbar button: http://docs.mcneel.com/rhino/5/help/...enButtonEditor
Below is a rhino toolbar macro to rotate the vray environment. Feel free to adjust the comments for left/right rotation/prompt.
Code:
! -_RunScript ( Option Explicit 'Script copyrighted by Chaos Group USA 'Moving the uvw_transform of a light slightly without opening texture editor' Sub RotateTexture(settingUrl, param, dblOffset) Dim VRay Dim result Dim rot(3) Dim scale(3) Dim off(3) Dim mir(3) Set VRay = Rhino.GetPluginObject("V-Ray for Rhino") Dim url VRay.GetSettingsParameterString settingUrl, param, "acolor texture", url VRay.GetSettingsParameterString url, "color_a", "acolor texture", url VRay.GetSettingsParameterString url, "uvwgen", "plugin", url result = VRay.GetSettingsParameterCompTransform(url, "uvw_transform", rot(0), rot(1), rot(2), scale(0), scale(1), scale(2), mir(0), mir(1), mir(2), off(0), off(1), off(2)) If result Then If Not IsNull(dblOffset) Then rot(0) = 0 rot(1) = 0 off(0) = off(0) + (dblOffset / 360.0) Call VRay.SetSettingsParameterCompTransform(url, "uvw_transform", rot(0), rot(1), rot(2), 1.0, 1.0, 1.0, mir(0), mir(1), mir(2), off(0), off(1), off(2)) End If End If End Sub Dim dblOffset dblOffset = 3 'dblOffset = -3 ' dblOffset = Rhino.GetReal("Angle to rotate the offset", 45) RotateTexture "/SettingsEnvironment", "gi_tex", dblOffset RotateTexture "/SettingsEnvironment", "bg_tex", dblOffset )
Comment