Hi all,
I've this little script.
It adds a Color Correct map to every shader or selected object, if these shaders are a VRay Mat
Can you help me to change this script for Corona?
Thanks :)
macroScript CC_All category:"VRay" tooltip:"Add CC Map to all VRay Materials" buttontext: "CC All"
(
--CC Map in diffuse slot of ALL VRay Materials where a bitmap is present
if queryBox "Add CC Map to ALL VRay Materials?" do
(
vrmArr = getClassInstances vrayMtl
for vrm in vrmArr do
(
if isKindOf vrm.texmap_diffuse Bitmaptexture then
(
cc = ColorCorrection map:(vrm.texmap_diffuse) lightnessMode:1
vrm.texmap_diffuse = cc
)
)
)
)
macroScript CC_Selected category:"VRay" tooltip:"Add CC Map to Selected" buttontext: "CC Selected"
(
--CC Map in diffuse slot of SELECTED objects
objs = getCurrentSelection()
for obj in objs do
(
vrmArr = getClassInstances vrayMtl target:obj
for vrm in vrmArr do
(
if isKindOf vrm.texmap_diffuse Bitmaptexture then
(
cc = ColorCorrection map:(vrm.texmap_diffuse) lightnessMode:1
vrm.texmap_diffuse = cc
)
)
)
)