|
|||||
|
|
#46 |
|
Supplies Coordinator
Join Date: Oct 2004
Location: United States
Posts: 3,343
Thanks: 0
Thanked 11 Times in 8 Posts
|
What does the error code in the little pink box in the lower left say?
__________________
Be sure to check out my blog because there's tons of useful resources there: |
|
|
|
|
|
#47 |
|
conscientious objector
Join Date: Sep 2007
Location: cambridge, uk
Posts: 4,234
Thanks: 3
Thanked 126 Times in 120 Posts
|
dear Santa,
I would like a script that splits edges according to it's UV pelt boundaries/those blue seams you can put in manually (whatever they're called) for christmas please. I've been good honest love from poo |
|
|
|
|
|
#48 |
|
Supplies Coordinator
Join Date: Oct 2004
Location: United States
Posts: 3,343
Thanks: 0
Thanked 11 Times in 8 Posts
|
Juicy one, my little Poopie. Does it have to be the pelt seams, or can it be just UVW clusters? Let me look into this one and get back to you...
__________________
Be sure to check out my blog because there's tons of useful resources there: |
|
|
|
|
|
#49 | |
|
Supplies Coordinator
Join Date: Oct 2004
Location: United States
Posts: 3,343
Thanks: 0
Thanked 11 Times in 8 Posts
|
Quote:
As far as skin/physique goes, getting things to sync back up with detached objects could be pretty wicked depending on how dirty the detachment process is. This requires a little MXS researching...
__________________
Be sure to check out my blog because there's tons of useful resources there: |
|
|
|
|
|
|
#50 |
|
conscientious objector
Join Date: Sep 2007
Location: cambridge, uk
Posts: 4,234
Thanks: 3
Thanked 126 Times in 120 Posts
|
for the UVs either works for me, they amount to the same thing anyway
for that detach one... From my experience skin will probably work out fine even if you dont bake the vertex weights before reattaching - detaching won't cause any problems, Physique will almost certainly give you a lot of grief because it's rubbish, unwraps are generally fine with this sort of behaviour and any topologically independent modifier should be fine. The thing is, while it's an interesting technical challenge it does beg the question "why bother?". almost everything you'd want it to do can be achieved manually in a couple of clicks - if the script were running off a toolbar it probably wouldn't save you anything. no offence meant pickman - it just seems a little unnecessary |
|
|
|
|
|
#51 |
|
Supplies Coordinator
Join Date: Oct 2004
Location: United States
Posts: 3,343
Thanks: 0
Thanked 11 Times in 8 Posts
|
Ugh; the pelt seam conversion to edge selection is all kinds of broken. It appears in the viewport, but for all scripting purposes, this function is a total lie. I'll get back to you Poopipe.
__________________
Be sure to check out my blog because there's tons of useful resources there: |
|
|
|
|
|
#52 |
|
conscientious objector
Join Date: Sep 2007
Location: cambridge, uk
Posts: 4,234
Thanks: 3
Thanked 126 Times in 120 Posts
|
that probably explains why the seams don't persist through unwrap modifiers - it could well be a dead end.
I'd go with the UV clusters then ![]() |
|
|
|
|
|
#53 |
|
Supplies Coordinator
Join Date: Oct 2004
Location: United States
Posts: 3,343
Thanks: 0
Thanked 11 Times in 8 Posts
|
Here're the two ways I see your proposal working, Poopster:
1. Get the edge selection from the pelt seams via Code:
$.modifiers[#unwrap_uvw].getPeltSelectedSeams() >> Problem: The edge seam bit array returned by this function is wrong. The edge IDs returned aren't like what the rest of the UVW modifier or object are expecting. It comes off garbled. 2. Use the built-in conversion from pelt seam to edge selection: Code:
$.modifiers[#unwrap_uvw].unwrap5.peltSeamToEdgeSel true >> Problem: This function doesn't create a real edge selection. It's the weirdest thing ever. The viewport shows an edge selection, but any other commands act on whatever edge selection was in place BEFORE you tried this command. This is total BS. I'm starting to think this feature doesn't really work at all. ![]()
__________________
Be sure to check out my blog because there's tons of useful resources there: |
|
|
|
|
|
#54 |
|
Supplies Coordinator
Join Date: Oct 2004
Location: United States
Posts: 3,343
Thanks: 0
Thanked 11 Times in 8 Posts
|
Yah, you're probably right. Selecting UVW cluster edges is probably a more feasible option; but this one was definitely easier if these functions worked.
![]()
__________________
Be sure to check out my blog because there's tons of useful resources there: |
|
|
|
|
|
#55 |
|
Supplies Coordinator
Join Date: Oct 2004
Location: United States
Posts: 3,343
Thanks: 0
Thanked 11 Times in 8 Posts
|
Filed a report on the Area forums. Planning on getting ignored by Autodesk again.
__________________
Be sure to check out my blog because there's tons of useful resources there: |
|
|
|
|
|
#56 |
|
Supplies Coordinator
Join Date: Oct 2004
Location: United States
Posts: 3,343
Thanks: 0
Thanked 11 Times in 8 Posts
|
I've written out the entire script, the only component missing is getting edges from the UVW selection window to a useful bit array. Below is the code as it stands...
Code:
-- Split by UVW cluster by Mr. Bluesummers
-- Not sea-worthy. Don't use this.
undo on
(
local NumFaces = PolyOp.getNumFaces $
local AllFaces = #{1..NumFaces}
local FacesCompleted = #{}
local Finished = false
while not Finished do
(
-- Get the next face to test
NextFace = 1
while FacesCompleted[NextFace] do
NextFace += 1
-- Get a face in an element.
$.modifiers[#unwrap_uvw].unwrap2.selectFaces #{NextFace}
-- Select the whole element, and convert to edges.
$.modifiers[#unwrap_uvw].unwrap2.selectElement()
$.modifiers[#unwrap_uvw].unwrap2.faceToEdgeSelect()
-- Get the current selection. Get a new selection ready.
CurrentSelection = $.modifiers[#unwrap_uvw].unwrap2.getSelectedEdges()
NewSelection = #{}
-- Select half the edges
for b in CurrentSelection do
if (mod b 2) == 0.0 do
NewSelection[b] = true
-- Assign the new, half-selection of edges.
$.modifiers[#unwrap_uvw].unwrap2.selectEdges NewSelection
-- Select open edges
$.modifiers[#unwrap_uvw].unwrap2.openEdgeSelect()
-- Get the current selection again, prep another new selection.
CurrentSelection = $.modifiers[#unwrap_uvw].unwrap2.getSelectedEdges()
NextNewSelection = #{}
-- Subtract the original half-selection from this current selection.
for b in CurrentSelection do
if not NewSelection[b] do
NextNewSelection[b] = true
-- Set the selection with the result, and redo the open edge selection.
$.modifiers[#unwrap_uvw].unwrap2.selectEdges NextNewSelection
$.modifiers[#unwrap_uvw].unwrap2.openEdgeSelect()
-- We now have the cluster edges.
-- Get edges with UVW-based IDs.
ClusterEdges = $.modifiers[#unwrap_uvw].unwrap2.getSelectedEdges()
-- Get the edges with GEOMETRY-based IDs. FAILS!!
-->> ClusterEdges = $.modifiers[#unwrap_uvw].unwrap5.getSelectedGeomEdges()
-- Convert this to a geometry edge selection and split.
-->> PolyOp.splitEdges $ ClusterEdges
-- Add the current cluster to the completion list.
FacesCompleted += $.modifiers[#unwrap_uvw].unwrap2.getSelectedFaces()
-- If the completion list is equal to all faces, we're done!
if FacesCompleted.numberset == AllFaces.numberset do Finished = true
)
)
![]()
__________________
Be sure to check out my blog because there's tons of useful resources there: |
|
|
|
|
|
#57 |
|
conscientious objector
Join Date: Sep 2007
Location: cambridge, uk
Posts: 4,234
Thanks: 3
Thanked 126 Times in 120 Posts
|
hmm. thats a bit of a bugger.
getting the edge selection is the time consuming part and your code does that bit so it's not a dead loss there could be a hack here somewhere though since manually adding an edit poly on top of an unwrapUVW (with an active selection) carries the selection up the stack. |
|
|
|
|
|
#58 |
|
Registered User
Join Date: Feb 2004
Location: Not Underwater, Japan
Posts: 382
Thanks: 0
Thanked 10 Times in 3 Posts
|
Is there a way to select all edges that have different smoothing groups on either side? if not, would that be hard to script?
__________________
Life is a Game. Life is Dominance War IV. Life is a very old tutorial. Life is a i7940, Geforce GTX 295, 6Gb Ram, Cosmos S PC. |
|
|
|
|
|
#59 |
|
Registered User
Join Date: Feb 2008
Location: Italy
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
|
there's someway to add a modifier for the editable poly(even in the quad menu) that works as a push modifier on the fly, without adding the modifier itself?
it should push the selected vertex in the direction of their normal, is it hard to do??? |
|
|
|
|
|
#60 |
|
conscientious objector
Join Date: Sep 2007
Location: cambridge, uk
Posts: 4,234
Thanks: 3
Thanked 126 Times in 120 Posts
|
just use normal constraint in edit poly - its there in max 2008 or above
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|