Animating
what id like a script to do is to aid me in setting keys for animation.
a box will come up which is the actual scripted plugin, and whatever object you click on, it will display the contents of its channel box in this new box, and when you click on the name of one of the attributes, it will key that one attribute instead of you having to go to the channel box, right click and select key selected are there any scripts like this? if not, how would i go about coding it? cos i dont understand anything about mel |
I don't know enough about it to make my own dialogs or anything...
|
nem, do you still need that script? and what exactly you need help for? you wanna program it yourself? or have working example you can extend? or you want a thing that is ready for use?
let me know what you wish is, as i need to learn mel anyway, and the online manual is rather good compared to other programming languages i seen so far. when you want the script that is complete and ready, then dont be surprised if i make only real short names in it, so you have checkboxes named TX, TY, TZ, RX,RY,RZ,SX,SY,SZ... - for translate rotate and scale - so ALL attributes that can be keyed fit in a dialog box. but one thing, give me time to program that :D |
yeah i still do need that script, i have nothing on it because i dont understand anything about mel, was wondering if there was a pre-existing script for it, but there isnt :(
sorry, i have no idea what u mean :confused: and im not lookin for checkboxes, just clickable things |
Quote:
one mel scripts: a window pops up, and there are all attributes that could be keyable looking like: [x] TX [x] TY [x] TZ [ ] RX [ ] RY [ ] RZ ..... meaning that if you hit the key button also in this window you can set a key for tx, ty, tz, but not rx ry rz (for transtlate, but not rotate). next time you want to key anything you ned not open the window and change settings, but just hit the "g" key to apply the keys to another selection or at another time. what i really would like to have, is bind the window to a keydown, meaning if you press the key down and hold, the window pops up and you can alter the settings, and if you release then it makes the keys. so it is one button thing for all - and if you are satisfied with the selection, when you just have to hit the key and release at once and it makes the changes. hope that is clear now ... :rolleyes: |
that is kinda what i want, but i think its a tad bit more complex than that :S
basically: you have objects in your scene, and you pick and object, go to the channel box and thats where you set keys normally right? well for this, i want it so, you run the mel script and a window pops up, you select an object and that mel script windows *automatically* refeshes and it shows a list of that particular object's channels (like you said above with ur lovely diagram) but these channels in the script window wouldnt just be translate scale and rotate, it would include custom attributes as well (id say this is the most important part). the last thing is, instead of having checkboxes, id like to have each attribute (eg. rotate y) onto a clickable box, and when that box is clicked, that one attribute is keyed, so you can just click names and keys would be set for the names you clicked (simpler than checkboxes :)) and then you deselect the object and the mel script window shows nothing inside it, you select another object and the mel script window would refresh showing all the channels/attributes of that new object so its all about automation really sorry if im being so totalyl awkward, cos i no i am :D |
Hmm, that would be actually a quite handy script.
Maybe there´s a getAttribute command or something that would prove successfull don´t you think? <-- doesn´t have the slighlest clue about programming. |
handyness is the key to productivity :) im just not productive enough to make it myself cos i dnt no how to do it :(
|
ok ok, now we come somewhere. you want a window, that is constantly open like AE, but it shows all keyable things with buttons (not only the rotate and scale, i thought my "..." where clear to include all, but did not want to write all down here just making example that due to place reasons in the window there will be no "translate x" but "tx" - and no "selection handle" but "sh")
and the buttons are orange if the key is set and if you push the button, it deletes the key and button becomes grey and if you push again you set the key and button becomes orange. that can be done even easier than the tool i wanted to create - but i suggest a button that updates the state of the window - as constant update whenever you change your selection might kill performance if you have the window open always. another drawback - if only some of the selection has a key, then it say, that RX is keyed, even if not all selected things have keys there - but if you want to be sure that the whole selection has the same keys set, you could just click a attribute twice (first unsetting all keys that were set, and then setting every keys for all objects in selection). edit: oh right i just reread - and you wanted the update automatically - i will try to do that - must be possible somehow :d |
BabyDuck: Just a little warning. UI creation and management isn't an easy thing to do with mel. It's pretty strange if you ask me. So go light on the UI first and make sure you understand what you've done before going for any dynamic stuff.
|
Quote:
believe me, there are languages where UI is damn hard to implement, mel is real easy to work with :) |
Quote:
By the way, K ... any way that the references planes' script could be customized into inserting more reference planes? for example bottom ... or the other sides? that would complement it very well .. I´m creating a button for it. Perhaps you could include it in your zip file :) |
Quote:
|
Quote:
|
ooh lots of complicated mel talk :confused:
babyduck: you know you said you could make it so when you click a button in the mel box and it keys (turns it orange in the channel box) and when you click again it deletes the key? mayb when you scrub the time slider, and it reaches a point where the object's attribute already has a keyframe, then in the mel window, that attribute would be yellow as well, just so the user knows if there already is a keyframe, cos otherwise you could go around deleting all the keyframes you have when all you want to do is SET them or what about in the script box, you have 2 buttons for each attribute in the channel box? one for key, one for delete key? but i spose it wud still have to turnorange for you to no if there already is a key or not *EDIT*: just had a thought, would it be easier, animation wise, to have a slider in the mel script box as well? cos then you could do all animation in the new window and key it really fast as well without having to go into ur viewport or channel box there shud also be a button at the bottom which says "Key All" hmm, wonder what that would do :) |
Quote:
|
Quote:
Quote:
|
oh right, i get ya
so how shud this thing be started? |
i am working on good looks right now, but i decided to use a iconTextCheckbox, as you can assign different command if you push it in and out.
the dynamic update will be done later - if you only want to see it how i will do it for one single keyable thing, i can put that mel down ... |
oh right, thought i was gunna do it...phew :D
thanks babyduck but i do want to learn this stuff :) just not atm what does the iconTextCheckbox function do? |
Quote:
Code:
string $window = `window`; |
oh no, not fully tested, cutKey completely removes the key everywhere :D - so it needs to be changed :D
|
oooooh wow, how cool! im liking it :D first time ive bin excited in a long time!
i get a Error: Invalid flag: -bgc when i hit TX what wud happen if a custom attribute had a longer name? oh ive noticed that if you open up the window for one object, and while that window is still open and u try it wiv another window, the size gets smaller |
dang, i tested it - and i found the problem so only the current keyframe gets cut out, but it should find the bgc.
Code:
string $window = `window`; |
well thats madness cos im on an NT based system, how weird
its working :) just tried a lil ball anim, and it works :) but when i try it i only see one clickable box, and thats TX, the others dont appear for some reason |
here is a bit better version - made them all buttons and included more than tx - now ty is there as well :D ...
Code:
window -t "TX and TY"; |
but the indicator if you have keys for something atm is driving me nuts - maybe you are satisfied with the last version (of course more attributes needs be added :D)
|
working now
ok, the script is working: you can set keys and cut keys (now or in whole scene) of ALL keyable attributes. the indicator is still missing if a key is set already or not. and whenever you change the selected objects you have to run the script again, as only that will ensure that all attributes (the custom ones too) will show correctly. the easiest way to use it, is to copy the whole code (be sure you got all) into script editor, there select all, and mmb-drag it to the shelf - a MEL button that runs the setkey will appear ;)
enjoy p.s.: no comments in code, no docu? i know, dont blame me, it is my first mel try :D Code:
string $setKeyKeyable; |
i keep gettin a syntax error, even when i type it out :(
|
sorry about that nem.
can please anyone else confirm this? i can copy and paste it in script editor from here without problem :argue: |
1 Attachment(s)
ok, nem try this.
i attached a mel file. copy it to my prefs/maya/scripts and then use this command in script editor or command line: Code:
source bd_setkey; edit: i just downloaded it myself and tried it, and it works fine with my computer (maya 4.5 unlimited, 1.33 ghz TB, 768 mb ram, gf2mx400 running as quadro 2). did i use any stuff that would not work with other maya versions???? :banghead: |
oK that works :) i think ill make some adjustments to the code, like change the name, window size etc thats assumin ill get any mel help read
|
Quote:
|
how do you change the name of the script file? like atm you have to type
source bd_setkey how do i make it so i just type in setkey into the command line? |
Quote:
Means BabyDuck so I´d expect you to respect the guy´s credit after he´s helped you that much. |
oh right, thought it was some weird mel call function or whatever theyre called
|
All times are GMT. The time now is 03:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018