Bone morph dials script

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

User avatar
BoBo Monkey
Posts: 23
Joined: Sun Dec 25, 2011 9:48 pm
Location: USA
Contact:

:?: Morph Dial newb HELP needed

Post by BoBo Monkey » Sat Apr 28, 2012 7:28 pm

:?: Morph Dial newb HELP needed
When trying to use Morph Dials I keep getting this error.

Image
morphdialhelp by DLMMovies, on Flickr

[path_to_script]:10: attempt to index global 'RT_BakeMorphDials' (a nil value)


ALSO I have tryed both Morph Dial 0.1 and 0.3 and I am using Anime Studio Pro 8.2
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Re: Bone morph dials script

Post by Rudiger » Sun May 06, 2012 12:32 pm

Hi BoBo Monkey,

It would seem from your error message that you haven't installed the menu scripts (eg rt_bake_morph_dials.lua, etc) in <AS Install Dir>\scripts\menu\Morphs.

Also, I noticed that you are using the rt_gen_morph_weights.lua embedded script from MorphDials_v0.1. This won't work with the multi-threaded rendering in AnimeStudio 8.2, so make sure you are using MorphDials_v0.3, which only has the rt_apply_morph_weights.lua script.
User avatar
BoBo Monkey
Posts: 23
Joined: Sun Dec 25, 2011 9:48 pm
Location: USA
Contact:

Re: Bone morph dials script

Post by BoBo Monkey » Sun May 06, 2012 6:54 pm

Rudiger wrote:Hi BoBo Monkey,

It would seem from your error message that you haven't installed the menu scripts (eg rt_bake_morph_dials.lua, etc) in <AS Install Dir>\scripts\menu\Morphs.

Also, I noticed that you are using the rt_gen_morph_weights.lua embedded script from MorphDials_v0.1. This won't work with the multi-threaded rendering in AnimeStudio 8.2, so make sure you are using MorphDials_v0.3, which only has the rt_apply_morph_weights.lua script.
I got the menu scripts from v0.1 in the right place and i got them to work but i can't get v0.3 to work. I get a error message that says
[path_to_script]:21 attempt to call method 'Parent' (a nil value)
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Re: Bone morph dials script

Post by Rudiger » Mon May 07, 2012 4:08 am

BoBo Monkey wrote: I got the menu scripts from v0.1 in the right place and i got them to work but i can't get v0.3 to work. I get a error message that says
[path_to_script]:21 attempt to call method 'Parent' (a nil value)
There's no reason v0.3 shouldn't work and v0.1 should. You should only get the above error message if there is no bone layer with the name "MorphDials" either alongside or above the layer you have embedded the script in.

If you have and you still get that error, then it's possible that your MorphDials Options have become corrupted. Select Scripts -> Morphs -> MorphDials Options from the menu and post a screen grab, so I can see if they are OK or not.
jonbo
Posts: 896
Joined: Thu Apr 08, 2010 2:53 am

Re: Bone morph dials script

Post by jonbo » Mon May 07, 2012 10:41 pm

Hey BOBO, do you by chance have an embedded script on that group folder named king(2012)? The only way I can get that error on frame zero is to have an embedded script on the group folder that the morph dials layer is in.
User avatar
BoBo Monkey
Posts: 23
Joined: Sun Dec 25, 2011 9:48 pm
Location: USA
Contact:

Re: Bone morph dials script

Post by BoBo Monkey » Tue May 08, 2012 12:09 am

Rudiger wrote:
There's no reason v0.3 shouldn't work and v0.1 should. You should only get the above error message if there is no bone layer with the name "MorphDials" either alongside or above the layer you have embedded the script in.

If you have and you still get that error, then it's possible that your MorphDials Options have become corrupted. Select Scripts -> Morphs -> MorphDials Options from the menu and post a screen grab, so I can see if they are OK or not.

I think I must have had the files in the wrong place becouse I deleted them all out of the AS folder so I could start over fresh and recopyed them. Then I opened the "MorphDials.anme" sample file and it worked. I wasn't getting the error message anymore on my own project anymore but I couldn't get it to move any so I when to MorphDials Options to get the screen grab you suggested when I relized that "Real time Morph" was off. :oops:

But I've got it working now (and I have no idea what I was doing wrong the first time, but that's not importent anymore)
Thanks for the help (and dealing with my newb problems)
:D
jonbo wrote:Hey BOBO, do you by chance have an embedded script on that group folder named king(2012)? The only way I can get that error on frame zero is to have an embedded script on the group folder that the morph dials layer is in.
Who know's where I had then scripts embeded. As you can proably tell from above, I had no idea what I was doing when I took that screen cap, and that character [king(2012)] wasn't desigened with morph dials in mind.
Autex
Posts: 23
Joined: Mon Jan 09, 2012 12:44 pm
Location: Germany

Re: Bone morph dials script

Post by Autex » Wed Jun 13, 2012 11:37 am

Anyone know how to delete multiple actions at once? Anime packs a bunch of actions I just need in a few layers into several others. I'm trying to keep the file sizes down. I hate having to click an action, click delete, click the next action, click delete..etc. Are there any scripts for a new actions window?
Hammer down on an empty chamber
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Re: Bone morph dials script

Post by Rudiger » Wed Jun 13, 2012 1:46 pm

