Home Technical Talk

Maxscript: Attach messes up Material IDs

polycounter lvl 12
Offline / Send Message
jeremiah_bigley polycounter lvl 12
Hey guys I am beating my head against a wall here... Every time I attach something my material Ids get all jumbled up. I can change the attach options to "Do not modify Material or IDs" when I attach manually... but those attach options don't exist in maxscript?

I have looked in the help and google and not found any answer to it.

Anyone have any ideas? Any help is greatly appreciated. :)

Replies

  • jeremiah_bigley
    Offline / Send Message
    jeremiah_bigley polycounter lvl 12
    Ah! I found a workaround. :D If you remove the materials from the objects, then attach, all your material ids stay intact!
  • spacefrog
    Offline / Send Message
    spacefrog polycounter lvl 15
    meshop.attach does have a parameter for this.
    So i think the best way would be to convert epoly's to emesh, do the attach and convert back to epoly again afterwards. Of course this would'nt be necessary when working on an emesh initially

    From the MXS help
    meshop.attach{<target_editable_mesh_node> | <target_mesh>}
    {<source_node> | <source_mesh>}
    targetNode:<node=unsupplied>
    sourceNode:<node=unsupplied>
    attachMat:<{#neither | #MatToID | #IDToMat}=#neither>
    condenseMat:<boolean=true>
    deleteSourceNode:<boolean=true>
Sign In or Register to comment.