Skip to content

Instantly share code, notes, and snippets.

@KRNKRS
Last active April 21, 2019 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KRNKRS/06cf04b6f506a840b635c28ce0437dc9 to your computer and use it in GitHub Desktop.
Save KRNKRS/06cf04b6f506a840b635c28ce0437dc9 to your computer and use it in GitHub Desktop.
if ( (`window -ex TransformViewerWindow`) == true ) deleteUI TransformViewerWindow;
window -title "Transform Viewer" TransformViewerWindow;
// Main WIndow
scrollLayout -hst 0 -cr true -pe true;
columnLayout -adj true;
// Transform Attribute
for ($snode in `ls -selection`){
frameLayout -collapsable true -label $snode -collapse true -backgroundShade true ;
columnLayout -adjustableColumn true;
setUITemplate -pst attributeEditorTemplate;
string $snodeName = $snode;
string $snodeTrans = $snodeName+".translate";
string $snodeRot = $snodeName+".rotate";
string $snodeScale = $snodeName+".scale";
callbacks -executeCallbacks -hook "AEnewAttributeHandler" $snodeTrans "移動" "";
string $draggableControl = `AEnewVector $snodeTrans "移動" "" `; control -e -dragCallback "AEdragCallback" $draggableControl;
callbacks -executeCallbacks -hook "AEnewAttributeHandler" $snodeRot "回転" "";
$draggableControl = `AEnewVector $snodeRot "回転" "" `; control -e -dragCallback "AEdragCallback" $draggableControl;
callbacks -executeCallbacks -hook "AEnewAttributeHandler" $snodeScale "スケール" "";
$draggableControl = `AEnewVector $snodeScale "スケール" "" `; control -e -dragCallback "AEdragCallback" $draggableControl;
setParent ..; // columnLayout
setParent ..; // frameLayout
}
// Show
showWindow;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment