Home Technical Talk

Maya how to change the standard vertex boundary?

polycounter lvl 7
Offline / Send Message
Sunray polycounter lvl 7
Hey when I use smooth mesh preview I would like to have it set at sharp edges. But you have to click it for each object is there a way to set the preference to sharp edges instead of sharp edges and corners? I tried to find it but I can't find it anywhere but I'm sure it's possible right?

Replies

  • eltarbos
    Options
    Offline / Send Message
    eltarbos polycounter lvl 7
    I don't think you can change the default behavior but if you want to set the vertex boundary to sharp on multiple selected objects, you can use this small script:

    string $sel[] = `ls -sl -fl`;
    string $selShape[] = `listRelatives -s $sel`;
    for ($i=0; $i<(`size $selShape`); ++$i)
        {
        setAttr ($selShape[$i]+".osdVertBoundary") 2;
        }

    If you don't want to select all the objects and set this to all objects in the scene, use this instead:

    string $selShape[] = `ls -typ "mesh"`;
    for ($i=0; $i<(`size $selShape`); ++$i)
        {
        setAttr ($selShape[$i]+".osdVertBoundary") 2;
        }

    If you want to go back to normal, change the osdVertBoundary attribute from 2 to 1.


  • Sunray
    Options
    Offline / Send Message
    Sunray polycounter lvl 7
    eltarbos said:
    I don't think you can change the default behavior but if you want to set the vertex boundary to sharp on multiple selected objects, you can use this small script:

    string $sel[] = `ls -sl -fl`;
    string $selShape[] = `listRelatives -s $sel`;
    for ($i=0; $i<(`size $selShape`); ++$i)
        {
        setAttr ($selShape[$i]+".osdVertBoundary") 2;
        }

    If you don't want to select all the objects and set this to all objects in the scene, use this instead:

    string $selShape[] = `ls -typ "mesh"`;
    for ($i=0; $i<(`size $selShape`); ++$i)
        {
        setAttr ($selShape[$i]+".osdVertBoundary") 2;
        }

    If you want to go back to normal, change the osdVertBoundary attribute from 2 to 1.


    Thank you so much.
Sign In or Register to comment.