Sunday, 27 November 2011

Toggling Camera views

Thought i'd start posting up some of the more useful answers i've given on forums. Start off with toggling through camera views, (i believe already possible in 2012 with [ and ] hotkeys) but this script would allow you to enter in the cameras or the order you want to toggle them in, obviously being able to cycle backwards also. Simply just use this script in a hotkey as is to cycle forwards and change the first line from $mode = 0 to $mode = 1 int $mode = 0 ; string $panel = `getPanel -wf` ; string $cam = `modelPanel -q -cam $panel` ; string $view = "persp" ; string $order[] = {"persp","front","side","top"} ; if($mode == 1) $order = {"top","side","front","persp"} ; if($cam == $order[0]) $view = $order[1] ; else if($cam == $order[1]) $view = $order[2] ; else if($cam == $order[2]) $view = $order[3] ; else if($cam == $order[3]) $view = $order[0] ; lookThroughModelPanel $view $panel ;

No comments:

Post a Comment