I need simple script, but I have no skill in scripting at all. Script should convert all selected objects to ed. Poly, then reset xForm, and finally add edit poly mod. (unique for every object). I will be very grateful for your help!
Forum topic · Scripts Wanted
Small script required
By trueman · 2013-09-20
Description
Comments (6)
barigazy · 2013-09-20
try(destroyDialog ::ctpRoll)catch()
rollout ctpRoll "convertToEP"
(
button btn "Convert" pos:[5,5] width:90
on btn pressed do
(
undo off with redraw off
(
if selection.count != 0 do for o in selection where canConvertto o editable_poly do
(
resetXForm o ; converttoPoly o ; addModifier o (Edit_Poly())
)
)
)
)
createDialog ctpRoll 100 30 style:#(#style_titlebar, #style_sysmenu, #style_toolwindow)
trueman · 2013-09-20
Thanks for your attention to my issue. What should I modify in this script to:
- make it work without button "convert"
- apply resetXform after coverting to ed. poly
barigazy · 2013-09-20
To works without rollout ei. button pressed you can run code from lestener or make simple macro. Which one do you prefere?
Also if I add resetXform after conversion then you will have two modifiers in modify panel: XForm and EditPoly
trueman · 2013-09-20
simple macro
yes, it is exactly what I want
barigazy · 2013-09-20
macroScript ConvertSelectionToEPoly category:"barigazy" buttonText:"CTEP" tooltip:"Convert Selection To EPoly"
(
undo off with redraw off
(
max create mode
if selection.count != 0 do for o in selection where canConvertto o editable_poly do
(
converttoPoly o ; resetXForm o ; addModifier o (Edit_Poly())
)
)
)
trueman · 2013-09-20
That's great, thank you!