PDA

View Full Version : linking spinner to UVW u or v tile?


em3
01-13-2011, 05:06 PM
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
)
)

em3
01-13-2011, 09:47 PM
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
)

)

CGTalk Moderation
01-13-2011, 09:47 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.