ScriptSpot

Forum topic · Scripts Wanted

Walls with dimensions name?

By Gabriel Corazza · 2014-08-11

Description

I spend a lot of time creating walls, measuring and renaming. I just wanted to create lines in top view and execute a command that adds 10 Outline 320 extrude mesuare the length of the line i created and rename object:
"Wall X, 10, 320" are the values that I use most.
(if there is a text box that I could imput all value and create, would be perfect, but it would probably be hard to create, I think)
thanks guys

Comments (31)

Walls creation

Sharath pawar · 2019-08-25

Hi Mr.barigazy
Can u please help me in creating a script which creates walls based on spline
these walls need to be such that if they get divided by rooms they should automatically create floors for those newly created rooms just like Chief Architect software
hope you understood what am trying to say
they should detect intersection and if they get closed into a room the floors and moldings should get created automatically

Attachments

Update?

Gabriel Corazza · 2015-05-25

Please can anyone do a update, i export the sp line to autocad after than, but i cant find the line in project. anyone can make the sp line go down after walls created, the walls stay on 0 and sp line on -10? Its possible? Thank so much!!

barigazy · 2014-08-18

What's new:
Extrude props: Segs, Map Coords, Caps
Shell props: Segs, Autosmooth, Override Inner - Outher - Edge Mat ID
(always use the form "number-number-number" ei. "1-2-3" or "3-2-1" or ...)
Auto multimaterial (for edge-shell mode) with tree custom diffuse colors
Convert selected shapes to spline shapes

After all of this at least can you post it in "Scripts" section.
Maybe someone else can find this tool also useful.

Michele71 · 2014-08-19

Yes, it appears complete and useful :D

It was great fun to compare the ideas for the realization of this script and I have learned a lot ;)

In the day we'll post it in the script section, but if you have time, you can do it!!

Hi Branko!

barigazy · 2014-08-18

Ok I fixed the code :) I not test this.

