Jump to content
3DCoat Forums

Adding scripts as menu items in 3DC 2022


kritskiy.001
 Share

Go to solution Solved by kritskiy.001,

Recommended Posts

  • Member

Hello, I'm moving to 2022 and I'm trying to bring my scripts from V4 to 2022.

In V4 I would have a \ExtraMenuItems folder with a bunch of .xmls with MenuPath, MenuItem and Command tags to define the name, menu and the actual script that's going to be used when the command is selected.

I copied the folder to the \Documents\3DCoat\UserPrefs\Scripts\ExtraMenuItems\ and the scripts appear in 2022. However non of them works, I'm getting "Nothing was built in the module" error. If I run the script via Scripts > Run menu they work fine. Should I change anything for the scripts to work from the menus?

Thanks

image.thumb.png.8e9836b25d5ef695e25c85ddd7f6c4d1.png

Link to comment
Share on other sites

  • Member
1 hour ago, Carlosan said:

Hello

Better to ask Andrew.

I am shotting in the dark: try edit current room. I guess you have to add it to the text of the menu scripts.

Thanks, but it seems that editing the menu script won't help: there are no "commands" unless I'm missing something. Everything is being called via menu_item() function... Even the recent scripts list calls for a recent scripts menu item:

image.png.f788f7ff5e320f7246e05afaf9578386.png

 

When you say "Better ask Andrew" do you mean by writing to his email? I imagine he gets 10000000 messages a day lol

Thanks

  • Thanks 1
Link to comment
Share on other sites

  • Member
  • Solution

Ok got an answer from Andrew: the path in the .xml Command tag should be relative to the 3dc Prefs folder. In V4 it's

<Command>script:Scripts/ExtraMenuItems/scriptName.cpp</Command>

and in 2022 the prefs were moved deeper:

<Command>script:UserPrefs/Scripts/ExtraMenuItems/scriptName.cpp</Command>

 

Edited by kritskiy.001
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...