create new bones with 0 strength option

Discuss ideas for new features with other users. To submit feature requests to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

create new bones with 0 strength option

Post by Daxel »

Since I find point binding more predictable and reliable, I haven't used bone strength in years, and I guess many Moho users are in the same boat. So having to turn it off for each single bone I have created has been suboptimal to say the least, and very prone to error. This option could be on the main settings, on the bone layer settings or on the create bone tool, as "strength for new bones: n", or "default strength: n". Something like that.

If there is currently a way to achieve this I'm all ears.
User avatar
Lukas
Posts: 1297
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: create new bones with 0 strength option

Post by Lukas »

In your Moho install there's a file called 'lm_add_bone.lua' open it with a texteditor and find the OnMouseDown function, somewhere in that function a lot of properties of the bone are set. If 'fStrength' is already in there, change the value to 0. If 'fStrength' is not mentioned in the lua file add:

Code: Select all

bone.fStrength = 0
save your edited version of the tool in your custom content folder in the tool folder.
User avatar
MrMiracle77
Posts: 181
Joined: Mon Jun 24, 2019 2:30 am

Re: create new bones with 0 strength option

Post by MrMiracle77 »

I'm in a similar situation. But I often just select multiple bones at the same time and 0 them out simultaneously.
- Dave

(As Your GM)
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: create new bones with 0 strength option

Post by Daxel »

Lukas wrote: Fri Jul 01, 2022 1:51 pm In your Moho install there's a file called 'lm_add_bone.lua' open it with a texteditor and find the OnMouseDown function, somewhere in that function a lot of properties of the bone are set. If 'fStrength' is already in there, change the value to 0. If 'fStrength' is not mentioned in the lua file add:

Code: Select all

bone.fStrength = 0
save your edited version of the tool in your custom content folder in the tool folder.
Thank you, I will. I should try to start diving into scripting and this seems like an easy task.

MrMiracle77 wrote: Fri Jul 01, 2022 2:59 pm I'm in a similar situation. But I often just select multiple bones at the same time and 0 them out simultaneously.
Yeah I think that's very usual. But many times the problem is that I forgot to zero the strength of some smartbone that I created later, for example. Even when that is not the actual problem I am having, it's like the first thing I have to check every time something goes wrong, so I end using the bones strength tool frecuently. With this optional setting, I could even use the nice shortcut I have set for that tool for other thing, like vitruvian bones. Ahh the small things in life haha.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: create new bones with 0 strength option

Post by chucky »

A weight option with a default to the add bone tool would be nice.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: create new bones with 0 strength option

Post by Greenlaw »

Oh, yeah! That makes a lot of sense: Add Bone could get numerical box where you can dial in your preferred bone strength, and a Zero check-box to override the numerical box setting.

Maybe something like this mockup...

Image

It's consistent with other tools with optional modes and settings.
Last edited by Greenlaw on Mon Aug 01, 2022 7:40 pm, edited 1 time in total.
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: create new bones with 0 strength option

Post by Daxel »

yeah that would be perfect.
User avatar
Hoptoad
Posts: 619
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: create new bones with 0 strength option

Post by Hoptoad »

Another yes for zero override.
Also, an option to make it default behavior in preferences, so it's always checked if that's what you want.
User avatar
hayasidist
Posts: 3525
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: create new bones with 0 strength option

Post by hayasidist »

I didn't get the suggested mod to work at first -- my screw up ... It works fine when you put the right code in the right place .. my bad! :oops:

---

I also agree that it's a good suggestion to have a user-option for bone strength, and I've logged a request for bone strength to be a UI option in the Add Bone tool.

[EDIT: corrected my blunder]
Last edited by hayasidist on Fri Aug 05, 2022 1:47 pm, edited 1 time in total.
User avatar
synthsin75
Posts: 9978
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: create new bones with 0 strength option

Post by synthsin75 »

Adding this at line 234 works for me:
bone.fStrength = 0

All new bones now have zero strength.
User avatar
SimplSam
Posts: 1048
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: create new bones with 0 strength option

Post by SimplSam »

Please find below a quick-edit version of the tool (lm_add_bone+) with suggested 2 additions. The script (when installed in custom tool folder) will replace the built-in tool.

Default strength value will be saved between sessions.

https://drive.google.com/file/d/1m_TbVZ ... sp=sharing
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
synthsin75
Posts: 9978
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: create new bones with 0 strength option

Post by synthsin75 »

SimplSam wrote: Wed Aug 03, 2022 11:48 pm Please find below a quick-edit version of the tool (lm_add_bone+) with suggested 2 additions. The script (when installed in custom tool folder) will replace the built-in tool.
Nice. And I never knew Moho would replace a default tool with a "+" added.
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: create new bones with 0 strength option

Post by Daxel »

Thank you Sam!
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: create new bones with 0 strength option

Post by chucky »

Wow Sam... Nice!
User avatar
synthsin75
Posts: 9978
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: create new bones with 0 strength option

Post by synthsin75 »

Wow, I just tested it, and you can add anything after the LM stock script name and it still replaces the stock tool.
This will help a lot with identifying replacement tools by name.

Thanks, Sam.
Post Reply