try (destroyDialog ::create_wall) catch()
rollout create_wall "Create Quick Wall"
(
local walls = #()
fn filterLine shape = isKindOf shape SplineShape or isKindOf shape Line

group "Wall Name ..."
(
edittext et_wallname "" pos:[5,25] width:135 height:17 text:"Wall"
colorPicker cp_wire "" color:[61,135,6] pos:[138,25] width:15 height:17
checkbox cb_unique "Use Unique Name" pos:[10,45]
checkbox cb_random "Randomize Each Color" pos:[10,65]
)
group "Wall Params ..."
(
radiobuttons rb_mode "Mode:" labels:#("Outline-Extrude", "Extrude-Shell") pos:[10,110]
spinner spn_outline "Outline = " range:[-1e5,1e5,10] type:#worldunits pos:[11,160] fieldwidth:70
spinner spn_extrude "Extrude = " range:[-1e5,1e5,320] type:#worldunits pos:[10,180] fieldwidth:70
spinner spn_extsegs "E - Segs = " range:[1,1e2,1] type:#integer pos:[10,200] fieldwidth:70
checkbox cb_extsmooth "Smooth" pos:[10,220] width:60 checked:on
checkbox cb_mapcoords "Map Coords" pos:[72,220] checked:on
checkbox cb_capE "Cap End" pos:[10,240] width:60
checkbox cb_capS "Cap Start" pos:[72,240]

checkbox cb_extrude "Instance Extrude Modifier" checked:on pos:[10,260]
spinner spn_shellin "Shell In = " range:[0,1e5,5] type:#worldunits pos:[10,280] fieldwidth:70 enabled:off
spinner spn_shellout "Shell Out = " range:[0,1e5,5] type:#worldunits pos:[11,300] fieldwidth:70 enabled:off
spinner spn_shellsegs "S - Segs = " range:[1,1e2,1] type:#integer pos:[10,320] fieldwidth:70 enabled:off
checkbox cb_shellsmooth "Smooth" pos:[10,340] width:60 checked:on enabled:off
spinner spn_smooth "" range:[0,180,45] pos:[69,340] fieldwidth:70 enabled:off
checkbox cb_ids "In - Out - Edge MatID" checked:on pos:[10,360] enabled:off
edittext et_matid "" pos:[5,380] width:100 height:17 text:"1-2-3" enabled:off
colorPicker cp_in "" color:red pos:[105,380] width:15 height:17 enabled:off
colorPicker cp_out "" color:green pos:[120,380] width:15 height:17 enabled:off
colorPicker cp_edge "" color:blue pos:[135,380] width:15 height:17 enabled:off
checkbox cb_mat "Auto Multi-Sub Material" pos:[10,400] enabled:off
checkbox cb_shell "Instance Shell Modifier" checked:on pos:[10,420] enabled:off
button btn_convert "Convert To Spline" pos:[10,440] width:140 height:18
button btn_reverse "Reverse Knots Order" pos:[10,460] width:140 height:18
button btn_delete "Delete Walls" pos:[10,480] width:140 height:18
)
button btn_create "Create W A L L S !" pos:[4,506] width:152 height:30
on rb_mode changed state do
(
if state == 1 then
(
spn_outline.enabled = on
spn_shellin.enabled = spn_shellout.enabled = spn_shellsegs.enabled = cb_shell.enabled = cb_capS.checked = cb_capE.checked = off
cb_shellsmooth.enabled = cb_ids.enabled = spn_smooth.enabled = et_matid.enabled = cb_mat.enabled = off
cp_in.enabled = cp_out.enabled = cp_edge.enabled = off
)
else
(
spn_outline.enabled = off
spn_shellin.enabled = spn_shellout.enabled = spn_shellsegs.enabled = cb_shell.enabled = cb_capS.checked = cb_capE.checked = on
cb_shellsmooth.enabled = cb_ids.enabled = cb_mat.enabled = on
if cb_shellsmooth.checked then spn_smooth.enabled = on else spn_smooth.enabled = off
if cb_ids.checked then et_matid.enabled = on else et_matid.enabled = off
if cb_mat.checked then cp_in.enabled = cp_out.enabled = cp_edge.enabled = on else cp_in.enabled = cp_out.enabled = cp_edge.enabled = off
)
)
on cb_shellsmooth changed state do spn_smooth.enabled = state
on cb_ids changed state do et_matid.enabled = state
on cb_mat changed state do (cp_in.enabled = cp_out.enabled = cp_edge.enabled = state)
on btn_convert pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:off else
(
with redraw off (for sp in selection where not filterLine sp do convertToSplineShape sp)
)
on btn_reverse pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:off else
(
with redraw off
(
for sp in selection where filterLine sp do
(
integer = numSplines sp
number = if (e = getSplineSelection sp).count == 0 then (#{1..numsplines sp} as array) else e
for n in number do reverse sp n
)
)
)
on btn_delete pressed do (delete (for node in walls where isValidNode node collect node) ; free walls)
on btn_create pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:off else
(
if et_wallname.text == "" then messagebox "Enter Some Name" title:"Warning" beep:off else
(
if GetCommandPanelTaskMode() != #create do setCommandPanelTaskMode #create
node = (Extrude amount:spn_extrude.value segs:spn_extsegs.value capStart:cb_capS.checked capEnd:cb_capE.checked smooth:cb_extsmooth.checked mapcoords:cb_mapcoords.checked)
modifier = if rb_mode.state == 2 do
(
array = #(1,2,3)
if cb_ids.checked do
(
if et_matid.text == "" then et_matid.text = "1-2-3" else
(
if (e = FilterString et_matid.text " - ").count != 3 then (et_matid.text = "1-2-3") else
(
if (e = for s in e where (number = s as integer) != undefined collect number).count != 3 then et_matid.text = "1-2-3" else array = #(e[1], e[2],e[3])
)
)
)
Shell innerAmount:spn_shellin.value outerAmount:spn_shellout.value Segments:spn_shellsegs.value straightenCorners:on \
overrideInnerMatID:cb_ids.checked matInnerID:(array[1]) overrideOuterMatID:cb_ids.checked matOuterID:(array[2]) overrideMatID:cb_ids.checked matID:(array[3]) \
autosmooth:cb_shellsmooth.checked autoSmoothAngle:spn_smooth.value
)
material = if rb_mode.state == 2 and cb_mat.checked do
(
color = #(cp_in.color, cp_out.color, cp_edge.color)
Multimaterial materialList:(for i = 1 to 3 collect standard diffuse:color[i])
)
with redraw off
(
for sp in selection where isKindOf sp shape do
(
shape = copy sp name:(if cb_unique.checked then uniquename et_wallname.text else et_wallname.text) \
wirecolor:(if cb_random.checked then (random black white) else cp_wire.color)
append walls shape
if spn_outline.value != 0 and rb_mode.state == 1 do applyOffset shape spn_outline.value
if spn_extrude.value != 0 do
(
if not cb_extrude.checked then addmodifier shape (copy node) else addmodifier shape node
)
if rb_mode.state == 2 do
(
if not (spn_shellin.value == 0 and spn_shellout.value == 0) do
(
if not cb_shell.checked then addmodifier shape (copy modifier) else addmodifier shape modifier
)
if cb_mat.checked do shape.mat = material
)
)
)
)
)
)
createDialog create_wall 160 540 10 110 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)

