Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Scripted Shape Plug-ins; trying to write a plugin for this shape...

Scripted Shape Plug-ins; trying to write a plugin for this shape...

Anonymous
Not applicable
432 Views
6 Replies
Message 1 of 7

Scripted Shape Plug-ins; trying to write a plugin for this shape...

Anonymous
Not applicable
I'm trying to write a plugin in maxscript to get a shape as shown.

The idea is to click points A, B en C, to define the basic shape, after that the radii could be adjusted in the modifier panel.

I don't know where to begin; when I look at the Scripted Shape Plug-ins entry in the MAXScript reference it says: "Scripted Shape plug-ins can only extend existing Shape plug-ins."

Do i have to start with a "donut" object and modify that?

MLB

0 Likes
433 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
You might be better off writing a standard-type script that creates the shape rather than trying to create a plug-in. Personally, I've never had any luck with a scripted Shape plug-in. You can probably do some tricks to keep the data with it so the script could modify it parametrically, which would give you most of the benefits of a plug-in.
0 Likes
Message 3 of 7

Anonymous
Not applicable
I know how to do the math, but i don't know how to get it into a nice 'package'.

Does anyone know of a script I can use as a basis?

MLB
0 Likes
Message 4 of 7

Anonymous
Not applicable
I'm with Stokes on this...you would probably have to extend the basic line shape and make the
shape you want. Another option could be a helper using gw calls, but that is even more prone to
hair-pulling and flipping off your monitor.

If I had to pump something out, I would reverse engineer the spline, and make a function that
did all the steps required to recreate the spline modified by input settings. The tool/"plugin"
would just manage the variables that affect the spline.
0 Likes
Message 5 of 7

paulneale
Advisor
Advisor
I don't believe that scripted shapes work very well at all. I don't remember what the issues where
but I found that it wasn't possible to use them.

ScriptChimp wrote:
> I'm with Stokes on this...you would probably have to extend the basic line shape and make the
> shape you want. Another option could be a helper using gw calls, but that is even more prone to
> hair-pulling and flipping off your monitor.
>
> If I had to pump something out, I would reverse engineer the spline, and make a function that
> did all the steps required to recreate the spline modified by input settings. The tool/"plugin"
> would just manage the variables that affect the spline.
Paul Neale

http://paulneale.com


Paul Neale




EESignature

0 Likes
Message 6 of 7

gplourde
Participant
Participant
The issue since max 7 was that it crashed max when you opened a scene with a scripted shape in it. Creation worked fine. It work fin in 2009 now but I have no idea when this was fixed. Fairly sure it crash in max 9 also.
0 Likes
Message 7 of 7

Anonymous
Not applicable
I'd create the shapes in a custom tool, and add a custom attribute to the new node to tweak the radius after creation.

I don't believe that scripted shapes work very well at all. I don't remember what the issues where
but I found that it wasn't possible to use them.


This may be the issue: (in the attachment)

It didn't work for 'delegate' or 'this' ( Max 9 ).
If someone knows a way to add splines to a shape plug-in please let me know!

mspen inbox dot com
-Matt

0 Likes