Notifications
Clear all
[Closed] Scripted Shape Plug-ins adds unnecessary rollout
Mar 13, 2015 12:58 am
When i create a scripted shape plugin multiple times, an interpolation rollout is added to the create panel everytime. So i can end up having 10 interpolation rollouts at the same time. These rollouts stay there even if no object is selected and i have to restart max to make them disappear. This happens only when the scripted plugin extends a line.
Is this a bug and is there a way to avoid that?
plugin shape testshape
name: "MyShape"
classID: #(0x2f3a94bb, 0x5dc96bd4)
extends:line version:1
category: "Splines"
(
parameters main rollout:params
(
length type:#float ui:sp_length default:0
width type:#float ui:sp_width default:0
)
rollout params "Parameters" (
spinner sp_length "Length:" type:#float range:[-10000,10000,0] fieldwidth:60
spinner sp_width "Width:" type:#float range:[-10000,10000,0] fieldwidth:60
)
fn createline = (
arrowobj = $
addnewspline arrowobj
addknot arrowobj 1 #corner #line [0,0,0]+$.pos
addknot arrowobj 1 #corner #line [0,0,0]+$.pos
delegate.render_displayRenderMesh = true
updateshape arrowobj
)
fn updateline = (
setknotpoint $ 1 2 ([width,length,0]+$.pos)
updateshape $
)
tool create (
on mousePoint click do (
case click of (
1: (
nodeTM.translation = gridPoint
createline()
)
2:#stop
)
)
on mouseMove click do (
case click of (
2: (
width = gridDist.x
length = gridDist.y
updateline()
)
)
)
)
)