---

Michele71 · 2014-08-18

Added:

- More messagebox for editspline and shape
- Delete only ONE wall
- Segment for extrude modifier

[code]
try (destroyDialog ::create_wall) catch()
rollout create_wall "Create Quick Wall"
(
local walls = #(), sel, ss
fn filterShape shape = isKindOf shape SplineShape or isKindOf shape Line

group "Wall Name ..."
(
edittext et_wallname "" pos:[5,25] width:135 height:17 text:"Wall"
colorPicker cp_wire "" color:[61,135,6] pos:[138,25] width:15 height:17
checkbox cb_unique "Use Unique Name" pos:[10,45]
checkbox cb_random "Randomize Each Color" pos:[10,65]
)
group "Wall Params ..."
(
radiobuttons rb_mode "Mode:" labels:#("Outline-Extrude", "Extrude-Shell") pos:[10,110]
spinner spn_outline "Outline = " range:[-1e5,1e5,10] type:#worldunits pos:[11,160] fieldwidth:70
spinner spn_extrude "Extrude = " range:[-1e5, 1e5,320] type:#worldunits pos:[10,180] fieldwidth:70
spinner spn_ext_segs "Extrude Segs = " range:[1, 1e5,1] type:#integer pos:[10,200] fieldwidth:50
checkbox cb_extrude "Instance Extrude Modifier" checked:on pos:[10,220]
spinner spn_shellin "Shell In = " range:[0,1e5,5] type:#worldunits pos:[10,240] fieldwidth:70 enabled:off
spinner spn_shellout "Shell Out = " range:[0,1e5,5] type:#worldunits pos:[11,260] fieldwidth:70 enabled:off
checkbox cb_shell "Instance Shell Modifier" checked:on pos:[10,280] enabled:off
button btn_reverse "Reverse Knots Order" pos:[10,300] width:140 height:18
button btn_delete "Delete Walls" pos:[10,320] width:140 height:18
button btn_delete_one "Delete Single Wall" pos:[10,340] width:140 height:18
)
group "Create Wall ..."
(
button btn_create "G O !" pos:[10,390] width:140 height:18
)
on rb_mode changed state do
(
if state == 1 then
(
spn_outline.enabled = on
spn_shellin.enabled = spn_shellout.enabled = cb_shell.enabled = off
)
else
(
spn_outline.enabled = off
spn_shellin.enabled = spn_shellout.enabled = cb_shell.enabled = on
)
)

on btn_delete pressed do
(
delete (for node in walls where isValidNode node collect node) ; free walls
)
on btn_delete_one pressed do
(
sel = for i in selection collect i.name
if sel.count <=0 then messagebox "Select a single Wall..."
else
if sel.count >=2 then messagebox "Select a single Wall..."
else
if superclassof $ == shape then messagebox "You have selected the SplineShape\n Please select a Wall..."
else
if superclassof $ != shape then delete $
)
on btn_reverse pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:on else
(
with redraw off
(
for sp in selection where filterShape sp do
(
integer = numSplines sp
number = if (e = getSplineSelection sp).count == 0 then (#{1..numsplines sp} as array) else e
for n in number do reverse sp n
)
)
)

on btn_create pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:on else
(
if et_wallname.text == "" then messagebox "Enter Some Name" title:"Warning" beep:off else
(
if GetCommandPanelTaskMode() != #create do setCommandPanelTaskMode #create
node = (Extrude amount:spn_extrude.value segs:spn_ext_segs.value)
modifier = if rb_mode.state == 2 do (Shell innerAmount:spn_shellin.value outerAmount:spn_shellout.value straightenCorners:on)
with redraw off
(
for sp in selection where filterShape sp do
(
shape = copy sp name:(if cb_unique.checked then uniquename et_wallname.text else et_wallname.text) \
wirecolor:(if cb_random.checked then (random black white) else cp_wire.color)
append walls shape
if spn_outline.value != 0 and rb_mode.state == 1 do applyOffset shape spn_outline.value
if spn_extrude.value != 0 do
(
if not cb_extrude.checked then addmodifier shape (copy node) else addmodifier shape node
)
if rb_mode.state == 2 do
(
if not (spn_shellin.value == 0 and spn_shellout.value == 0) do
(
if not cb_shell.checked then addmodifier shape (copy modifier) else addmodifier shape modifier
)
)
)
)
)
)

on create_wall open do
(
messageBox "To work correctly with - Create Quick Wall - \n you must convert the Shape in Editable Spline " title:"Info..." beep:true
q = querybox "You want check, select and convert to Edit Spline the Shape?" title:"Check Spline" beep:on

if q then
(
for o in shapes collect o.name
if shapes.count <=0 then messagebox "No SplineShape in the scene!" title:"Check Spline" beep:true
else
(
clearSelection()
ss = select (for s in shapes where s.category == #splines collect s)
converttosplineshape $selection
)

)

)
)
createDialog create_wall 160 440 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)

barigazy · 2014-08-18

hmmm...
Do you want to start with comments what you doing wrong here?

Michele71 · 2014-08-18

do you think it is wrong the warning to convert the shape in editspline?

barigazy · 2014-08-18

I'll tell you what I mean
First of all it's very annoying that every time you start the tool you get this message and query box and overlap main script UI.
Better solution will be to add button at the top to check scene if there any spline.
Second: why do you need "Delete Single Wall" button. User can easely delete selected wall manualey. Also never use dollar sign "$" in your code.

barigazy · 2014-08-18

code for delete single wall

on btn_delete_one pressed do
(
if selection.count != 1 then messagebox "Select a single Wall..." title:"Warning" beep:off else
(
if isKindOf selection[1] GeometryClass and isKindOf selection[1].baseobject Shape do delete selection[1]
)
)

barigazy · 2014-08-18

And Yes why do you want to convert shapes to spline shapes?
I allready filtered this for reverse knots operation(see filterSpl fn at the top).

Michele71 · 2014-08-18

I've noticed that in the previus script, if there is a shape (not editable spline)in the scene, the script does not create the wall on it...

barigazy · 2014-08-18

Because of filterSpl fn. Give me a half hour to correct the tool

Michele71 · 2014-08-18

In fact, I've noticed the filter, but I thought it would go so well :)

Michele71 · 2014-08-18

Ok!

Actually I have not thought about a button to check the shapes. Yes, the message it's annoying...

For the "Delete Single Wall" button, I notice that in the previous script all the wall are deleted. Then add that button seems be a solution "acceptable" :D

For sign "$" it is my fault from the beginning of my studies with MAXScript ...

barigazy · 2014-08-12

Added :
-- wirecolor option (solid or random color)
-- option for unique name

try (destroyDialog ::create_wall) catch()
rollout create_wall "Create Quick Wall"
(
local walls = #()
fn filterShape shape = isKindOf shape SplineShape or isKindOf shape Line

group "Wall Name ..."
(
edittext et_wallname "" pos:[5,25] width:135 height:17 text:"Wall"
colorPicker cp_wire "" color:[61,135,6] pos:[138,25] width:15 height:17
checkbox cb_unique "Use Unique Name" pos:[10,45]
checkbox cb_random "Randomize Each Color" pos:[10,65]
)
group "Wall Params ..."
(
radiobuttons rb_mode "Mode:" labels:#("Outline-Extrude", "Extrude-Shell") pos:[10,110]
spinner spn_outline "Outline = " range:[-1e5,1e5,10] type:#worldunits pos:[11,160] fieldwidth:70
spinner spn_extrude "Extrude = " range:[-1e5, 1e5,320] type:#worldunits pos:[10,180] fieldwidth:70
checkbox cb_extrude "Instance Extrude Modifier" checked:on pos:[10,200]
spinner spn_shellin "Shell In = " range:[0,1e5,5] type:#worldunits pos:[10,220] fieldwidth:70 enabled:off
spinner spn_shellout "Shell Out = " range:[0,1e5,5] type:#worldunits pos:[11,240] fieldwidth:70 enabled:off
checkbox cb_shell "Instance Shell Modifier" checked:on pos:[10,260] enabled:off
button btn_reverse "Reverse Knots Order" pos:[10,280] width:140 height:18
button btn_delete "Delete Walls" pos:[10,300] width:140 height:18
)
group "Create Wall ..."
(
button btn_create "G O !" pos:[10,345] width:140 height:18
)
on rb_mode changed state do
(
if state == 1 then
(
spn_outline.enabled = on
spn_shellin.enabled = spn_shellout.enabled = cb_shell.enabled = off
)
else
(
spn_outline.enabled = off
spn_shellin.enabled = spn_shellout.enabled = cb_shell.enabled = on
)
)

on btn_delete pressed do
(
delete (for node in walls where isValidNode node collect node) ; free walls
)

on btn_reverse pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:off else
(
with redraw off
(
for sp in selection where filterShape sp do
(
integer = numSplines sp
number = if (e = getSplineSelection sp).count == 0 then (#{1..numsplines sp} as array) else e
for n in number do reverse sp n
)
)
)

on btn_create pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:off else
(
if et_wallname.text == "" then messagebox "Enter Some Name" title:"Warning" beep:off else
(
if GetCommandPanelTaskMode() != #create do setCommandPanelTaskMode #create
node = (Extrude amount:spn_extrude.value)
modifier = if rb_mode.state == 2 do (Shell innerAmount:spn_shellin.value outerAmount:spn_shellout.value straightenCorners:on)
with redraw off
(
for sp in selection where filterShape sp do
(
shape = copy sp name:(if cb_unique.checked then uniquename et_wallname.text else et_wallname.text) \
wirecolor:(if cb_random.checked then (random black white) else cp_wire.color)
append walls shape
if spn_outline.value != 0 and rb_mode.state == 1 do applyOffset shape spn_outline.value
if spn_extrude.value != 0 do
(
if not cb_extrude.checked then addmodifier shape (copy node) else addmodifier shape node
)
if rb_mode.state == 2 do
(
if not (spn_shellin.value == 0 and spn_shellout.value == 0) do
(
if not cb_shell.checked then addmodifier shape (copy modifier) else addmodifier shape modifier
)
)
)
)
)
)
)
createDialog create_wall 160 370 10 110 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)

Definitely perfect!

Gabriel Corazza · 2014-08-12

I separate my objects by edge color, you helped me more than enough. The name is exactly the right way. Many thanks again. You have an impressive speed of creation. Congratulations for the excellent work, I'm sure you've helped a lot more people that have this problem! Thank you very much, for helping me the second time! Peace bro!

barigazy · 2014-08-12

Yup. I definitely lost the count :)

