Scripted Modifier Plug-ins

Scripted Modifier plug-ins can only extend existing Modifier plug-ins.

A scripted Modifier plug-in is declared by specifying the <superclass> as modifier .

The Modify panel actually creates a fresh instance of every modifier when it is to be shown in the More... list or the buttons in the Modifiers rollout. This will cause the create handler to be called for a scripted Modifier plug-in. No special handling in the create handler is required for this case.

SCRIPT:

plugin modifier myMod
name:"Supa Mod"
classID:#(685325,452281)
extends:Bend replaceUI:true version:1
(
  parameters main rollout:params
  (
    bendamt type:#float animatable:true ui:bendamt default:0.0
    on bendamt set val do delegate.angle = val
  )
  rollout params "SupaMod Parameters"
  (
    spinner bendamt "Bendiness: "
  )
)

SCRIPT:

plugin modifier NSpline
name:"Normal. Spline"
classID:#(0x133067, 0x54374)
extends:normalize_spline
replaceUI:true version:1
(
  parameters main rollout:params
  (
    seglen type:#float animatable:true ui:seglen default:20
    on seglen set val do delegate.length = val
  )
  rollout params "Parameters"
  (
    spinner seglen "Seg Length: " range:[0.01,1e9,20]
  )
)