Notifications
Clear all

[Closed] linking spinner to UVW u or v tile?

 em3

I am trying to link some spinners I made with the UVW of any objects I have selected. What I have is not working. Can someone point me in the right direction?


Rollout PolyFormTools "PolyForm Tools"
(
 		group "UVW Tools"
 		(
 			button _CylinderUVWMap "UVW Map - Cylinder" align:#left
 			spinner uTiling "UVW Tiling:" range:[1,100,1] fieldwidth:40 align:#left type:#integer enabled:true
 			spinner vTiling "UVW Tiling:" range:[1,100,1] fieldwidth:40 align:#left type:#integer enabled:true
 			button _BoxUVWMap "UVW Map - Box" align:#left
 			button _FitUVW "UVW Fit" align:#left
 		)
 	
 			for o in selection do (
 			o.modifiers[#UVW_Mapping].utile=uTiling
 			o.modifiers[#UVW_Mapping].vtile=vTiling
 			)
)
 
1 Reply
 em3

OK I figured it out.
add your spinner, make sure it’s a float type!

spinner uTiling "UVW Tiling:" range:[1,100,10] fieldwidth:40 align:#left type:#float enabled:true

Then add this code to your script

		
on uTiling changed val do
		(
			for i in selection do
		(
			i.modifiers[#UVW_Mapping].utile = uTiling.value
		)
		
		)