Notifications
Clear all

[Closed] how to add custom shapes to the sweep mod?

Hi all,

I was reading through the reference about the sweep modifier and it seems like you can add custom shape classes to the sweep.ini file. I’ve opened it and I couldn’t figure out how it works (first time dealing with shape classes and plugins…).

Can anybody give me a hint in which direction to go, or show me an example of a new shape added to the modifier?

Thanks alot!
Anton

5 Replies
 rdg

vasilescu_anton,

I took a look at it:
[ol]
[li]add the name of your custom section in the [Global] section of sweep.ini seperated by a comma.[/li][li]Add at the end of the file a section named like your custom section.[/li][li]Assign a unique ClassID[/li][li]if you have a custom iconfile refence it in the next line, or just copy the line from some other entry[/li][li]Specifiy the IconIndex in the next line[/li][li]Specify the number of default values you will pass in the next line using: NumDefaults.[/li][li]Specify all default Values in this syntax: Default[n] = n-1, type, value[/li][/ol]After this restart max and your custom section is available in the built-in section dropdown, but will show no effect on your path.

I guess you also need to create a scripted shape …

The default values corrspond to the arguments you pass to your shape.

maybe this helps.

Georg

Thanks rdg, this helps alot with the setup part but any idea on how to make the scripted shape?
I’ll read some more and if I come up with something I’ll post it here too.

Thanks!

 rdg

the classID is not a random unique value, but somehow connected to the classID of the shape you are using.

If you copy some existing classID from ie Wide Flange then this Shape will be used.

Question:
How to convert the classID generated by genClassID() to the format used in the sweep.ini ?

Georg

1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

Easy.

Ask the class for its classID

angle.classid
#(-1826262992, 0)
rectangle.classid
#(4197, 0)
etc.

These are the same numbers used in the Sweep.ini for Angle and Bar… Same for the rest.

 rdg

Thanks Bobo.
Seems this was really the easy part.

As soon as I enter the correct classID MAX crashes when choosing my shape.
I tried the [color=black]Extended_Rect [/color]from the reference.

Maybe this is not suposed to work and one can only use the existing shapes and give them default values ?

– edit
it works with the default shapes. this gives a lot of possibilities …
maybe custom shapes need to be compiled and not scripted.
– edit

Georg