Page 1 of 1
Script idea: create a bone between two coordinates
Posted: Wed Aug 04, 2021 3:02 pm
by moe33
Hi everyone, I have a idea for a script: Get two position coordinates and create a bone between the two coordinates. A bit like DUIK.
I made a script by myself. I'm really sorry that I don't know how to write code at all. The script is made entirely by copy and paste...
This script can only get the coordinates of two points, and then create a bone.
Maybe the code looks messy, but luckily it can be used.
But I hope it can have more functions, such as getting the center coordinates of a shape or the center coordinates of a layer.
If you can, please help me improve this script...
Thank you very much!
https://drive.google.com/drive/folders/ ... sp=sharing
Re: Script idea: create a bone between two coordinates
Posted: Wed Aug 04, 2021 4:04 pm
by gilcartunista
Hi moe33...Thank you!!! I use Moho 11, and it works beautifully!!! Grateful!!! For your enormous generosity! Grateful!
Re: Script idea: create a bone between two coordinates
Posted: Thu Aug 05, 2021 8:11 pm
by SimplSam
I know the Grid (View > Enable Grid) is not so good, but did you try using that to get your bones to snap?
I know we definitely need better Snapping support for all 'draw/transform' tools.
Re: Script idea: create a bone between two coordinates
Posted: Thu Aug 05, 2021 9:29 pm
by Daxel
Thanks for the script!
I use the "divide" feature on the select points tool frecuently to create a point in the middle of other two for things like these where I want something centered.
Re: Script idea: create a bone between two coordinates
Posted: Fri Aug 06, 2021 11:16 am
by moe33
SimplSam wrote: ↑Thu Aug 05, 2021 8:11 pm
I know the Grid (
View >
Enable Grid) is not so good, but did you try using that to get your bones to snap?
I know we definitely need better Snapping support for all 'draw/transform' tools.
Yes, I have tried to use the grid, but it is troublesome.
So I want to use a script to get the coordinates in order to accurately build the bones.
You can try to use my script, it can accurately build bones between two points.
Re: Script idea: create a bone between two coordinates
Posted: Tue Dec 17, 2024 7:55 am
by animationfan
moe33 wrote: ↑Wed Aug 04, 2021 3:02 pm
Hi everyone, I have a idea for a script: Get two position coordinates and create a bone between the two coordinates. A bit like DUIK.
I made a script by myself. I'm really sorry that I don't know how to write code at all. The script is made entirely by copy and paste...
This script can only get the coordinates of two points, and then create a bone.
Maybe the code looks messy, but luckily it can be used.
But I hope it can have more functions, such as getting the center coordinates of a shape or the center coordinates of a layer.
If you can, please help me improve this script...
Thank you very much!
https://drive.google.com/drive/folders/ ... sp=sharing
Hey Moe33. downloaded your script "bone between two coordinates" but it shows "missing resource image" error! please rectify.
Re: Script idea: create a bone between two coordinates
Posted: Tue Dec 17, 2024 5:05 pm
by SimplSam
animationfan wrote: ↑Tue Dec 17, 2024 7:55 am
Hey Moe33. downloaded your script "bone between two coordinates" but it shows "missing resource image" error! please rectify.
I have checked the version at:
https://moeu33.notion.site/Set-A-Bone-B ... 735e353b0a
And everything is there. The content of Tool\ should be copied to your <Custom Content Folder>\Scripts\Tool\ folder and the content of ScriptResources\ to your <Custom Content Folder>\Scripts\ScriptResources\ folder.
Note: If you have already had the error for "missing resource image", then you will need to restart Moho after you have the placed images folder 'mu_set1bone' in the right place.
Re: Script idea: create a bone between two coordinates
Posted: Wed Dec 18, 2024 7:53 am
by animationfan
SimplSam wrote: ↑Tue Dec 17, 2024 5:05 pm
animationfan wrote: ↑Tue Dec 17, 2024 7:55 am
Hey Moe33. downloaded your script "bone between two coordinates" but it shows "missing resource image" error! please rectify.
I have checked the version at:
https://moeu33.notion.site/Set-A-Bone-B ... 735e353b0a
And everything is there. The content of Tool\ should be copied to your <Custom Content Folder>\Scripts\Tool\ folder and the content of ScriptResources\ to your <Custom Content Folder>\Scripts\ScriptResources\ folder.
Note: If you have already had the error for "missing resource image", then you will need to restart Moho after you have the placed images folder 'mu_set1bone' in the right place.
THANKS SimplSam. It worked yesterday and didn't know what right thing I did! deleted some files and I broke it again. Thanks a ton Simplsam for highlighting the correct way. Its up and working flawlessly. Cheers!