ScriptSpot home

Forum topic · General Scripting

Gradient ramp map blur and blur_offset value set

By Sketchup Master · 2024-06-05

Description

Hello,

I am trying to all scene gradient ramp map blur value = 1 and blur_offset value = 0
but getting error
can anyone correct the script

THANKS


(
fn gradientBlur class:Gradient_Ramp =
(
if selection.count != 0 do
(
node = getClassInstances class
if node.count > 0 do
for map in node do
map.coords.blur = 1.0
)
(
node = getClassInstances class
if node.count > 0 do
for map in node do
map.coords.Blur_Offset = 0
)
)
gradientBlur()
)

Comments (3)
Simon Bourgeois

Try this:


(
fn gradientBlur class:Gradient_Ramp =
(
	if selection.count != 0 do
	(
	node = getClassInstances class
	if node.count > 0 do
		for map in node do
		(
		map.Coordinates.blur = 1.0
		map.Coordinates.Blur_Offset = 0
		)
	)
)
gradientBlur()
)