[Closed] Controllers math
Hello everyone … I’m trying to create a spinner that controls the height of a box as well as the inset amount of its polygons … but i want the height of the box to be ten times the inset amount … I tried this code:
x = linear_float()
b = box isSelected:on
addmodifier b (Edit_Poly())
subobjectLevel = 4
max select all
$.modifiers[#Edit_Poly].SetOperation #Inset
$.modifiers[#Edit_Poly].insetType = 1
$.modifiers[#Edit_Poly].insetAmount.controller = x
subobjectLevel = 0
b.height.controller = x*10
rollout test “test”
(spinner ‘spn1’ “x” controller:x)
createdialog test
and I’m getting:
– Error occurred in anonymous codeblock; filename: ; position: 291; line: 10
– No “”*”” function for Controller:Linear_Float
– MAXScript callstack:
– thread data: threadID:2064
– ——————————————————
– [stack level: 0]
– In top-level
Any ideas ?
and thanks in advance
[code] put your code here [/code]
delete objects
b = box isSelected:on
x = linear_float()
b.height.controller = x
addmodifier b (Edit_Poly())
subobjectLevel = 4
max select all
$.modifiers[#Edit_Poly].SetOperation #Inset
$.modifiers[#Edit_Poly].insetType = 1
subobjectLevel = 0
rollout test "test"
(
spinner spn1 "x" controller:x
)
createdialog test
inset_sub = $.modifiers[#Edit_Poly][#Inset_Amount]
height_sub = $.baseobject[#height]
paramWire.connect height_sub inset_sub "Height / 10.0"
x in your code is the controller and listener is clearly states that you can’t multiply controller by value.
use wireparameters or a script controller