Páginas

martes, septiembre 25, 2012

Some tips & tricks to improve speed when changing to splines

Most of the tips are based on create hotkeys to make the work on graph editor a lot faster than using buttons every time, you could use them while blocking too if you use another workflow, it could look like the same, but when you know those hotkeys, it's quicker to change and correct graph editor. I won't say that those things are really advanced because they don't, but if you don't know how graph editor works, working with it at more speed only will slow you down,  because you won't know what you're actually doing, by the way, some other hotkeys are suitable for everyone like the ones making the graph editor appears. 

Basically this post is something like a mix of the hotkeys and things that I use every day but feel free to change them with other keys or do whatever combinations you want or add anything with a comment here.

-How to create hotkeys on scripts other than default actions:

First of all let's see where are the hotkeys and how we could change or create new ones.
On the top menu, Window/setting-preferences/hotkey editor/

1-Scroll down on categories until you found user and select it.
3-You'll have to fill the gaps here, name can't have spaces, so use _ instead than space, and command place is where we'll put the code.
5-Put the key that you want to use there, check ctrl and alt if you want to use them while press or release, I'll use ctrl+alt+key to avoid rewriting default maya ones (all the ctrl+alt+key combinations are free by default) if you want to use a normal key but you don't know what that key does, put the key on the box and press find and it will tell you what's actually doing that hotkey.
Now that we know how to do a new hotkey let's begin with custom ones.

Show/hide Graph editor ( ctrl+alt+g you have to put this on the 5th step)
all the text below goes inside command on 3rd step of the image

if ( `window -exists graphEditor1Window` )
deleteUI -window graphEditor1Window;
else
tearOffPanel "Graph Editor" "graphEditorPanel" true;

Show Outliner on left side ctrl+alt+o

OutlinerWindow; dockControl -area "left"
-content outlinerPanel1
-label "outliner"
-allowedArea "left"
-allowedArea "right"
-width 250;
deleteUI "outlinerPanel1Window" ;

Convert tangents to Spline under graph editor categorie(left at hotkey editor) you'll find tangents to spline, assign that to ctrl+alt+s

Tangents to Linear under graph editor categorie ctrl+alt+l

Tangents to Flat under graph editor categorie ctrl+alt+f

Free Weight tangent ctrl+alt+w (this one is a modification of the ones by default to do it all in one key)

keyTangent -weightLock off;
keyTangent -lock off;

*To free Weight tangents you need to have tangents set to weight first, I use to work with that activated, you could do it on preferences/settings/animation and check Weighted tangents.

Be careful with going quick on those last 4, because if you don't select the key point and you press one of those hotkeys you could change by mistake all the curve tangents! Be sure to not press those hotkeys while you select a control but not a key point!

Add inbetween to add a key between 2 frames, you need to have graph editor open, under graph editor I use + key

Remove Inbetween under graph editor I use - key

Nextkey to jump over keys under playback controls I use , key, but I think that on English keyboards should be < and >, feel free to change all the other keys to whatever works better for you, because maybe some are difficult on an English keyboard.

Previouskeys under playback controls I use . key


-See through Graph editor (if you don't have 2 screens)


With PeekThrough you could see through windows, it could give transparency to any window or menu or whatever, so if you don't have double screen, you could use the program to see through graph editor, on that way you could make the graph editor as full window and still see what are you moving.
I upload the program on my dropbox, I didn't find any virus but feel free to say whatever if you think something, I mean, found that through the web. Just for Windows, once you have it installed you turn on transparency with win+A (You could change that hotkey or the level of transparency on the options)

http://dl.dropbox.com/u/31354384/tools/PeekThrough_1.1.0.0.zip

-To create a quick selection set and add a hotkey to it to select the character really quick (I though on this, thanks to Siddhant Mehta who told us how to do a quick selection set as a week tip)

Select all the controls of the rig that you want,  go to create/sets/quick selection set and give it a name, normally you'll use stewie, bishop... but if you use a more regular name like char, character 1 or whatever like this it will be easier for this tip.

Go to the hotkey editor as we did before, create a new hotkey under user with the selection set, on the command line, if you used char as character name you'll have to type 

select -replace char 

If you named it stewie it will be

select -replace stewie

If you named it bishop it will be

select -replace bishop

You don't need to change the hotkey if you do a new scene, just do the quick selection for the new character and named him with the same name, it doesn't matter if it have different controls or whatever, it will select all the ones you select for the new quick selection.

I use to do one for the character (ctrl+alt+q) and another one for all the props and things with the character (ctrl+alt+a) but if you have two characters you could use one and call it char1 and the other one char2 and assign them to two hotkeys or whatever.

If you want a key on everything you just need to use the hotkey and press S later on, knowing a bit of script you could do the selection and key with a single hotkey, but I find it really more useful on this way, since I could decide where I want a key all.

-Hide/show curves on stewie to use Grease Pencil tool from AM menu easily


On stewie rig v094 to be able to draw with grease pencil with nurbs activated (you'll have to use GPIKR from am shelf tools to be able to select stewie controls) because right now, if you do it without hiding the nurbs controls it's such a mess with all those lines on the screen.

Hide curves
select -r stewie_ac_rig_v094:stewie_ac_C_visibility ;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.layout" 0;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.head" 0;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.ikspine" 0;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.ikleg" 0;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.leg" 0;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.arm" 0;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.fkarm" 0;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.ikarm" 0;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.squash" 0;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.blink" 0;

Show curves
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.blink" 1;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.squash" 1;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.ikarm" 1;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.fkarm" 1;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.arm" 1;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.leg" 1;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.ikleg" 1;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.layout" 1;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.ikspine" 1;
setAttr "stewie_ac_rig_v094:stewie_ac_C_visibility.head" 1;

Copy all that code under script editor (bottom right) under the MEL tab and then select all of them, press middle mouse and release it under custom shelf tool.

I guess that you could do that with bishop or other stewie or rigs from am, just select the rig, go to the outliner, select the rig, the ac_anim and then the ac_C_visibility change all the curves to hide or 0, open the script editor, copy the code and create a new button, then do the same but changing 0 for 1.
If somebody knows script I guess it will be easier to create a simple IF to do all of this on just one single button, but as I'm not that good I have it with two buttons, one for show, one for hide.

-Put Playblast or reference on top window

For this last part, I used to take playblasts and draw over them on tvpaint, and then open the video on quicktime, put it to the top with this little program https://dl.dropbox.com/u/31354384/tools/AlwaysOnTopMaker.zip , and then translate the draws over maya too, but right now I'm using the blue pencil plugin by Chris Zurbrigg (alumni here) which is great and saves me a lot of time.

Always on top is really useful when you're working on maya looking to a videoreference too, because on that way the videoreference won't get lost under maya.


I think that's all, hope it helps somebody and feel free to comment, ask or add anything.


No hay comentarios: