HeyVern's scripts and tools - (focus on bones)

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

NEW Select bone tool:

Wow!. it is like a Christmas gift!. What amount of features!. If I don't read the whole initial post I could loose tehm!.

:!: THANKS AGAIN VERN! :!:
heyvern wrote:You still must CLOSE the constraints window to select another bone but now it is much simpler to find the bone you need.
That's not true. The old select bone tool do that. just keep the drop down constrain window and click in another bone (even some bones at the same time) and it works. Only that you have to click twice to obtain the values of the current selected bone. I have used this feature several times in my 3D rig tutorial videos for springy bones.
Also you can apply the same constraint to a group of selected bones if you select them and later pull down the constrain window. All the bones would have same constrain values.

I don't know why I have not put it yet in tips & tech forum...

-G
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Yes the double click!

I will eliminate that. It is fairly simple. I didn't discover it till I put up this version.

The reason for "double clicking" the bone in the constraints window has to do with how the constraint window is "updated". There is the initial selection of a bone, then the second click updates the info in the pop up.

I am doing things a bit differently in this script so I can add in an additional "update" when a bone is only clicked once in the scroll window. this will update the constraints window and you won't have to click twice.

I am already doing this when the list box bones are selected. Those aren't like menus. I can't send a bone ID with a text list. I have to compare the list to the bones by name and then get the bone ID and then select a bone in the view AND THEN update the constraint window before it gets opened. All I need to do is update the window WHILE it's open.

Basically I will add the "extra" click in the script.

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

Post by heyvern »

Dang dang dang.

My cool bone selection tool isn't quite finished... and I'm not sure I can fix this.

The constraints dialog still has those HUGE bone menus. I can't use the same function I did for the bone selection list because a text list must be inside a popup which can't be inside another popup as far as I can tell.

If anyone knows if it is possible to embed popup dialogs inside a popup dialog I would be very happy. Or even a way to "collapse" or hide a text list inside a popup.

-vern
Fahim
Posts: 302
Joined: Fri Jul 07, 2006 6:41 pm
Contact:

Awesome

Post by Fahim »

Great work Vern.

Fahim
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Fahim! Come back!

Ask Mike if you can put a simpledialog widget inside another one!

For instance imagine a popup like the constraints dialog INSIDE the constraints dialog. I have tried and I just get... weird errors I've never seen before. ;)

If you can't then... that's a feature request. I can't do a pop up inside another pop up. So that means no scrolling list for bone selection inside the constraint box.

Right now a text list has to have a popup so it is "collapsed" like a menu. A new addition to a text list would be an optional "built in" pop up like the menu has.

Or an optional feature of a menu to scroll. that would eliminate the text list completely!
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Brain fart!

I figured out a temporary solution for the constraints pop up but it won't be as pretty as before.

The constraints box is usually closed, so it's size won't matter. When you open it I will make it larger to accommodate a scrolling list box for each constraint control item.

This will look ugly but make selecting bones for constraints A BAZILLION TIMES EASIER.

I could add in a quick key search. Press the first letter of a bone and it would jump to that spot in the list... I hope this will work.

This is the only solution that I can see working. There just is no way to have the text list inside a simpledialog inside another simpledialog which is what it requires.

-vern
User avatar
Stephen X
Posts: 93
Joined: Sat Oct 09, 2004 6:13 pm
Location: Washington DC

Scripting tools and menu items

Post by Stephen X »

Hey Vern,

Sorry that you are my go to guy right now, but tag--you're it.

I am trying to figure out where to get all these scripts in the forum to get started on what you big guys are doing. The files are littered everywhere with different versions. The crashcore site doesn't seem to be working.

To make a long question longer, is there an easy place for me to download all these goodies and get crackin? Please let me know.

S :roll:
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

At the moment they are where they are.

As a moderator I have been making them "sticky" in the scripting forum so they stay at the top. However even I don't know where all the cool scripts are.

The ones that I use the most are the tool scripts, anything from Fazek:
viewtopic.php?t=3507

Scripts from 7Feet.

The only tool script I did myself that I like very much is the bone select script that has the bones listed in a scroll box.

Is there a specific script you heard of you would like to try out?

-vern
User avatar
Stephen X
Posts: 93
Joined: Sat Oct 09, 2004 6:13 pm
Location: Washington DC

Thanks as always

Post by Stephen X »

Hey Vern,

Thanks for getting back to me (as always) so quickly.

