Hi Polycount,
I'm currently in the process of optimising a falcon model and I was wondering if there was any way that I could automate the optimisation of the feathers as they appear to be instances.
I've tried to record a macro but nothing happens when I try to run it.
Could it be to do with the fact that the names of the feathers are different and the macro references the original feather model?
Any help on this would be greatly appreciated as I have minimal experience with MAXScript
Thanks,
Mike
Replies
http://pastebin.com/3WNxuKRq
Here's the dropbox links:
https://dl.dropboxusercontent.com/u/17367483/Feathers/feathers2.max
https://dl.dropboxusercontent.com/u/17367483/Feathers/feathers.FBX
https://dl.dropboxusercontent.com/u/17367483/Feathers/feathers.mtl
https://dl.dropboxusercontent.com/u/17367483/Feathers/feathers.obj
Thanks,
Mike
<br><br>ePoly = $.modifiers[#Edit_Poly] -- alias, for convenience<br><br>setCommandPanelTaskMode #modify -- switch to Modify panel so that we can enter subobject mode<br>subObjectLevel = 2 -- go to edge mode<br>ePoly.SetSelection #Edge #{} -- clear existing Edge Selection if any<br><br>ePoly.Select #Edge #{131, 133, 135} -- set new selection<br>PolytoolsSelect.DotRing 1 -- Dot Ring function, 1 is the gap value (macros.run will use the last used value so I used this to be explicit)<br>ePoly.ButtonOp #RemoveEdgeRemoveVertices -- selected are removed, no need to deselect again<br>ePoly.Commit() -- better safe than sorry, topology changed so better force update of the poly modifier<br><br>ePoly.Select #Edge #{155..157}<br>PolytoolsSelect.DotRing 1<br>ePoly.ButtonOp #RemoveEdgeRemoveVertices<br>ePoly.Commit()<br><br>ePoly.Select #Edge (#{5, 9, 12, 14, 16, 26, 29, 36, 39, 46, 51, 74} + #{7, 10, 13, 15, 17, 27, 30, 37, 40, 47, 52, 75} - #{5, 7, 46, 47})<br>ePoly.ButtonOp #RemoveEdgeRemoveVertices<br>ePoly.Commit()<br><br>ePoly.Select #Edge #{24, 25}<br>ePoly.ButtonOp #RemoveEdge<br>ePoly.Commit()<br><br>subObjectLevel = 1 -- go to vertex mode<br>ePoly.SetSelection #Vertex #{} -- clear existing selection, if any<br>ePoly.Select #Vertex #{14, 15, 18}<br>ePoly.ButtonOp #RemoveVertex<br>ePoly.Commit()<br><br>subObjectLevel = 2<br>ePoly.SetSelection #Edge #{}<br>ePoly.Select #Edge #{5, 7}<br>ePoly.ButtonOp #RemoveEdge<br>ePoly.Commit()<br><br>subObjectLevel = 1<br>ePoly.SetSelection #Vertex #{}<br>ePoly.Select #Vertex #{4, 5}<br>ePoly.ButtonOp #RemoveVertex<br>ePoly.Commit()<br><br>subObjectLevel = 0 -- exit subobject mode
Also, thanks for providing the notes - They will help me create similar versions of the script to work on the different types of feather.