All-in-one bone tool *Updated september 2010*

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

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

All-in-one bone tool *Updated september 2010*

Postby ponysmasher » Sat Jun 12, 2010 12:29 am

Update*******************************************************

http://www.dauid.com/tools/scripts/ds_manipulate_bones.zip

Some more features, more stable. Still doesn't work on frame 0.

*************************************************************


Just started writing LUA scripts today and man it's fun!

My first ever tool is a combinated manipulate, rotate, translate and scale bones tool with some extras.

Image

It works great except for two things.

1. Scale bone keyframes don't always show up, but I'll probably figure this out.

2. I can't get it to behave like the standard manipulate bone tool on frame 0. I can't move bones and they stay offset.
I tried just making a copy of the standard manipulate bones tool and did some renaming but the copy didn't work either.

Is there some rule that there can only be one tool that acts like manipulate bones on frame 0?
Last edited by ponysmasher on Wed Sep 22, 2010 7:37 pm, edited 1 time in total.
User avatar
ponysmasher
 
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles

Postby heyvern » Sat Jun 12, 2010 2:16 am

If you make copies of scripts make sure you change the variables that might be "hanging around". Sometimes a tool will create global variables that contain information for that tool However that information is available to other tools. Sometimes you can get conflicts.

The key is to make sure that the main name of the script is changed in the code.

For example

Code: Select all
LM_ManipulateBones = {}


If you make a copy make sure you change that table variable. DO a global search for: "LM_ManipulateBones" and change it to your own variable or tool name:

for me it would be:
Code: Select all
HV_ManipulateBones


I use my initials.

Another issue is the utilities script and OTHER tools. For example many tools do the same thing as other tools but they do not have that code in them. They just reference the other tools functions or they all reference a function in the utilities script that returns a value.

If you post your code here I could probably tell you quickly what's wrong.

-vern
User avatar
heyvern
 
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Postby ponysmasher » Sat Jun 12, 2010 9:22 am

Thanks, you can have a look at it here: http://dauid.com/stuff/ds_manipulate_bones.lua

Please keep in mind though that i just started learning scripting so it's not going to be pretty....

There's alot to be cleaned up/fixed.
User avatar
ponysmasher
 
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles

Postby ponysmasher » Wed Sep 22, 2010 8:14 pm

I had forgot I even uploaded this script to this site until I saw it listed in the "Scripts all in one Post" thread, but here is the finished version that I've been using: http://www.dauid.com/tools/scripts/ds_manipulate_bones.zip
User avatar
ponysmasher
 
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles

Postby Onionskin » Sat Oct 23, 2010 9:31 pm

Hi Ponysmasher,
have you ever written script for all-in-one layer tool, or I mixed something?
User avatar
Onionskin
 
Posts: 221
Joined: Wed Mar 04, 2009 2:01 pm

Postby Víctor Paredes » Sun Oct 24, 2010 3:24 pm

Onionskin wrote:Hi Ponysmasher,
have you ever written script for all-in-one layer tool, or I mixed something?

Check here
http://www.lostmarble.com/forum/viewtopic.php?t=16862
Víctor Paredes - Former Moho 12 Product Manager
My Youtube Channel - My webinars
User avatar
Víctor Paredes
 
Posts: 4801
Joined: Wed Jan 26, 2005 12:18 am
Location: Ireland

Postby Onionskin » Sun Oct 24, 2010 11:06 pm

Thanks Selgin,
Ramons tool is one of my favorite but this is not what I meant. I thought that Ponysmasher was made a tool for layer translation/rotation/scale. Perhaps I mixed with Mike Kelli's SwissArmyKnife tool, but somehow I think that Ponismasher made such a tool, like manipulate bones, but for layers. Maybe I am wrong, I don't know, please somebody tell me.

I asked for that because I love that manipulate bone tool, so I delete default tools bone translate, rotate and scale. I don't need them in my tools window no more. Actually I didn't delete them, just remove them from tools folder to utility folder, because ds_manipulate_bones wont work if default tools are just deleted. I wanted to do same thing with layer translate, rotate and scale, but like I sad, I don't know is such tool exist.
User avatar
Onionskin
 