I was watching the tutorials on bones that Ginete created and he had a hefty toolkit and was using tools of which I have never seen.

It is hard to jump in and read through all the strings for the script development. You guys have done a lot of work and I am really impressed. I emailed Ginete directly and he tipped me off to a lot of great tools.

The only problem with grabbing them from the site is that I do not know if what I am downloading is the most current version.

Right now I have a bundle that I am going to try out and see what happens. If there was some way that someone (hint hint) who is more experienced and wise could post all the most current scripts on their own site, that would be super duper.

Thanks again. Don't know what I would do without you.

S :D
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Genete uses all the tools from Fazek. I just recently started using ALL of them. Previously I was only using a few select ones.

We both got them from the link in my previous post. Those are the latest.

It would be good to have all scripts in one place. My fear is that... let's say I had them all on my site, people might get confused and possibly think I am the creator, or worse... I can fix them! ;)

As long as they are still downloadable from their current locations, I would like to wait for efrontier to make a place available for scripts. That way there won't be confusion over who did them or whatever.

-vern
User avatar
cosmo
Posts: 4
Joined: Mon Jul 30, 2007 8:27 pm
Location: New York
Contact:

Post by cosmo »

Hey Vern,

I'm quite impressed by all your contribution by the way. I started-up about a month ago and had just a quick question: How can I modify certain scripts like handheld camera. I can't find anywhere to enter it;s options.

Here a link to some tests.

http://www.youtube.com/Cosm07

Thanks in advance.

Cosmo
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Basically all the scripts including ALL the tools in AS are just lua text files. You must edit them "outside" of AS. What you need to edit the .lua script files is a good plain text editor.

Anything that opens ascii text files will work, Notepad (windows), TextEdit (mac) etc.

I wouldn't use MS Word... you could use it but you really have to make sure it doesn't do anything funky to the file. You just want plain text.

The best tool to use would be a script editor. Something that highlights code syntax. Without syntax highlighting it is really hard to see what's what.

I use a free open source application called jEdit. It runs on Mac and Windows so I have it on both. It is fantastic. It will highlight the lua syntax automatically when you open those types of files.

EDIT:

You will also need to know about the lua programming language. It is very easy to learn. It is very similar to JavaScript in many ways. If you have any programming experience at all you should be able to pick it up pretty quickly.

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Dear Heyvern,
I've experienced some strange things when I use your select_bone tool.

Try to do following:

Set auto name bones and shapes.
Create some bones
Now select a bone and change its name.
If you select the bone just picking it the text box shows its just changed name. But if I use the drop down list (what is the cool modification) the new name doesn't appear. Even I can select the bone with its old name and the text box displays the old name. Later If I select again the same bone picking it then it show its modified name.
Have you experienced the same?
Only if I use other tool and use again your select bone tool, then the list is updated.

-G
User avatar
Víctor Paredes
Site Admin
Posts: 5646
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

heyvern. i'm playing with your aim bones script. it's really great and really gives much fluidity to the animation (i'm basically making all arms and legs "aimed").
but i have detect two problems:
- when i undone, the bones become crazy and i must to go back to frame zero and return to the current frame to continue working well.
- sometimes AS crashes with no aparently reason.

(i'm in windows)

thanks for all.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I am trying to fix some of those "crashing" issues.

The biggest problem is how bones are parented. You can't parent an "aimer" bone to another "aimer" bone. You can't parent an aimer bone to a child of an aimer bone. You can't use constraints that target aimer bones. This is frustrating and it is driving me crazy.

Being able to parent an aimer bone to an aimer bone would create the PERFECT joint rig that would have scale limits and flexible motion. I think the problem lies in how the bones are being "adjusted" and the order that this occurs.

For instance, an aimer bone needs to check the parents rotation and translation and apply this before adjusting it to rotate and scale to reach the target. If the aimer bone is the child of ANOTHER aimer bone... all hell breaks loose... ;) there is like some kind of crazy feed back loop as the script tries to do the same thing to a bunch of bones at the same time.

As for the other problem of "undo" and "crazy bones". The problem is that there is a part of the script that ONLY runs on frame 0. If you undo on any other frame the code processed on frame 0 is "lost" and has to be reset.

I apologize for this behavior but for me it is not a problem... and... er... I really don't know how to fix it to be honest. :oops:

I will try to see how performance is effected if I just have the frame 0 code run on every frame... it could slow it down but might fix the crazy bones behavior when using undo.

-vern
Post Reply