Primitive Maker
Creates a new Primitive from a template object.
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).
Attachment | Size |
---|---|
PrimitiveMaker.ms | 14.43 KB |
Comments
Primitive Maker HELP
HELLO SIR.
I USE Primitive Maker.
SIR I WANT TO CREATE OBJECT WITH FULL BMP , JPG MATERIALS.
WHEN I USE OBJECT IT SHOULD SAME MATERIALS ...
PLEASE HELP ME...
REPLY SOON..
Right-click on the link, then
Right-click on the link, then pick "save link as". Save it to a location on your hard drive.
https://www.artstation.com/luxxeon
http://luxxeon.cgsociety.org/
https://www.youtube.com/user/luxxeon3d
can't download file
I'm having trouble downloading the file. I've check and can download other files from this site and others. When I click on the file i get taken to the script page. Please help, [email protected]
maxscript rollout handler exception 3ds max error
sir plz help me how to fix this error maxscript rollout handler exception 3ds max as i dwnlded the primitive script n when i try to make a compnent with it bt it showed me this error plz tell me how to fix it i am using 3ds max 2012
aarif
some new features?
Hi Garp.
Thanks for the script. I am using it often time for adding few types of kitchen cabinets which we are using for kitchen design. What would be cool is getting better the process of adding new objects in to the 3ds max. What is annoying is that the script doesn't know the last path for saving new objects and also, the name for new script could be taken from the name of the object. Whole process could be simplified only for picking new objects and only for first object the user would have to select the folder to for saving them. Now is really time consuming every time select the folder to save new objects and write the name of the objects. Especially if you install a new system.
Would be cool if you would add these new features.
Thanks Tomas.
I have a quick question
Is there a limit to the amount of primitives to create? It works great, but I can only create 20. Is there anyway to customize the window preference in Max to display as many as 40 buttons?
Thanks.
I'm more interested in how it
I'm more interested in how it was converted into a goal
script, scriptwriter script. Is there any function or scripted?
(In the script "cleanString" is very good ..)
---------------------------------------------------------------
case click of
(
2: size = 2 * length gridDist
)
)
)
-->
format "\t\tcase click of\n" to:thePluginFile
format "\t\t(\n" to:thePluginFile
format "\t\t\t2: size = 2 * length gridDist\n" to:thePluginFile
format "\t\t)\n" to:thePluginFile
format "\t)\n" to:thePluginFile
format ")\n" to:thePluginFile
--------------------------------------------------------------
thx
Hello, thanks for the great
Hello, thanks for the great script. Very handy indeed.
The only problem I had with it was that when I had finished and
closed the script, then re-opened it to add further prims it created
a new folder with a new Geometry dropdown entry that I cant seem to
find a way to revert.I deleted the new folder entry inside of max's
root directory, but for some reason it's still available inside of max. Is there a way around this. Thanks
I got runtime error, Filestream cannot create the plugin
I picked the object I loaded in, then pressed create, then a runtime error popped up saying that "FileStream cannot create 'my plugin.ms'"
Also, How can I create a shortcut on the toolbar, I dragged the .ms file into max, ran the script, then went to customize, created a new tool bar, but could not found the item under main ui group and all command category. Although I can make it permanent, problem is the dialog pops up right away when max starts up, it is blocking my sight :(
Thirdly, How can I pick a group of primitives? It seems when I picked a grouped object, one of the "planes" or "boxes" was selected.
Much appreciated about your effort!
Thanks
Jack
name problem
I found the error comes from the object name.
it seems I get this error when I write a name starting with a number. names has to start with a letter...