Commit Graph

37 Commits

Author SHA1 Message Date
d7479f99b0 Share enum types with rna and small bugfix because Ton needs to make keymodifier bitflag work. 2009-03-07 10:28:08 +00:00
c07acfb4fd Transform fun
extracting params in split transform operators.

work in progress still, but lots of fun with operator replay (F6)
2009-03-06 15:50:15 +00:00
3f72758da2 Bugfix for Record Transform Animation
Only selected objects are now keyframed.
2009-02-18 06:25:57 +00:00
ba3cacc33f Visual Keyframing - Restored code to make this work, but it may still be flaky
NOTE: upon further testing, quick-record-animation feature does not work with auto-ik yet. Although it would be desireable to have, it is not a priority at this point, since adding that would require a bit of reworking of that code for something it wasn't intended for.
2009-02-17 10:58:40 +00:00
6eae888d49 PoseChannel Transforms - AutoIK Restored
- Auto-IK works again now. 

- Quick-animate feature works with Auto-IK now. 
- Also disabled the checks for existing animation data for this, making it easier to use/discover. At least we've got undo to cover for the cases where the user didn't intend to do this.
2009-02-17 09:34:21 +00:00
e81fde5aa4 Record Transform Animation - Quicky feature which makes it super-easy to animate stuff quickly
To use, simply enable Auto-Keyframing and start the animation playback from the TimeLine.
Then at any time while the playback is still running (and Auto-Keyframing is still enabled), select any object/bone and start moving it around. 
You can also select other objects/bones and move them around using standard transform tools (grab/rotate/scale), or exit transform for the active/selected object(s), and move on to other objects instead. Repeat until satisfactory!

This is similar to the old 'Record IPO' functionality (and/or is closer to the 'Mouse Recording' in 3DSMax), except it's much cooler, and is more flexible at the same time. It's
"good for quick and dirty tests, or things with timing, where it's easier to do it real time" - William Reynish, or "handycam effect or eyes animation" - Pepeland.


Additional Notes:
- for now, the objects that are used for this currently need some animation data already. This limitation is temporary.
- eventually, 'samples' (i.e. baked-data) not keyframes will be made by this tool as samples are more suitable for such large sets of densely spaced points
2009-02-17 08:55:50 +00:00
7f4fa8971a 2.5: Restoring Auto-Keyframing for Transforms
Auto-Keyframing does not work anywhere else yet, and probably won't for a while.
2009-02-16 03:01:56 +00:00
b2c04faa06 Graph Editor Transform Bugfix:
Now grabbing a single handle (auto/aligned) works correctly. One line of missing code mean that the handle recalculations were getting skipped.
2009-02-15 23:48:05 +00:00
b8e6e01cfd 2.5: Curve edit mode. Transform works again, and editcurve.c is
partly operatorized though nothing hooked up yet.
2009-02-11 23:02:21 +00:00
7114486e8b 2.5:
* UV Editor Transform, translate, rotate, scale, live unwrap, snap, gesture,
  etc work.
* Also for selection operators, used OPERATOR_FINISHED|OPERATOR_PASS_THROUGH
  instead of just OPERATOR_PASS_THROUGH to make gestures work, seems more
  correct to me.
2009-01-28 21:43:43 +00:00
8006134a9c 2.5
Made 'select-tweak-grab' work in 3d window, fcurve and nodes.
For nodes it works with both left/right, the others follow
user preset for select.

Tweak is a WM event, which also follows user preset for 
tablet-style tweaks (release = apply).

You enable tweak events with an operator WM_OT_tweak_gesture.
Keymap entries can assign to left/middle/right button or to
action/select button tweaks.
2009-01-28 15:39:39 +00:00
5b14573d0b Graph Editor: Restoring most tools
* Copy/Paste still needs to be cleaned up to be functional. Auto-set preview range + View All also need some work to become functional...
* Smooth has been moved to Alt-O hotkey, as Shift-O was taken for Sample 
* Renamed a few operators for DopeSheet to be more in line with Graph Editor ones, and to be less obscure.
* The 'join' and 'remove doubles' tools are not likely to be restored. I think that a few of the new tools cover this lack anyway. We can restore them if there is a real need.