Michele71 · 2014-08-13

heheheheh at this point, I also use it :D Thanks for thanks for having improved the script base barigazy :)

barigazy · 2014-08-13

You welcome guys!

;)

Here you can add more features like:
- control height segments of extrusion
- control thickness segments
- maybe replace extrude modifier with bevel modifier
- override Mat ID for inner and outer side of the walls
- adding more modes (combos) by using sweep, bevel profile etc.
- more controls for base spline (welding, changing knots type etc.)
But I left this to you guys :)

Michele you can post this tool in the script section of this forum.

Michele71 · 2014-08-13

Thanks barigazy, but I would prefer that you do it :)

barigazy · 2014-08-13

Come on man! :)
The code is very easy. It is harder to write code for UI here then actual function for GO! button :)

Michele71 · 2014-08-13

hahahahhah !! the time that I miss, I'm always busy with work!!! Is hard find the time to make these small changes :)

barigazy · 2014-08-13

Same here :) My work is not mxs related so ...

:]

Gabriel Corazza · 2014-08-13

I spend a lot of time working, do one project per day (Exhibit Design). But with my new scripts daily working time is decreasing, when all the shortcuts are ready I will have much more time to study MAXScript and be part of this team. I'm going to make these improvements! I just need time.

barigazy · 2014-08-13

