global proc vp2render() { if ( `window -exists vp2render_window` ) { deleteUI -window vp2render_window; } int $windowWidth = 128; int $buttonHeight = 22; int $windowHeight = 300;//set to button count string $gozbuddyWindow = `window -title "Viewport2 Buddy" -rtf true -wh $windowWidth $windowHeight -menuBar false vp2render_window`; columnLayout -adjustableColumn true -columnAttach "both" 10; separator -style "none" -w $windowWidth -h 6; ///////////////////////////Window Padding button -l "Tile Render" -c "tileRenderer;" -height $buttonHeight -align "center"; separator -style "none" -w $windowWidth -h 2; // // button // -l "Make Dynamic RB" // -c "string $mySelection[] = `ls -sl`;\nfor($each in $mySelection)\n{\nsetAttr ($each + \".bodyType\") 2;\n}" // -height $buttonHeight // -align "center"; // // separator -style "none" -w $windowWidth -h 2; // // button // -l "Set to Hull" // -c "string $mySelection[] = `ls -sl`;\nfor($each in $mySelection)\n{\n\nsetAttr ($each + \".colliderShapeType\") 4;\n}" // -height $buttonHeight // -align "center"; ///////////////////////////Window Padding separator -style "none" -w $windowWidth -h 6; setParent ..; showWindow vp2render_window; } global proc tileRenderer() { setAttr "perspShape.cameraScale" 0.550; setAttr "perspShape.verticalFilmOffset" -0.630; setAttr "perspShape.horizontalFilmOffset" -0.630; setAttr -type "string" defaultRenderGlobals.imageFilePrefix "top_right"; RedoPreviousRender; setAttr "perspShape.verticalFilmOffset" 0.630; setAttr "perspShape.horizontalFilmOffset" -0.630; setAttr -type "string" defaultRenderGlobals.imageFilePrefix "bottom_right"; RedoPreviousRender; setAttr "perspShape.verticalFilmOffset" -0.630; setAttr "perspShape.horizontalFilmOffset" 0.630; setAttr -type "string" defaultRenderGlobals.imageFilePrefix "top_left"; RedoPreviousRender; setAttr "perspShape.verticalFilmOffset" 0.630; setAttr "perspShape.horizontalFilmOffset" 0.630; setAttr -type "string" defaultRenderGlobals.imageFilePrefix "bottom_left"; RedoPreviousRender; setAttr "perspShape.verticalFilmOffset" -0; setAttr "perspShape.horizontalFilmOffset" -0; setAttr -type "string" defaultRenderGlobals.imageFilePrefix ""; setAttr "perspShape.cameraScale" 1; }