Hi,
I’m working on a simple script to batch a controller with several options, it work perfectly on a classic controller like a position but not on a custom attribut and i can’t find my error. Please find bellow a short version of my script ( this part bake controller ).
fn bakeMe ctrl fromRange:animationRange.start toRange:animationRange.end = (
fromRange = fromRange as time
toRange = toRange as time
if (superclassof ctrl.controller) != FloatController do -- ctrl doit-être un controler de type float
(
print "Only work on FloatController superClass"
return false
)
undo "BakeControler " on (
tmpVal=#()
try (
-- record value
for i = fromRange to toRange do (
at time i (
append tmpVal ctrl.controller.value
)
)
-- assign new controller
ctrl.controller=linear_float()
--applying value to the new controller
for i = fromRange to toRange do (
at time i (
numID =((i.frame)+1-(fromRange.frame as integer)) as integer
with animate on (
ctrl.controller.value = tmpVal[numID]
)
)
)
)catch(
format "*** BakingError: % ***\n" (getCurrentException())
)
)
)
bakeMe $.position.controller[1] -- Work perfeclty
bakeMe $.baseObject.Custom_Attributes.param1 -- Crash with Unknown property: "controller" in 6.69115 (value )
Thanks for idea and help