We all need the time to do what we like :)
I'm also glad that this tool enables you to work faster

barigazy · 2014-08-12

I added few more options:
-- support for multiple objects
-- reverse knots order of selected spline or all "attached" shapes
-- 2 modes: use offset shape and extrude modifier method or combo with extrude and shell modifier which is more flexible solution for sure
-- created modifiers can be instance or copy


try (destroyDialog ::create_wall) catch()
rollout create_wall "Create Quick Wall"
(
local walls = #()
fn filterShape shape = isKindOf shape SplineShape or isKindOf shape Line

group "Enter Name Wall ..."
(
edittext et_wallname "" pos:[5,25] width:145 height:17 text:"Wall"
)
group "Wall Params ..."
(
radiobuttons rb_mode "Mode:" labels:#("Outline-Extrude", "Extrude-Shell") pos:[10,70]
spinner spn_outline "Outline = " range:[-1e5,1e5,10] type:#worldunits pos:[11,120] fieldwidth:70
spinner spn_extrude "Extrude = " range:[-1e5, 1e5,320] type:#worldunits pos:[10,140] fieldwidth:70
checkbox cb_extrude "Instance Extrude Modifier" checked:on pos:[10,160]
spinner spn_shellin "Shell In = " range:[0,1e5,5] type:#worldunits pos:[10,180] fieldwidth:70 enabled:off
spinner spn_shellout "Shell Out = " range:[0,1e5,5] type:#worldunits pos:[11,200] fieldwidth:70 enabled:off
checkbox cb_shell "Instance Shell Modifier" checked:on pos:[10,220] enabled:off
button btn_reverse "Reverse Knots Order" pos:[10,240] width:140 height:18
button btn_delete "Delete Walls" pos:[10,260] width:140 height:18
)
group "Create Wall ..."
(
button btn_create "G O !" pos:[10,305] width:140 height:18
)
on rb_mode changed state do
(
if state == 1 then
(
spn_outline.enabled = on
spn_shellin.enabled = spn_shellout.enabled = cb_shell.enabled = off
)
else
(
spn_outline.enabled = off
spn_shellin.enabled = spn_shellout.enabled = cb_shell.enabled = on
)
)

on btn_delete pressed do
(
delete (for node in walls where isValidNode node collect node) ; free walls
)

on btn_reverse pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:off else
(
with redraw off
(
for sp in selection where filterShape sp do
(
integer = numSplines sp
number = if (e = getSplineSelection sp).count == 0 then (#{1..numsplines sp} as array) else e
for n in number do reverse sp n
)
)
)

on btn_create pressed do if selection.count == 0 then messagebox "Select Shape Object" title:"Warning" beep:off else
(
if et_wallname.text == "" then messagebox "Enter Some Name" title:"Warning" beep:off else
(
if GetCommandPanelTaskMode() != #create do setCommandPanelTaskMode #create
node = (Extrude amount:spn_extrude.value)
modifier = if rb_mode.state == 2 do (Shell innerAmount:spn_shellin.value outerAmount:spn_shellout.value straightenCorners:on)
with redraw off
(
for sp in selection where filterShape sp do
(
shape = copy sp name:(uniquename et_wallname.text)
append walls shape
if spn_outline.value != 0 and rb_mode.state == 1 do applyOffset shape spn_outline.value
if spn_extrude.value != 0 do
(
if not cb_extrude.checked then addmodifier shape (copy node) else addmodifier shape node
)
if rb_mode.state == 2 do
(
if not (spn_shellin.value == 0 and spn_shellout.value == 0) do
(
if not cb_shell.checked then addmodifier shape (copy modifier) else addmodifier shape modifier
)
)
)
)
)
)
)
createDialog create_wall 160 330 10 110 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)