* Record tool needs a rethink to be genuinely useful, so it's not included here anymore.
A note for anyone wanting to play with implementing this: store the sampled points using the new FPoint type in the FCurve instead of using BezTriples, as FPoints are used for storing sampled/baked data.
2009-01-28 09:55:36 +00:00
a0fa83a9dc Graph Editor - Restored all Transform tools
I've ported the transform tools for this editor as they existed in the AnimSys2 branch (minus some of the experimental pivot options which were not useful enough yet).

Hotkeys are:
* GKEY - transforms points as always
* RKEY - rotates points (only useful for a single 'knot') 
* SKEY - scales points
* EKEY - like in the DopeSheet, the 'extend' translation tool only moves all the keyframes on the same side of the current frame indicator as the mouse

Useful tweaks ported from AnimSys2 include:
* Auto-snapping is on by default for time-values on the keyframes only. Handles are not snapped (or shouldn't be).
* Rotating/Scaling new keyframes using default handles (i.e. Auto-Handles) now works, as the handle is now converted to aligned so that changes can be seen.
2009-01-28 02:56:58 +00:00
f53ecfa403 2.5 - Pose-Channel (i.e. PoseMode bone) Transforms work again
In the brief tests I did on a few rigs, this seems to work ok. Martin may want to check on the code for any cleanups that may be needed here.

Coming soon will be some modifications to the primative insert-key operator added earlier, so that Animato can be used to animate characters!
2009-01-24 10:03:19 +00:00
88e244ebb9 basic transform for sequencer strips
can transform the strips or move their handles
Still todo, click-drag transform, metastrips support, snapping, markers overlap checks and constrain to valid channels.
2009-01-21 07:01:20 +00:00
bd9e896e96 2.5
View3D four-split: added box-clip for the three ortho
windows. Is all on by default, waiting for headers and
buttons to come back.

Also: hotkey for foursplit now also removes it (toggle)

Also: window_to_3d() function only did delta's, 
renamed it to window_to_3d_delta  and coded a 
real window_to_3d()
2009-01-20 18:31:11 +00:00
bc63213844 2.5
View3D has been split now in a local part (RegionView3D) and a
per-area part (old View3D). Currently local is:

- view transform
- camera zoom/offset
- gpencil (todo)
- custom clipping planes

Rest is in Area still, like active camera, draw type, layers,
localview, custom centers, around-settings, transform widget,
gridlines, and so on (mostly stuff as available in header).

To see it work; also added new feature for region split, 
press SHIFT+ALT+CTRL+S for four-split. 
The idea is to make a preset 4-split, configured to stick
to top/right/front views for three views.
Another cool idea to explore is to then box-clip all drawing
based on these 3 views.

Note about the code:
- currently view3d still stores some depricated settings, to
  convert from older files. Not all settings are copied over
  though, like custom clip planes or the 'lock view to object'.
- since some view3d ops are now on area level, the operators
  for it should keep track of that.

Bugfix in transform: quat initialize in operator-invoke missed
one zero.

Als brought back GE to compile for missing Ipos and channels.
2009-01-19 16:54:41 +00:00
44e5b7788b 2.5: Blender "Animato" - New Animation System
Finally, here is the basic (functional) prototype of the new animation system which will allow for the infamous "everything is animatable", and which also addresses several of the more serious shortcomings of the old system. Unfortunately, this will break old animation files (especially right now, as I haven't written the version patching code yet), however, this is for the future.

Highlights of the new system:
* Scrapped IPO-Curves/IPO/(Action+Constraint-Channels)/Action system, and replaced it with F-Curve/Action. 
- F-Curves (animators from other packages will feel at home with this name) replace IPO-Curves. 
- The 'new' Actions, act as the containers for F-Curves, so that they can be reused. They are therefore more akin to the old 'IPO' blocks, except they do not have the blocktype restriction, so you can store materials/texture/geometry F-Curves in the same Action as Object transforms, etc.
* F-Curves use RNA-paths for Data Access, hence allowing "every" (where sensible/editable that is) user-accessible setting from RNA to be animated.
* Drivers are no longer mixed with Animation Data, so rigs will not be that easily broken and several dependency problems can be eliminated. (NOTE: drivers haven't been hooked up yet, but the code is in place)
* F-Curve modifier system allows useful 'large-scale' manipulation of F-Curve values, including (I've only included implemented ones here): envelope deform (similar to lattices to allow broad-scale reshaping of curves), curve generator (polynomial or py-expression), cycles (replacing the old cyclic extrapolation modes, giving more control over this). (NOTE: currently this cannot be tested, as there's not access to them, but the code is all in place)
* NLA system with 'tracks' (i.e. layers), and multiple strips per track. (NOTE: NLA system is not yet functional, as it's only partially coded still) 

There are more nice things that I will be preparing some nice docs for soon, but for now, check for more details:
http://lists.blender.org/pipermail/bf-taskforce25/2009-January/000260.html

So, what currently works:
* I've implemented two basic operators for the 3D-view only to Insert and Delete Keyframes. These are tempolary ones only that will be replaced in due course with 'proper' code.
* Object Loc/Rot/Scale can be keyframed. Also, the colour of the 'active' material (Note: this should really be for nth material instead, but that doesn't work yet in RNA) can also be keyframed into the same datablock.
* Standard animation refresh (i.e. animation resulting from NLA and Action evaluation) is now done completely separate from drivers before anything else is done after a frame change. Drivers are handled after this in a separate pass, as dictated by depsgraph flags, etc.

Notes:
* Drivers haven't been hooked up yet
* Only objects and data directly linked to objects can be animated.
* Depsgraph will need further tweaks. Currently, I've only made sure that it will update some things in the most basic cases (i.e. frame change).
* Animation Editors are currently broken (in terms of editing stuff). This will be my next target (priority to get Dopesheet working first, then F-Curve editor - i.e. old IPO Editor)
* I've had to put in large chunks of XXX sandboxing for old animation system code all around the place. This will be cleaned up in due course, as some places need special review.
In particular, the particles and sequencer code have far too many manual calls to calculate + flush animation info, which is really bad (this is a 'please explain yourselves' call to Physics coders!).
2009-01-17 03:12:50 +00:00
ea2d6fe0d0 2.5
Another one back: editcurve.c

- removed global editNurb everywhere
  (cu->editnurb now has listbase with edit data)
- also added 'active bpoint' and 'active nurb' in
  Curve struct
- editmode in/out works, mouse/border select works
2009-01-14 12:26:45 +00:00
6ab86a7572 2.5
Transform operator replay support for constraints.

Code isn't nice, will have to split some properties to separate what's part of the "saved data" from operator arguments.
2009-01-10 19:45:48 +00:00
3c2b772a23 2.5
Transform draw callback: constraints, snapping, prop circle
2009-01-10 18:33:16 +00:00
a8f8bf1dc5 2.5
Transform editbones
2009-01-08 17:12:50 +00:00
1fe21f7e8f 2.5
Put back Armature/Pose code, including 'heat weight'.
I've added reeb.h to get things compile, but Martin will
cleanup files and put back?

Now where to put all vertexgroup code.... I guess mesh?

Note for msvc: yep, another new dir to add! :)
2009-01-05 15:19:31 +00:00
Nathan Letwory
9e7643aa7c 2.5 / Cleanup
- remove Verse support. This will be brought back in The Future (probably jiri + me)
  This means 5k lines less in blenkernel.
- fix two small errors for global cleanup, now compiles properly with FFMPEG enabled too.
2009-01-04 18:16:34 +00:00
f7cb86df3a 2.5
Think global, act local!

The old favorite G.scene gone! Man... that took almost 2 days.
Also removed G.curscreen and G.edbo.

Not everything could get solved; here's some notes.
- modifiers now store current scene in ModifierData. This is not
  meant for permanent, but it can probably stick there until we
  cleaned the anim system and depsgraph to cope better with
  timing issues.
- Game engine G.scene should become an argument for staring it.
  Didn't solve this yet.
- Texture nodes should get scene cfra, but the current implementation
  is too tightly wrapped to do it easily.
2009-01-04 14:14:06 +00:00
Nathan Letwory
610a56843e 2.5 / Nodes / Transformations
- after talking with Martin P (theeth), I have now shuffled code around
  so that there is no more exception code for nodes in the wrong places.
  This means node editor now also use entirely common translation.
  As proof of concept, there is now also resize and rotate support. It already
  works, but there need to be a bit more thought in how those
  actions are initialised for node editor. Probably some way to tell
  what to use as pivot point, etc.
2009-01-04 01:08:01 +00:00
ecc5f17e4d 2.5
Transform operator replay

Basic support working. Only saves mode and values, not constraint setup.

Removed event pointer from TransInfo (it's not available in operator exec). Replaced checks to event->modifiers to a functional modifier bitfield in TransInfo (that is, instead of checking for Shift, it checks for MOD_PRECISION) to make it remappable later.

Misc:
	X-Mirror for mesh now working with transform
2009-01-03 22:15:59 +00:00
Nathan Letwory
bdf6a002aa 2.5 / Nodes
* add Context accessor for selected nodes
* node translation uses transform code
* put transform defines in an enum (mode and numinput flags)
2009-01-02 23:58:03 +00:00
a6721c60d9 2.5
From the anti-globalization department: 
G.obedit terminated!

Wherever possible, use CTX_data_edit_object(C) to get this
now. It's stored in scene now, and the screen context has
it defined.
2009-01-02 19:10:35 +00:00
ea42e70cb9 2.5
- Transform for editmesh (including PET and editmesh snap) X-Mirror doesn't seem to work, but the option isn't accessible in the UI, so...

- Replacing G.obedit with obedit from context in view3d_header (other files will have to be done too, I just happened to stumble on that one while fixing other things).
2008-12-31 22:43:29 +00:00
da893e08c1 2.5
Previous commit crashed transform in object mode.
2008-12-31 18:18:38 +00:00
c9b60a7b64 2.5
So, editmode mesh is back! :)
At the moment only TABkey works and mouse select, 1 vertex at a
time. More will follow of course.

Note for the devs:
- G.editMesh has been removed, be careful with old code.
- EditMesh now is property of Mesh itself
  Although it means unlimited editmodes, for migration purposes we
  better stick to 1 "obedit" per scene, which is in Context too
- G.obedit will get removed soon, so use CTX_data_edit_object(C)
  Or if you can't, just scene->obedit for now
- Also removed the CTX_data_edit_mesh(), this has no meaning 
  anymore. EditMesh is not context senstitive anymore, only the
  edit-object for time being is.
- Martin: I've already tucked some EditMesh pointer in T and
  removed all G.editMesh there.
2008-12-31 17:11:42 +00:00
2629095828 2.5 - Transform Code for Animation Editors (Part 1)
Remove context pointer from transform code. Solved the need for this by modifying the code that needed it.
2008-12-30 00:28:11 +00:00
34b53def70 2.5
Transform house cleaning. Gattering input methods in specialized code. It's not missing much before it can be used standalone (for example, to use the mouse to specify remove doubles threshold interactively).

Note to Aligorith: Transformations using INPUT_NONE (most Time* stuff) would use a cleanup.
2008-12-29 20:37:54 +00:00
a91e79ba70 2.5 - Action Editor Transforms now work again
Note: there were some crashes that would occur if context was not reset everytime the modal callback was run. Probably there's something about the context info we need to be more careful about.
2008-12-29 07:19:16 +00:00
fc243ed361 2.5 Transform Code - Preparing for Action Editor Support
* Fixed up most of the relevant Fixme's for Action Editor and/or some animation stuff

* Added keymap for action editor transforms to transform keymap.

* Added context pointer to TransInfo struct. This was needed to avoid passing context to everything. As such, renamed the old 'context' setting to options.
2008-12-29 06:06:59 +00:00
b6b61681ef 2.5
Transform:
First working port of the transform code:
- Object mode only (other conversions need to be ported)
- Contraints (global and local only) working
- Snap (no edit mode, obviously) working
- Numinput working
- Gears (Ctrl and Shift) working
- Only grap, rotate, scale, shear, warp and to sphere have been added as hotkey, but the rest should work too once accessible
- No manipulator
- No drawn feedback other than moving stuff and header print (no constraint line, snap circle, ...)
- No NDOF support

I've only tested Scons support, though Makefil *should* work, I *think*.

Misc:
-QuatIsNull function in arith
-Exporting project_* and view[line|ray] functions from view3d
2008-12-29 01:41:28 +00:00