Notifications
Clear all
[Closed] Disabling animation on spinner?
Apr 16, 2011 9:23 am
I’ve added some custom attributes with spinners to an empty modifier. I obviously want to be able to change these spinner values, but I don’t want them to be able to be animated… Is there a way to turn off animation capability for spinners?
Cheers,
Cg.
2 Replies
Apr 16, 2011 9:23 am
Hi Chris,
To disable this you need to specify animatable:false in the parameter block of the attribute. The spinner would normally be bound to this variable, and thus is not animated by default. I always use this on things like checkbuttons for UI states, I generally don’t want people to animate that.
attributes CharacterScale
(
Parameters main rollout:params
(
Character_Scale Type:#float UI:Character_Scale Default:1.0 animatable:false
ScaleCopyBuffer Type:#float Default:1.0 animatable:false
)
rollout params "Puppet Scale" width:162 height:55
(
local UiDir = (GetDir #ui + "\\icons\\")
spinner Character_Scale "Character Scale:" pos:[20,5] width:138 height:16 range:[0.001,5,1] type:#float
button btnreset "Reset" pos:[5,26] width:88 height:24 border:false
button btnCopyScale "Cpy" pos:[100,26] width:28 height:24 border:false tooltip:(ScaleCopyBuffer as string)
button btnPasteScale "Pst" pos:[130,26] width:28 height:24 toolTip:"Paste Scale" border:false
on params open do
(
try
(
btnCopyScale.images = #(UIDir + "bip_copypaste_i.bmp", undefined, 24, 1, 1, 1 ,1 ,true)
btnPasteScale.images = #(UIDir + "bip_copypaste_i.bmp", undefined, 24, 11, 11, 11 ,11 ,true)
)
catch()
)
on btnreset pressed do Character_Scale.value = 1.0
on btnCopyScale pressed do (ScaleCopyBuffer = Character_Scale.value;btnCopyScale.tooltip = ScaleCopyBuffer as string)
on btnPasteScale pressed do Character_Scale.value =ScaleCopyBuffer
)
)