Accessing buttons on dialogue possible?
-
On 18/07/2014 at 10:53, xxxxxxxx wrote:
If at all possible, I would like to automate caching of x-particles (we have many Cache objects), but the process involves a dialogue.
It begins with a button on the Cache object attributes, which is accessible with:
import c4d from c4d import gui def main() : obj = doc.SearchObject("Cache") c4d.CallButton(obj, c4d.XOCA_CACHE_FILL) if __name__=='__main__': main()
This pulls up the dialogue, with other buttons to initiate the rest of the process.
Is there anyway to access this second set of these buttons? Or it is possible to directly access the dialogue without simulating the first button? Or is there some way to use a timer / delay function and then somehow re-employ the CallButton command?
Thanks.
The res file for the dialogue with the second set of buttons is this:
// C4D-DialogResource
DIALOG IDD_CACHEBUILD
{
NAME IDS_DIALOG; CENTER_V; CENTER_H;
GROUP IDC_STATIC
{
NAME IDS_STATIC1; ALIGN_TOP; SCALE_H;
BORDERSTYLE BORDER_NONE; BORDERSIZE 4, 4, 4, 0;
COLUMNS 1;
STATICTEXT IDC_STATIC { NAME IDS_STATIC; CENTER_V; ALIGN_LEFT; }
STATICTEXT IDC_STATIC { NAME IDS_STATIC3; CENTER_V; ALIGN_LEFT; }
STATICTEXT IDC_STATIC { NAME IDS_STATIC2; CENTER_V; ALIGN_LEFT; }
STATICTEXT IDC_STATIC { NAME IDS_STATIC4; CENTER_V; ALIGN_LEFT; }
GROUP IDC_STATIC
{
NAME IDS_STATIC5; ALIGN_TOP; CENTER_H;
BORDERSTYLE BORDER_NONE; BORDERSIZE 0, 16, 0, 0;
COLUMNS 3;
BUTTON IDC_OVERWRITECACHE { NAME IDS_BUTTON; ALIGN_TOP; ALIGN_LEFT; }
BUTTON IDC_NEWCACHE { NAME IDS_BUTTON1; ALIGN_TOP; ALIGN_LEFT; }
BUTTON IDC_CANCELCACHE { NAME IDS_BUTTON2; ALIGN_TOP; ALIGN_LEFT; }
}
}
}