I have about 400 section objects in Max that I need to Create Shape from. Max will only let you do one at a time. Anyone know of a script that will let you do this all at once? It will save me a lot of time...
Announcement
Collapse
No announcement yet.
Batch Create Shape from Section script?
Collapse
X
-
Well, very simply: I have a long, irregular, complex curvilinear mesh volume. I need to get spline section profiles at certain intervals along this volume.
In my case, I need 400 sections, and I have created 400 section objects. I can select any one section object, and then click Create Shape. However, I can only do one at a time.
I have encountered this issue several time before, but never found a script for it. My maxscript skills are practically non-existent, and I could do all 400 one at a time before I could figure out how to script it."Why can't I build a dirigible with my mind?"
Comment
-
It's in your email Clifton, for anyone else who needs it create shapes from tons of section objects here's the code
Code:-- SectionBatchCreateShape v1.0 -- By Colin Senner 03-27-2008 rollout rlt_SectionBatchCreateShape "Sections" ( button btn_create "Create Shapes" offset:[0,4] on btn_create pressed do ( local objs = getCurrentSelection() -- Saves the current selection of objects in an array variable "objs" -- Different from using $ because $ updates dynamically, and we just want what the user had selected when running the script if objs.count != 0 then ( undo "Create Spline/Section" on ( for o in objs where (classof o) == Section do try ( convertToSplineShape o ) catch ( format "Error Creating shape %\n" + o.name ) ) redrawViews() ) else messageBox "Please select at least one object" ) ) createDialog rlt_SectionBatchCreateShape 110 40
Colin Senner
Comment
-
Wow cool script, so simple.
Another approach,
There is a Slicer script on Scriptspot.com that moves the slice plane in editable poly incrementally and creates slices. After you use the slice plane, the new slice edges are selected at the subobject level and you can Create Shape from there. I use this method sometimes to cut floor plates from a building mass.Last edited by jonahhawk; 27-03-2008, 08:51 AM.
Comment
-
Awesome! Thanks a lot. I will be giving that a try tomorrow.
@jonahhawk: You can do that in editable poly, but it involves an extra couple steps, i.e. slicing, then selecting, then creating spline from selection. I like the section object because you can create multiple section objects, and their output is already a spline.
Cheers,
AaronLast edited by Clifton Santiago; 27-03-2008, 09:15 AM."Why can't I build a dirigible with my mind?"
Comment
Comment