Adding scripts to DS Scripts Menu
Richard Penney
Posts: 41
I'd like to write an install script that copies files from an unzipped file collection into a DS Content Library location.
Once the files have been copied, I'd like to add them to the DS Scripts Menu. That would involve adding a new Submenu to the Scripts Root Menu, and programatically invoking 'Create Custom Action'.
Is there a way to do this with DS Scripts?
Comments
As I recall you want DzActionMgr
Thanks Richard. I got it working.
In case others have an interest in this operation, here's my code example.
I think that will fail if there's no Scripts menu as you are not refreshing oScriptsMenu after attempting to add the Scripts menu and then you return if the object isn't valid, which of course it isn't or the conditional code wouldn't be executing.
Rob does have a sample script for this http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/actions/action_custom_create/start
Thanks Richard. I'm now refreshing oScriptsMenu by reassigment, as shown below.
Is this the correct way of doing it?
Other than that, my script works fine.
Looks right to me, yes.