Notifications
Clear all
[Closed] Scripted modifier with callbacks problem
Dec 14, 2010 12:08 pm
Why is this throwing an error?
-- Error occurred in anonymous codeblock; filename: C:\Program Files\Autodesk\3ds Max Design 2011\plugins\ProxySwitcher.ms; position: 142; line: 8
-- Syntax error: at name, expected Plugin clause:
-- In line: callbacks.
plugin modifier proxySwitcher
name:"Proxy Switcher"
classID:#(609124, 085099)
extends:Bend
replaceUI:true
version:1
(
callbacks.removeScripts id:#proxySwitcher
local switch = true
local cull = false
parameters main rollout:params
(
switchOnRender type:#boolean animatable:false
ui:switchOnRender default:true
)
rollout params "Proxy Switcher"
(
checkbox switchOnRender "Switch On Render"
)
fn onPreRender =
(
)
callbacks.addScript #preRenderFrame "onPreRender()" id:#proxySwitcher
)
I intend to slap this on a Container to switch out proxies, which Autodesk apparently thought we wouldnt want to do!
2 Replies
Dec 14, 2010 12:08 pm
You cannot define the callbacks just in the plugin body, you need to have it assigned in a handler for example on create for example. The callbacks are not in the right place.
-Johan