Feb 2007
1 / 3
Feb 2007
Feb 2007

Hey,

I'm trying to create look in the Attribute Editor(AE) similar to that of the Bounding Box Information section on a transform node. I can't seem to find Maya's code to create this. The only look I can get is if I disable/dim it. Can anyone point me in the right direction?

Thanks!
Justin

  • created

    Feb '07
  • last reply

    Feb '07
  • 2

    replies

  • 1.5k

    views

  • 1

    user

can u make its clear plz .. coz in this post i think there is no much info what u trying to do

I actually figured out my problem... here was my solution found in my AE Template

CODE
...

global proc AEboundingBoxNew(string $fileAttribute){
    setUITemplate -pst attributeEditorTemplate;

    rowLayout -nc 2 boundingBoxLayout;
        text -l "Bounding Box";
        string $form = formLayout -numberOfDivisions 100;
        string $xBbox_flt = floatField -ed false -pre 3 xBboxFloat;
        string $yBbox_flt = floatField -ed false -pre 3 yBboxFloat;
        string $zBbox_flt = floatField -ed false -pre 3 zBboxFloat;

        formLayout -edit
            //Particle Shapes Text
            -attachForm $xBbox_flt "left" 0
            -attachPosition $xBbox_flt "right" 0 33
            -attachPosition $yBbox_flt "left" 0 33
            -attachPosition $yBbox_flt "right" 0 66
            -attachPosition $zBbox_flt "left" 0 66
            -attachForm $zBbox_flt "right" 0
            $form;
        setParent ..;

    setParent ..;

    setUITemplate -ppt;

    AEboundingBoxReplace $fileAttribute;
}

global proc AEboundingBoxReplace(string $fileAttribute){
    float $bbx = getAttr ($fileAttribute + "X");
    float $bby = getAttr ($fileAttribute + "Y");
    float $bbz = getAttr ($fileAttribute + "Z");

    floatField -edit -value $bbx xBboxFloat;
    floatField -edit -value $bby yBboxFloat;
    floatField -edit -value $bbz zBboxFloat;
}

...

editorTemplate -beginLayout "Bounding Box Information" -collapse 0;
   editorTemplate -callCustom "AEboundingBoxNew" "AEboundingBoxReplace" "simBoundingBox";    
editorTemplate -endLayout;