Primitive Maker

Version: 
1.1
Date Updated: 
01/01/2011
Author Name: 
Garp

Creates a new Primitive from a template object.

Additional Info: 

This script creates a simpleObject plugin and registers the new primitive. Works with both geometry and shape objects. In the case of shapes, the primitive is of geometry type, based on the renderable version of the template shape as defined by the settings in the Rendering rollout, even if the Enable options are off.

The script supports smoothing groups, material IDs and mapping coordinates for all map channels (except -1 and -2, respectively alpha and illum).

The only parameter for the new primitive is Size. Its value corresponds to whichever dimension of the object's bounding box is the largest.

The Original Size button resets the size to that of the original object.

The Show Location button displays the path and name of the plugin's file.

The Sub-Folder from Category option creates a new folder in the current location - if it doesn't already exist - based on the primitive's category.

The Discard Mapping Coords option ensures that no mapping coordinates are passed from the template.

The name of the plugin file is of the form name_category.ms as entered in the dialog. Edit it at your own risks!

To make the primitive permanent, choose as location one of max's startup folders, like \$max\plugins (the default).

You can easily edit the various default values (default folder, legal characters for Name and Category  and option states) in the script's file. These are set at the top of the code for easy access.

Each new primitive class is scriptable. Just replace any eventual space in its name by an underscore. If the size property is not specified, the size of the original template object is used.

In the same fashion, there is also a Helper Maker.

 

v. 1.1: fixed a few loose ends.

v. 1.2: fixed a major bug that prevented cloning correctly (thanks to gramx for finding it).

Version Requirement: 
max 9 and above
AttachmentSize
PrimitiveMaker.ms14.43 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
roosterMAP's picture

question

I have a bunch of new primitives and I would like to transfer them to a new computer. The problem is that max doesn't seem to register primitives created in another computer. (the primitive create button doesn't show up)

help me!

gomitas's picture

Help

Hi, i'm new in 3d max, and i found this grate page, but i need to install this script but i don't now by the moment how to do this, smebody can help me? sorry for my bad english, my e-mail gerardofs2000@yahoo.com.mx

Thanks

asymptote's picture

Fantastic script, great tools

Fantastic script, great tools for scene making, one problem I have is each time I make a primitive, I have to manually navigate to the output folder to save it.
Can this be made to remember the last used folder easily ?
I don't know maxscript btw.
I'd love to see this developed to automatically support UV's and textures. it would be great for game level design.

kimarotta's picture

Yeah

Very good script

Thanks man.

kimarotta.com.br
3d Artist  

Yusuf_ES's picture

Good script!

Hi garp
Very good script. Thanks.

Script cover primitive object vertex deformation and local animation, maybe very very helpful :)

Garp's picture

Yuji and ginger3D

@Yuji:
A face cannot not have a material ID. Also, things like material IDs and smoothing groups are not particularly relevant to this script, they are rather part of the general modeling process.
Just set the IDs as you need them on your template object before using it to generate the primitive plugin.

@ginger3D:
If you've set the primitive plugin(s) in one of the startup folders (so they show up automatically as primitives), it adds to max's loading time. If you have lots of them and/or high polycounts, it can take some siginificant time to load.
Typically, you'd use this script to generate simple geometry. As the complete mesh definition is included within the plugin's code, a high resolution model can make quite a large file.

Yuji's picture

Discard Material ID's?

Very nice script! Just wondering is there any way you can add a discard Material ID checkbox? Thanks for contributing!!

ginger3d's picture

Question about your amazing script! Im 2011 user 64 bits version

Hi!
I love your MaxScript!
Thanks for sharing something so useful like this!
I have a question, i created one object, and now when i open my max, it takes more time that common (long time).
Its that right?

S-ed's picture

3dsMax 2012 x64 - Works Fine!

Actually, i've been frustrated when have read about problems in 2012. But it works! =)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.