Page 1 of 1

small help scripting toolbar buttons

Posted: Thu Jan 28, 2016 9:55 am
by choo-chee
Hello.
I'm trying to program a toolbar button to place a reference MXS file but with a small twist: it will always go the a specific folder and not to the last folder.
Is there a way to do this?
this is my basic script
maxwellBrowseForFile(0, 2, "maxwellLastRefDir", "maxwellCreateReferenceNode", "*.mxs;*.abc")
now I don't know how to change the above to open, say, at "s:\maxwell library\cars", another one at "...\trees", you get it.
thanks

Re: small help scripting toolbar buttons

Posted: Thu Jan 28, 2016 11:42 am
by Mihnea Balta
Code: Select all
string $filters[] = { "MXS,*.mxs", "Alembic,*.abc" };
maxwellFileBrowserDlg("maxwellCreateReferenceNode", "Use", "Use file", "*.mxs", 0, $filters, "c:/temp");
Replace the last argument with the directory you want to use.

Re: small help scripting toolbar buttons

Posted: Thu Jan 28, 2016 11:46 am
by choo-chee
thanks, that's more complicated than my poor knowledge, gonna try it soon.
*EDIT*
that's perfect!
thanks mate.