scripting - Attribute template in Maya -
i working in maya 2014. have custom attributes showing in channels box
. trying show custom attributes in attribute editor
. have aetemplate file called aecamera_orthotemplate.mel
code below:
global proc aecamera_orthotemplate( string $nodename ) { editortemplate -beginscrolllayout ; editortemplate -beginlayout "camera" -collapse 0 ; editortemplate -label "always show frustrum" -addcontrol "boolattr" ; editortemplate -label "frustrum nearz" -addcontrol "numattr" ; editortemplate -label "frustrum farz" -addcontrol "numattr" ; editortemplate -label "frustrum width" -addcontrol "numattr" ; editortemplate -label "frustrum height" -addcontrol "numattr" ; editortemplate -endlayout ; // editing values on shape object, // drag in shape attributes aeshapetemplate $nodename ; editortemplate -addextracontrols ; editortemplate -endscrolllayout ; }
when viewing attribute editor
custom camera shape selected see open camera
layout nothing inside , controls appear placed inside extra attributes
layout section right @ bottom. want see controls nested in camera
section.
any me past hurdle appreciated,
thanks.
i had misunderstood -addcontrol flag, requires name of attribute rather type of control create.
it auto-magically deduces control type attribute when recognized.
the reason controls ending in attributes section due maya being clever , putting unknown attributes section.
hope helpful else.
Comments
Post a Comment