一半君的总结纸

听话只听一半君

#13 如何得到当前 layout panel的camera的名字?

proc string getCurrentCamera()
{
  string $camera;

  // 首先得到当前具有焦点(focus)的panel的名字
  string $panel = `getPanel -wf`;

  // 看看这个 panel 的 type 是不是 "modelPanel"
  if ( "modelPanel" == `getPanel -to $panel` )
  {
    // 使用 ‘modelEditor’ command 得到camera的名字
    $camera = `modelEditor -q -camera $panel`;
  }

  return $camera;
}
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: