Notifications
Clear all

[Closed] meshop.attach condenseMat syntax

hmmm, i tested your script, and the good news is that it works like a charm on a small scale, the bad news is that with millions of polys and thousands of objects…well, it will never finish

i’m not sure if this approach can be optimized at all, but i have a feeling it can’t.

it’s getting late, gotta catch some sleep, will continue my mission tomorrow

yep, can’t optimize it further :sad:. automating the attach function of the editable mesh is the only option then i guess, maybe that can be achieved at sdk level only, hopefully i am wrong

i am out of luck, feeding objects to the attach button interface doesn’t seem to work, at least not with my wild guesses :


select $Box01
meshOps.startAttach $Box01
select $Box02 --nope

select $Box01
meshOps.attachList $Box01
select $Box02 --nope

i am back to edit poly attach, but then i first need to figure out what’s wrong with the mesh, i asked over at npower, we’ll see.

from maxscript reference:

condenseMat is applicable only if attachMat:#IDToMat is specified.

well, condensemat does nothing whatsoever, is it a bug or what’s going on?

I’m running into the same problem here without much of an idea how else to work around.

If i have a set of objects and they all have the same multi material on them, attaching via a script will destroy the multi material on first attach in the loop, I can’t seem to figure out how to have it just attach as if it was done through the UI.

as a horrifically slow workaround, as far as i can tell, it appears to work out ok and create a useful multi sub IF i detach all multi subs/id’s in the selection, collapse the selection by material, and then collapse the separate material objects together into 1 mesh.

theres got to be a better way

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

In your case everything is easy:
Make a copy of your multi-material,
assign “undefined” as material to all objects,
attach them with any settings,
and assign multi-material back.

Page 2 / 2