MR Move Targeted Joint Script

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
Hoptoad
Posts: 619
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: MR Move Targeted Joint Script

Post by Hoptoad »

Would someone take a look at my test rig and tell me what I'm doing wrong? It's basically a leg with a target bone, for testing purposes.

https://www.dropbox.com/s/xem62zq0aktsm ... moho?raw=1

Thanks.
User avatar
SimplSam
Posts: 1048
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: MR Move Targeted Joint Script

Post by SimplSam »

Hoptoad wrote: Mon Sep 13, 2021 2:09 am Would someone take a look at my test rig and tell me what I'm doing wrong? It's basically a leg with a target bone, for testing purposes.
Firstly - This is a fantastic script.

There are a few rules that can disallow (disable) the tools' operation.

In your case:

A certain disallow rule is applied when the Grandparent bone (B1 ~root~) of the targeting bone (B3 ~lower leg~) only has one child (B2 ~upper leg~) and the GrandParent bone has Inverse Kinematics enabled (default).

There are a number of things you could do to break this particular disallow rule (i.e. Break IK for the GrandParent bone B1):
  • Set 'Ignored by inverse kinematics' for B1
  • Add another bone or bone structure (i.e. torso/chest bone or another leg) as a child / child structure of B1
  • Add any Control bone relation (Position, Scale, Rotation) to B1 (i.e. B1 controlled by ...)
  • Add Bone Dynamics to B1
  • I also think that 'Set Independent Angle for B1' should also be part of the above set of 'fixes'. But that is not defined in the script (maybe for some good reason).
I have implemented the 'Set Independent Angle' detection logic in a modded script and that seems to work OK.

I also moved the 'frame 0' check out of IsEnabled, as it was switching to another tool (Select Bone) when I scrolled the timeline to 0 when scrolling up/down to check the bone motion.
Last edited by SimplSam on Sat Sep 18, 2021 12:47 pm, edited 1 time in total.
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
Hoptoad
Posts: 619
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: MR Move Targeted Joint Script

Post by Hoptoad »

SimplSam wrote: Mon Sep 13, 2021 7:56 am There are a few rules that can disallow (disable) the tools' operation...
Thank you! You were correct (of course); I added a second leg and the script started working. It's almost funny. I had made a simple one-leg rig because I assumed it would negate the possibility of my rig causing any problems during testing of the script. As it turns out, the simplicity of one-leg rig created a problem.

Thanks for listing other methods for making a one-legged rig work, SimplSam. I'll be needing those solutions in the near future for an actual one-legged rig.

Wow, this script is amazing. I was agog at the prospect of using this script, and it's as awesome as I expected. Huh, I think that's the first time I ever used the word "agog", which is the sort of word on typically only encounters in books.

This script is so awesome that I used "agog" in a sentence.
Post Reply