PDA

View Full Version : Adding a (camera) key via Script ?



campi
09-09-10, 02:26 AM
Hi,

I am trying to set up a simple camera bookmark system that doesn't need me clicking into the timeline each time I save a camera position (I have it hidden most of the time).
I played around with scripts and macros but setting a key frame in the timeline doesn't seem to be recorded. What's the command line for

a) setting a key at a specific time
b) setting the "current time" slider to a specific time (guess I could use the arrow keys instead but if there's another way ...)

Thanks,
Jens

marcus_civis
09-09-10, 10:11 AM
It's not currently possible to set a Timeline keyframe through zscript. What you can do is record your model's position using the [TransformGet or [MTransformGet commands. You could then have zscript buttons that store/restore the positions of your model. (This is essentially the method used by the ZAppLink Views buttons.)

Svengali
09-09-10, 01:13 PM
You might find a use for ModelVues8, a little plugin that lets you store and retrieve 8 model views. The downloadable zip file includes the .txt ZScript which shows exactly how it works so you can adapt the script to your own purposes.

ModelVues8 - save camera views (http://www.zbrushcentral.com/showpost.php?p=581733&postcount=7)

Sven

campi
09-10-10, 03:48 AM
hey that's great thanks. Violating your script right now to make it into the desired one key to save view - one key to load view script. This is an excellent starting point.

thanks