Notifications
Clear all

[Closed] Scripted Plugin functions

Much like a C++ plugin can contain functions which users can then call using maxscript, is it possible to add functions to scripted maxscript plugins that users can call using maxscript?

1 Reply

Yea, just put your custom function in the plugin declaration. Example:


plugin simpleMod foo
name:"foo"
classID:#(685325,452281)
version:1
(
   fn bar = (print "hello world'")
  parameters main rollout:params
  (
  )
  rollout params "Foo"
  (
  )
  on map i p do
  (    
    p
  )
)


In this example, after adding the scripted plugin as a modifier to an object, you can call:


$.modifiers[#foo].bar()