Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
appwiki:maya:mel [2018/10/23 02:47]
ying [File operation]
appwiki:maya:mel [2019/08/13 01:53] (current)
ying [window mel tool]
Line 1185: Line 1185:
 </​code>​ </​code>​
 ==== window mel tool ==== ==== window mel tool ====
 +
 +=== Windows and Its UIs===
  
 <code mel> <code mel>
Line 1227: Line 1229:
 </​code>​ </​code>​
  
 +  * get window layout and its child UIs <​code>​
 +global proc string findWindowLayout( string $windowUI )
 +{
 +  string $controls[] = `lsUI -l -controlLayouts`;​
 +  string $pattern = $windowUI + "​*";​
 +  string $layout = "";​
 +  for ( $ui in $controls )
 +  {
 +    if ( `gmatch $ui $pattern` )
 +    {
 +      string $tokens[];
 +      int $numTokens = `tokenize $ui "​|"​ $tokens`;
 +      if ( $numTokens > 1 )
 +      {
 +        $layout = $tokens[0] + "​|"​ + $tokens[1];
 +        break;
 +      }
 +    }
 +  }
 +  return $layout;
 +}
 +
 +string $render_layout = findWindowLayout( "​unifiedRenderGlobalsWindow"​ );
 +print($render_layout);​
 +
 +// dig into its child uis
 +string $ca[] = `layout -q -childArray $render_layout`;​
 +print($ca);
 +//​rgMainForm
 +string $ca[] = `layout -q -childArray "​rgMainForm"​`;​
 +// rendererPlusLayerLayout tabForm rgCloseBtn
 +// continues
 +
 +// query width and change layout size
 +layout -q -w ($render_layout+"​|rgMainForm|tabForm|arnoldTabLayout|arnoldAOVsTab|arnoldAOVsScrollLayout"​);​
 +// layout -e -width 800 -height 800 ($render_layout+"​|rgMainForm|tabForm|arnoldTabLayout|arnoldAOVsTab|arnoldAOVsScrollLayout"​);​
 +</​code>​
 ==== Menu ==== ==== Menu ====