Autex wrote:Anyone know how to delete multiple actions at once? Anime packs a bunch of actions I just need in a few layers into several others. I'm trying to keep the file sizes down. I hate having to click an action, click delete, click the next action, click delete..etc. Are there any scripts for a new actions window?
Unfortunately, AS doesn't support using modeless dialogs in scripts, but it would be possible to create a dialog which listed all of the actions in the current layer, then you could check the ones you wanted to delete then click OK.
Autex
Posts: 23
Joined: Mon Jan 09, 2012 12:44 pm
Location: Germany

Re: Bone morph dials script

Post by Autex » Wed Jun 13, 2012 2:59 pm

Ah ok, thanks for the info Rudiger.
Hammer down on an empty chamber
benny666
Posts: 29
Joined: Mon Jun 29, 2009 4:52 pm
Location: Italy

Re: Bone morph dials script

Post by benny666 » Tue Aug 07, 2012 5:24 pm

How does the button "create morph" work? I have two layers, one is the vector layer, the other Morphdials. I create an animation on the timeline, then at a given frame, let's say 15, using the button "create morph" it opens a pop up asking me to select a name for the morph. I call it "left", for instance. But when I double click on the action "left" it gives me the morph as in frame 0 of timeline, not 15. Where i'm wrong?
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Re: Bone morph dials script

Post by heyvern » Tue Aug 07, 2012 6:06 pm

Rudiger wrote:Unfortunately, AS doesn't support using modeless dialogs in scripts,
Actually it DOES support modeless dialogs. Note the "DoModeless()" code below. This code is from the "Extras" folder in the installation that has the pkg_lm_gui.lua_pkg file.

Code: Select all

class LM_SimpleDialog : public LM_Dialog {
public:
	LM_SimpleDialog(const char *title);
	~LM_SimpleDialog();

	LM_LayoutView *GetLayout();
	int32 DoModal();
	void DoModeless();
	bool ValidateFloat @ Validate(LM_TextControl *pCtrl, real low, real high);
};
I've been playing around with it but having trouble making it work. I have a popup from a menu script that floats around just like the Actions window. I have to figure out how to send information back and forth between the document and floating window. It seems to only want to send information when the window is closed (the "OnOk" function I think or the "run" function, not sure).

The tricky part is that the modal window automatically has "Okay" and "Cancel" buttons. For a normal "modal" window you press OKAY and stuff happens. The modeless window doesn't have that. So you have to "do stuff" with other buttons. I haven't been able to figure out how to activate functions with buttons in my modeless window yet. I am sure this will work once I figure it out.

-vern
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Re: Bone morph dials script

Post by Rudiger » Wed Aug 08, 2012 2:56 pm

heyvern wrote: I've been playing around with it but having trouble making it work. I have a popup from a menu script that floats around just like the Actions window. I have to figure out how to send information back and forth between the document and floating window. It seems to only want to send information when the window is closed (the "OnOk" function I think or the "run" function, not sure).

The tricky part is that the modal window automatically has "Okay" and "Cancel" buttons. For a normal "modal" window you press OKAY and stuff happens. The modeless window doesn't have that. So you have to "do stuff" with other buttons. I haven't been able to figure out how to activate functions with buttons in my modeless window yet. I am sure this will work once I figure it out.

-vern
That's the same problem I had. At the time I came to the conclusion that it would not work unless you could access the moho object from inside the dialog, which is not possible.
Joelsquare
Posts: 29
Joined: Mon Jun 20, 2011 1:12 pm
Location: Toronto
Contact:

Re: Bone morph dials script

Post by Joelsquare » Wed Aug 15, 2012 2:47 pm

OK, so I FINALLY got over my fear of using scripts, and I FINALLY downloaded this incredible script. After a bit of twiddling, I got it to work, but now I have a question, and since it did take me some twiddling to get this to work, I'm not sure if what I'm dealing with is that I'm doing something wrong, or if it's beyond the functionality of this script.

Can this be used to control Layer events as well as Vector and Bone events? To be more specific, I want a plane to rotate. I've set up an action to do this, and its seems to work as a blend morph, but I can't seem to make this script control the rotation of the plane.

Am I doing something wrong, or can it just not do that?

And... most importantly - Rudiger..... THANK YOU. This rocks. But you knew that already. :)

Best,
Joel
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Re: Bone morph dials script

Post by Rudiger » Thu Aug 16, 2012 3:23 am

You're right. It is a limitation of that version of the script. I have a development version which has a lot more channels, but I haven't released it publicly yet. Also, it seems with the recent advances of relative morphing and soon, smart bones, that my MorphDials script will be soon made redundant.
danielandrus
Posts: 21
Joined: Fri Feb 22, 2008 4:54 pm

Re: Bone morph dials script

Post by danielandrus » Fri Oct 26, 2012 3:13 am

Hi everyone!
I recently (today) started using this script. (Thank you so much Rudiger, awesome script) and I had a question. Is there a way of making it show whats going on inside a folder in real time?
When I have the bone layer underneath the vector layer, when I move the bone i see the immediate result in the vector. But when i have the vector files inside a folder, when i move the bones it looks like nothing is happening.
I realize that it actually is affecting the layers inside the folder, I was was just wondering if there's a way to see when i move the bones.

Dont know if this question has already been answered. I spent the last couple of hours reading the posts in the forum and didn't find it.

Cheers
Post Reply