Bounding box of selected faces

Hi guys, how´s going?
i know there´s some scripts of "create bounding box" objetcs, that creates a box over the selected objects (like this one - http://www.scriptspot.com/3ds-max/scripts/translated-bounding-box). I need a script that makes the same thing, but only in the selected faces (or any sub-object, but mostly faces). I found this one - http://www.scriptspot.com/3ds-max/scripts/bounding-boxer - and it does what i want, but it too "complicated", i need something quicker. Does anyone can help me? I tried to do it using max listener, detaching the faces as a copy and then creating a bounding box using the new object, but for some reason it doesn´t work all the times.
Thanks in advance,

Jsrocha

Comments

Comment viewing options

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

Hey Miauu, thanks for your

Hey Miauu, thanks for your help. This script works, but it creates a dummy instead of a box. I tried to tweak the code, but it doesn´t work (i´m a bad coder). Do you know how to make it create a box?
thanks man,

Jsrocha

jsrocha's picture

Hey Barigazi, thanks for your

Hey Barigazi, thanks for your reply, and excuse my late reply, i was in a big rush here ;)
here´s a screenshot showing what i want -
http://prntscr.com/1qq5jv
Basicaly, is to make a bounding box using the selected faces as size reference. As i said, i made a code that does what i want, but this code have two problems: first, is slow. Two, sometimes it doesn´t work (i don´t know why). In fact, is not a code, is a tweaked macro recorder, i'm pasting it here (pretty embarassing):

( --the code starts with the faces already selected in the object
macros.run "Tools" "Isolate_Selection"
actionMan.executeAction 369982487 "40086" --this hides the unselected faces of the object
$.EditablePoly.Hide #Face
macros.run "BlurScripts" "BBoxMaker" --this is the blur script BBoxMaker, which makes a boundig box using the selected object as reference size
macros.run "Editable Polygon Object" "EPoly_UnHide" --this unhides all the hiden faces of the object
subobjectLevel = 0 --exit sub-object mode
modPanel.setCurrentObject $.baseObject
d = for hwnd in UIAccessor.GetPopupDialogs() where UIAccessor.GetWindowText hwnd == "Warning: Isolated Selection" do exit with hwnd
if d != ok do UIAccessor.PressButtonByName d "Exit Isolation Mode" --these three lines of code i got from the internet, it exits the isolation
)

ok man, that´s it. If you can get a better code, i´ll appreciate (pretty easy i guess ;)
thanks,
Jsrocha

barigazy's picture

...

Post your code and some screenshots to see exactly what you want to achieve

bga

Comment viewing options

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