|
created script or plugin to remove all smoothing groups
on 12-22-2010 06:42 AM
i am using max & i have a scene that has a lot of objects & all of them have smoothing groups.manually i'll have to select each object & remove the smoothing groups one by one.is there any script or plugin that will help me get rid of all the smoothing groups from all the objects together. removing them individually per object is really time consuming. thanx.
|
, spline,
163 Posts,
Join Date Aug 2009,
Location mumbai, india
|
Select all, add "Smooth" modifier ?
|
, card carrying polycounter,
2,426 Posts,
Join Date Oct 2008,
Location London, UK
|
Or just select all and add an edit poly modifier. Then remove all smoothing groups. Collapse stack.
|
, triangle,
467 Posts,
Join Date Jun 2007,
Location Durham, NC
|
by watching the MaxScript Listener Window you can probably come up with quick script that applies a smooth modifier and removes all smoothing, then collapses.
I cover watching it and writing a simple script in this post:
http://www.polycount.com/forum/showthread.php?t=78992
|
, Polycount.com Editor,
13,900 Posts,
Join Date Oct 2004,
Location Seattle, Wa
|
Quote:
Originally Posted by Xoliul
Select all, add "Smooth" modifier ?
|
Yes, this is by far the easiest way to do it if you have a bunch of objects.
Also, I love this script:
http://www.scriptspot.com/3ds-max/sc...moothing-group
I have it assigned to a key, and it makes it real easy to maintain smoothing groups when working on a mesh. Especially when you extrude and whatnot and it resets the smoothing groups for the new polys. Also, in Max2011 you can bind a key to a popup window with the smoothing groups selection box.
|
, card carrying polycounter,
1,932 Posts,
Join Date May 2010,
Location Los Angeles
|
here you go
Code:
macroScript cw_all1smooth
category:"CWtools"
tooltip:"cw_all1smooth"
(
-- set all selected to 1 smooth group
fn all1smooth sel=
(
for a in sel do
(
if classof a == editable_poly then
(
polyop.setFaceSmoothGroup a #all 13
)
)
)
all1smooth (selection as array)
)
macroScript cw_allnosmooth
category:"CWtools"
tooltip:"cw_allnosmooth"
(
-- set all selected to no smooth group
fn allnosmooth sel=
(
for a in sel do
(
if classof a == editable_poly then
(
polyop.setFaceSmoothGroup a #all 0
)
)
)
allnosmooth (selection as array)
)
|
, polycounter,
776 Posts,
Join Date Jan 2006,
Location UK
|
Last edited by Jonathan; 12-23-2010 at 08:51 AM..
|
, triangle,
362 Posts,
Join Date Feb 2008,
Location Cary, NC
|
thanx a lot for the great help guys...actually the easiest way is to add just a smooth modifier & collapse.i went with that.
Last edited by himadri_sm; 12-23-2010 at 12:49 PM..
|
, spline,
163 Posts,
Join Date Aug 2009,
Location mumbai, india
|
Yeah, that's sorta like what this one does, as normally using Max modifiers allow less memory usage and faster performance as it access the functions from the C++ core, IIRC,
Code:
--UI, function stuff, etc. removed to show the main example
--snip
if selection.count >= 1 then
(
local polycountSmoothModi = (Smooth autosmooth: FacetdFaces threshold: smoothAngle name: ("SmoothBy" + (smoothAngle as string)))
for o in selection do if superClassOf o == geometryClass do
(
addModifier o polycountSmoothModi
if (cnvToP) then
(
convertToPoly o
)
)
)
else
(
messageBox "No objects selected. Please select at least one object." beep:false
)
)
--snip
You can use polyOp and meshOp operations, but in the tests I've run, they're 30% slower, but either way, whatever gets the job done. 
Last edited by Jonathan; 12-24-2010 at 01:36 AM..
|
, triangle,
362 Posts,
Join Date Feb 2008,
Location Cary, NC
|
Heh heh nice stuff Jonathan. For me, 30% of a few miliseconds is bearable overhead. I should look more into using the stack. SOmetimes it's much neater way to achieve necessary results.
You're right though, scripting is kind of fun. Especially when it saves time longer term. 
|
, polycounter,
776 Posts,
Join Date Jan 2006,
Location UK
|
Yeah, there's like 10 ways to do everything in Max due to "legacy support", so sometimes it's cool to see all the various ways people solve problems in Max.

|
, triangle,
362 Posts,
Join Date Feb 2008,
Location Cary, NC
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Copyright 1998-2012 A. Risch
|