scripts duplicated in the tools panel
Moderators: Víctor Paredes, Belgarath, slowtiger
scripts duplicated in the tools panel
I didn't post this on the bugs section because I feel I may be doing something silly wrong. Since a few weeks ago I have some script tools duplicated in my tool panel, always in pairs one with the correct provided icon and the other with no icon just a question mark.
What did I do wrong? They are on the tool folder and the files are not duplicated only one lua and one icon for each script. I tried removing them (and both got removed from the tool panel) and installing them again but they keep appearing like that in pairs. It only happens to 3 or 4 script tools but not to the rest.
What did I do wrong? They are on the tool folder and the files are not duplicated only one lua and one icon for each script. I tried removing them (and both got removed from the tool panel) and installing them again but they keep appearing like that in pairs. It only happens to 3 or 4 script tools but not to the rest.
Re: scripts duplicated in the tools panel
Your tools_list.txt file might be incorrect. Check speling mistakes and make sure even the capital letters match the scripts.
Re: scripts duplicated in the tools panel
Yep it might because I didn't know it existed. I probably copied it from someone's archives some day.
Thanks I will look for errors there. And now that I'm trying to resolve this, I always wanted to know how people make sections inside the tool panel and also how can I create sections (folders?) on the scripts menu. Is there something about that in the documentation? Or is there any tutorial about that?
- hayasidist
- Posts: 3831
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: scripts duplicated in the tools panel
Edit / Preferences / Tool Layout
page 443 in the 13.5 manual
- synthsin75
- Posts: 10253
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: scripts duplicated in the tools panel
Tools can also have different file names but their internal function names are the same. These will show up as two tools, one with an icon and one without, but both will be using the same script (the last one Moho happened to load). This can happen with some custom scripts, where the file is not named with lm_ but the internal code is, to utilize some functionality that's only available to LM named functions.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: scripts duplicated in the tools panel
Oh cool thank you!hayasidist wrote: ↑Fri Oct 08, 2021 9:14 am
Edit / Preferences / Tool Layout
page 443 in the 13.5 manual
I think I copied that file installing scripts from Mynd. I wasn't sure if I had to do that. I deleted it today expecting Moho to create it again but that didn't happen so I took the file from Moho's official tool folder on the installation folder. I don't really know what I'm doing. But that may have fixed some of the duplicated tools, except one.
Thank you, that pointed me in the right direction.synthsin75 wrote: ↑Fri Oct 08, 2021 7:06 pm Tools can also have different file names but their internal function names are the same. These will show up as two tools, one with an icon and one without, but both will be using the same script (the last one Moho happened to load). This can happen with some custom scripts, where the file is not named with lm_ but the internal code is, to utilize some functionality that's only available to LM named functions.
I realize that some of them were not duplicated but they were just meant to be menu scripts, because they didn't have an icon, so I put them as menu scripts.
Other scripts were modified versions of the official tools starting with lm but ended in a different way. I renamed those as the official name and that made them the official version of the tool inside Moho, but they kept showing no icon, so I went to Moho's installation folder and copied the official icons of that tool from there and pasted in my scripts folder. That solved it, they have icons now.
The duplicated tools I think got fixed by the mess I made with the tools list file, but there is still only one script that keeps being duplicated: the Select Keyed script by Hayasidist. Maybe it's because its from 2017... but I have the feeling that it may have something to do with the fact that I had a shortcut for that tool. My shortcuts panel shows empty rows at the "group of tools: other" section, and it also show other extra tool groups, the ones that got installed when I installed the Mynd tools (Group of tools: MYND_ANIM, Group of tools: MYND_MOVER, and more) but those groups are not working, they don't show up on the tools panel, or on the Edit / Preferences / Tool Layout panel, or on the tool list text file. Something is wrong with that.
- hayasidist
- Posts: 3831
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: scripts duplicated in the tools panel
The tool itself (even my "Select Keyed" script) doesn't have any knowledge or control over which group it appears in. Of note, however, "Select Keyed" is a BUTTON not a TOOL (it has no UI), so if you've got a line in your _tool_list that refers to it as a tool that might explain the duplication?????Daxel wrote: ↑Sat Oct 09, 2021 10:53 am ... but there is still only one script that keeps being duplicated: the Select Keyed script by Hayasidist. Maybe it's because its from 2017... but I have the feeling that it may have something to do with the fact that I had a shortcut for that tool. My shortcuts panel shows empty rows at the "group of tools: other" section, and it also show other extra tool groups, the ones that got installed when I installed the Mynd tools (Group of tools: MYND_ANIM, Group of tools: MYND_MOVER, and more) but those groups are not working, they don't show up on the tools panel, or on the Edit / Preferences / Tool Layout panel, or on the tool list text file. Something is wrong with that.
If you can upload your _tool_list.txt I'll take a look at it -- I'm wondering if the list moho is seeing might be different from the one that you might be looking at in an editor??????????????
Re: scripts duplicated in the tools panel
oh, no I was calling it tool because I didn't know it was called button. I didn't see it as "tool" anywhere. My _tool_list right now is identical to the one on the official tools folder that is on Moho's installation folder:hayasidist wrote: ↑Sat Oct 09, 2021 1:22 pm
The tool itself (even my "Select Keyed" script) doesn't have any knowledge or control over which group it appears in. Of note, however, "Select Keyed" is a BUTTON not a TOOL (it has no UI), so if you've got a line in your _tool_list that refers to it as a tool that might explain the duplication?????
If you can upload your _tool_list.txt I'll take a look at it -- I'm wondering if the list moho is seeing might be different from the one that you might be looking at in an editor??????????????
Code: Select all
/* anime_version 11200001 */
/* keyboard shortcuts are now set in the application */
/* for format compatibility placeholders are retained below */
group MOHO.Localize("/Tools/Group/Draw=Draw")
tool lm_select_points ...
tool lm_transform_points ...
tool lm_add_point ...
tool lm_curvature ...
tool lm_freehand ...
tool lm_shape ...
tool lm_delete_edge ...
tool lm_magnet ...
tool lm_brush ...
tool lm_eraser ...
tool lm_pointreduction ...
tool lm_scatterbrush ...
tool lm_perspective_points ...
tool lm_shear_points ...
tool lm_bend_points ...
tool lm_noise ...
group MOHO.Localize("/Tools/Group/Fill=Fill")
tool lm_select_shape ...
tool lm_create_shape ...
tool lm_paint_bucket ...
tool lm_delete_shape ...
tool lm_line_width ...
tool lm_hide_edge ...
tool lm_curve_exposure ...
tool lm_curve_profile ...
tool lm_colorpoints ...
group MOHO.Localize("/Tools/Group/Special=Special")
tool lm_switch_layer ...
tool lm_particle_layer ...
tool lm_crop ...
tool lm_image_masking ...
tool lm_video_tracking ...
group MOHO.Localize("/Tools/Group/Bone=Bone")
tool lm_select_bone ...
tool lm_add_bone ...
tool lm_transform_bone ...
tool lm_manipulate_bones ...
tool lm_reparent_bone ...
tool lm_bone_strength ...
tool lm_bone_groups ...
tool lm_sketch_bones ...
tool lm_bind_layer ...
tool lm_bind_points ...
tool lm_offset_bone ...
tool lm_bone_physics ...
tool lm_wind ...
group MOHO.Localize("/Tools/Group/Layer=Layer")
tool lm_transform_layer ...
tool lm_set_origin ...
tool lm_follow_curve ...
tool lm_rotate_layer_xy ...
tool lm_shear_layer ...
tool lm_shape_picker ...
button lm_insert_text ...
tool lm_eyedropper ...
group MOHO.Localize("/Tools/Group/Camera=Camera")
tool lm_track_camera ...
tool lm_zoom_camera ...
tool lm_roll_camera ...
tool lm_pantilt_camera ...
group MOHO.Localize("/Tools/Group/Workspace=Workspace")
tool lm_pan_workspace ...
tool lm_zoom_workspace ...
tool lm_rotate_workspace ...
tool lm_orbit_workspace ...
- hayasidist
- Posts: 3831
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: scripts duplicated in the tools panel
ok -- the light has come on!! -- we're somewhat at cross purposes! you're now talking about shortcuts.. that's not the tool_list it's the key bindings... it's in your custom content folder -- in the Keyboard Shortcuts subfolder and it's called <your shortcuts name>.json -- and there does seem to be an issue with that ... I've just had a look at mine and there's a blank entry for a tool I was working on some while back - and I have since deleted it (i.e. the tool's .lua) but there's now an empty entry in the shortcuts screen (as you'll get from edit / edit keyboard shortcuts) where that tool once was.Daxel wrote: ↑Sat Oct 09, 2021 6:46 pmSo I don't really know why the shortcuts setting panel is messed up with those MYND groups and empty rows. But it probably has nothing to do with your script but with something I made with it. I think it was the only script that I assigned to a shortcut because I use it quite a lot.Code: Select all
/* anime_version 11200001 */ /* keyboard shortcuts are now set in the application */ /* for format compatibility placeholders are retained below */ <snip>
it also seems that the tool's UI label is what that shortcuts screen uses -- so if the tool itself doesn't have a :UILabel() function I guess that will also leave you with a blank.
so --- if you can grab your <tool shortcuts>.json (it's a plain text file) and upload that ...
Re: scripts duplicated in the tools panel
I tried moving the shortcuts json out of the shortcuts folder to see if that file was the one to blame, but turns out it isn't. Now the shortcut settings is reset and it doesn't show blank rows or any of those MYND groups, but the select keyed button keeps being duplicated on the tool panel. So it looks like those are two different problems. The shortcuts one doesn't bother me too much, I understand that it simply doesn't update to remove unexisting tools or groups and I guess I can fix it modifying the json.hayasidist wrote: ↑Sat Oct 09, 2021 9:19 pm
ok -- the light has come on!! -- we're somewhat at cross purposes! you're now talking about shortcuts.. that's not the tool_list it's the key bindings... it's in your custom content folder -- in the Keyboard Shortcuts subfolder and it's called <your shortcuts name>.json -- and there does seem to be an issue with that ... I've just had a look at mine and there's a blank entry for a tool I was working on some while back - and I have since deleted it (i.e. the tool's .lua) but there's now an empty entry in the shortcuts screen (as you'll get from edit / edit keyboard shortcuts) where that tool once was.
it also seems that the tool's UI label is what that shortcuts screen uses -- so if the tool itself doesn't have a :UILabel() function I guess that will also leave you with a blank.
so --- if you can grab your <tool shortcuts>.json (it's a plain text file) and upload that ...
I felt that the problem had to be on the tool folder so I started removing groups of scripts by author and one of these times the select keyed tool wasn't duplicated anymore. Turns out the problem was caused by me as I expected, because the problematic file is hv_font, that is a font made by Heyvern that A.Evseeva included in her fantastic Modified Transform Bone Tool but she didn't expect me to put it in the wrong folder (I guess it goes in the utility folder). Why did it bully your script in particular? I don't know maybe because it starts with h so it was the closest one or something.
Thank you all for your help, learnt a lot, everything is fine now.
- synthsin75
- Posts: 10253
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: scripts duplicated in the tools panel
Seems it just duplicated Paul's script because the utility script was after it alphabetically and didn't have any working functions (UI, OnMouseDown, Run, etc.). Same thing happens with a completely blank Lua file.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/