Michele71 · 2014-08-12

Great job barigazy :)

This is hot!

Gabriel Corazza · 2014-08-12

I enjoyed the new functions, this script will save me much time. It would be nice if he could group the wall at the end with just the name that I put, without the number "002" or "003" etc. Thank you for facilitating my work! You guys are great!

Michele71 · 2014-08-11

I hope this can help. The only requirement (for now) is that you must select ONE splineshape at a time. The splineshape can be closed or open. If you find error, please let me know!!


if create_wall != undefined do destroyDialog create_wall
try destroyDialog create_wall catch()

rollout create_wall "Create Quick Wall"
(
global copy_shape, cs
	
--- start rollout...
group "Enter Name Wall ..." (
edittext name_wall ""
)
group "Edit Wall ..." (
spinner outp "Outline = " range:[-10000,10000,2] type:#worldunits
spinner amou "Extrude = " range:[-10000, 10000, 25] type:#worldunits
)

group "create Wall ..." (
button cre "Go!"
)

group "Destroy wall..."(
	button des "Destroy and start again ..."
)

--- start create wall...
on cre pressed do
(
 if superclassof $ != shape then messagebox "No SplineShape Selected!!\n Please select Spline..."
 else
		if $ != undefined then
		(
if name_wall.text != "" do
for i in selection do i.name = uniquename name_wall.text
---
copy_shape = copy $
cs = convertToSplineShape copy_shape
select cs
modPanel.setCurrentObject cs.baseObject
subobjectLevel = 3
setSplineSelection  cs #(1)
applyOffset cs outp.value -- insert the value of outline...
updateshape cs 
mod_extrude = addModifier cs (Extrude())
cs.extrude.amount = amou.value -- insert the value of extrude...
)
else messagebox "No SplineShape in the scene"
)
on des pressed do 
(
	if superclassof $ == shape then messagebox "You have selected the SplineShape\n Please select a Wall..."
	else
	if superclassof $ != shape then
	(
	delete selection
	)
	
)
)
CreateDialog create_wall

Aewsome script!

Gabriel Corazza · 2014-08-12

Thank you so much! I loved the two scripts, they are nailed in my viewport! Nice work!It would be possible to add a line that grouped objects at the end of the action? That the name was unique, without "002" etc. If not possible, no problems I'm already happy!