VesuvianPrime
03-06-2011, 04:24 PM
Hi
I've been looking at a bunch of example Python nodes and AETemplates but I can't figure out how to create buttons in the attribute area. Currently I'm trying to make a simple file browser but I guess the same principles apply to those little checker-board texture buttons.
How would I go about doing this?
Most recent attempt:
global proc string loadPopup(){
string $loc = `fileDialog -dm "*.txt"`;
return $loc;
//yeah, this doesn't go anywhere, but I'm just trying to get the button to show right now
}
global proc AECustomNodeTemplate( string $nodeName )
{
editorTemplate -beginScrollLayout;
//File Attributes
editorTemplate -beginLayout "File Attributes" -collapse 0;
editorTemplate -addControl "input";
editorTemplate -addControl `button -label "Browse" -c "loadPopup()"`;
editorTemplate -endLayout;
AEdependNodeTemplate $nodeName;
editorTemplate -addExtraControls;
editorTemplate -endScrollLayout;
}
I've been looking at a bunch of example Python nodes and AETemplates but I can't figure out how to create buttons in the attribute area. Currently I'm trying to make a simple file browser but I guess the same principles apply to those little checker-board texture buttons.
How would I go about doing this?
Most recent attempt:
global proc string loadPopup(){
string $loc = `fileDialog -dm "*.txt"`;
return $loc;
//yeah, this doesn't go anywhere, but I'm just trying to get the button to show right now
}
global proc AECustomNodeTemplate( string $nodeName )
{
editorTemplate -beginScrollLayout;
//File Attributes
editorTemplate -beginLayout "File Attributes" -collapse 0;
editorTemplate -addControl "input";
editorTemplate -addControl `button -label "Browse" -c "loadPopup()"`;
editorTemplate -endLayout;
AEdependNodeTemplate $nodeName;
editorTemplate -addExtraControls;
editorTemplate -endScrollLayout;
}
