Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

how to remove checkerboard button in Attribute Editor ?

how to remove checkerboard button in Attribute Editor ?

Anonymous
Not applicable
599 Views
1 Reply
Message 1 of 2

how to remove checkerboard button in Attribute Editor ?

Anonymous
Not applicable

Hi,

I find there are checkerboard buttons at the end of each attribute, can I remove those ?

ae.pngThe cpp and mel code also attached as below:

init.pngaddcontrol.png

0 Likes
600 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Instead of using 'editorTemplate -addControl' to create default controls, use 'editorTemplate -callCustom' to specify scripts where you can create the controls yourself.

For example, for a color control you could use 'attrColorSliderGrp' control to create the same type of control as the default. 'attrColorSliderGrp' has a '-showButton' flag which determines whether to show the texture button or not. By default it is shown so you would have to specify '-showButton off' to disable it. E.g.

global proc my_newColorAttr(string $plug)
{
    string $attr = match("[^.]*$", $plug);
    string $ctlName = $attr + "_ctl";
    attrColorSliderGrp -at $plug -showButton no $ctlName;
}

global proc my_replaceColorAttr(string $plug)
{
    string $attr = match("[^.]*$", $plug);
    string $ctlName = $attr + "_ctl";
    attrColorSliderGrp -e -at $plug $ctlName;
}
...
    editorTemplate -callCustom my_newColorAttr my_replaceColorAttr "color";
    editorTemplate -callCustom my_newColorAttr my_replaceColorAttr "diffuseColor";
    ...etc.

I haven't tested the above code so you may have to fiddle with it a bit.

0 Likes