Posts: 221
Joined: Wed Mar 04, 2009 2:01 pm

Postby Onionskin » Thu Nov 11, 2010 9:01 pm

rajlostmarble wrote:go to (Modify-->break apart) this will make the piece look like it's covered in a bunch or dots


where is that Modify option?
User avatar
Onionskin
 
Posts: 221
Joined: Wed Mar 04, 2009 2:01 pm

Postby jahnocli » Thu Nov 11, 2010 9:14 pm

Onionskin wrote:
rajlostmarble wrote:go to (Modify-->break apart) this will make the piece look like it's covered in a bunch or dots


where is that Modify option?


rajlostmarble is a spammer -- I wouldn't give his 'advice' any credence.
You can't have everything. Where would you put it?
User avatar
jahnocli
 
Posts: 3276
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Postby Onionskin » Fri Nov 12, 2010 11:27 am

Thanks Jahnocli, I will keep that in my mind, I notice that his advice does not make sense
User avatar
Onionskin
 
Posts: 221
Joined: Wed Mar 04, 2009 2:01 pm

Postby Animark » Tue Nov 23, 2010 1:32 pm

Hello,

I've used this manipulate_bones tool for some hours and started to love it. But I got some problems and it's caused maybe in a bug or in something I am doing wrong.

I am animating three characters on a timeline with a length of 900 frames. When I use the 2 key all functions I get often some more unwanted keyframes about 100 frames away on the timeline. For example, I am working around frame 100 I get some more keys around 250.

Maybe this helps to improve the script.

Anyway I want to use something similar to the "Key All" all function. Is there a way to do that, maybe another script/tool? (I will post this request in a special topic in the "How Do I" section, so it would be nice to get some hints for alternatives there.)
Animark
 
Posts: 48
Joined: Wed Sep 02, 2009 9:07 am
Location: Berlin, Germany

Postby Animark » Tue Nov 23, 2010 9:44 pm

Hi again,

I've tested the keyframing also with another tool (Key Skeleton) and got the same problems, so I can say, it is a bug somewhere, but not in this All-in-one bone tool.

strange thing: when I am animating and press a "key all bones" function, I get all the keys, but excactly 136 frames away. :shock:
Animark
 
Posts: 48
Joined: Wed Sep 02, 2009 9:07 am
Location: Berlin, Germany

Postby Víctor Paredes » Tue Nov 23, 2010 9:48 pm

Animark wrote:strange thing: when I am animating and press a "key all bones" function, I get all the keys, but excactly 136 frames away. :shock:

That 136 frames offset maybe could be because you have moved the layer 136 frames on the sequencer. Probably this could be easy to repair it in the script. Anyway, it's just a theory.
Víctor Paredes - Former Moho 12 Product Manager
My Youtube Channel - My webinars
User avatar
Víctor Paredes
 
Posts: 4801
Joined: Wed Jan 26, 2005 12:18 am
Location: Ireland

Postby Animark » Tue Nov 23, 2010 10:53 pm

Yes, that is the problem. I imported my characters from time to time i needed them and didn't recognised, that they are started at another position in the sequenzer then 1. I never used the sequenzer before. So, I moved my animations to frame one in the sequenzer and the keyframes to their origin position, and now, both tools are working fine.

Selgin, you helped me a lot today. Thanks!
Animark
 
Posts: 48
Joined: Wed Sep 02, 2009 9:07 am
Location: Berlin, Germany

Re: All-in-one bone tool *Updated september 2010*

Postby HardikLakhalani » Sat Feb 20, 2016 12:31 pm

It manipulate bone without any special key, But while holding CTRL / ALT / SHIFT, It show this: and nothing happens:

LUA Console Box:
attempt to index global 'LM_RotateBone' (a nil value)
attempt to index global 'LM_TranslateBone' (a nil value)
attempt to index global 'LM_ScaleBone' (a nil value)

I am using Anime Studio Pro 10.0 x64
HardikLakhalani
 
Posts: 19
Joined: Mon Jan 18, 2016 9:32 am

Next

Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest