PDA

View Full Version : A MAXscript Error,Please aswer.


leelittledragon
10-21-2006, 02:54 PM
script plugin,Create object last.Save scene.Next,Open such scene. Error! not open such file.



plugin shape Extended_Rect

name:"Rectangle2"

classID:#(0x133067, 0x54375)

extends:rectangle version:1

category:"Splines"

(

tool create

(

local startPoint

on mousePoint click do

case click of

(

1: startPoint = nodeTM.translation = gridPoint

3: #stop

)

on mouseMove click do

case click of

(

2: (delegate.width= abs gridDist.x

delegate.length= abs gridDist.y

nodeTM.translation = startpoint + gridDist/2.

)

3: delegate.corner_radius = amax 0 -gridDist.x

)

)

)

Zbuffer
10-21-2006, 07:44 PM
Hi,
You probably did not save the script in the correct folder
Max needs to run the script so it can open the file. (just like a normal plugin)

Save the script in <MAXROOT>\Scripts\Startup
then it should work all the time

Blue
10-23-2006, 09:13 PM
Also noticed that your script made the rectangle float from the first corner while defining the second point. So I made an edit that remedied that.
plugin shape Extended_Rect
name:"Rectangle2"
classID:#(0x133067, 0x54375)
extends:rectangle version:1
category:"Splines"
(
tool create
(
local startPoint
on mousePoint click do
case click of
(
1: startPoint = nodeTM.translation = gridPoint
3:#stop
)
on mouseMove click do
case click of
(
2:
(
delegate.width= abs gridDist.x
delegate.length= abs gridDist.y
nodeTM.translation.x = startpoint.x + gridDist.x/2.0
nodeTM.translation.y = startpoint.y + gridDist.y/2.0
)
3: delegate.corner_radius = amax 0 -gridDist.x
)
)
)

leelittledragon
10-24-2006, 02:25 AM
Hi
thanks!
But,It's in 3ds Max 7.0, not error.
In 3ds max6 and 3ds max 7 , all Ok.
At 3ds Max 8.0 ,Save scene after, open such file . error!

CGTalk Moderation
10-24-2006, 02:25 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.