Commit Graph

78 Commits

Author SHA1 Message Date
5fc61f03c1 NLA SoC: Fixes for bugs in transform code from previous commit
* The code to move strips between tracks now works (though it can still be a bit too eager to change tracks half-way through some transforms). 
Strips are moved up/down one strip at a time, depending on whether there is any space in the next-track in the direction you direct it to move in. 

* Auto-snapping works again. Also enabled snap-to-marker option for Graph Editor here.
2009-07-07 06:16:06 +00:00
2edef129be NLA SoC: Transform Code for NLA-Strips recoded (still buggy)
Recoded the Transform code for NLA-Strips so that they can now be moved between strips and will not get truncated when they get moved into other non-moving strips. 

Todos:
* The current code for moving strips between tracks is buggy (only goes up, and has a tendency to move up without being told to)
* Auto-snapping doesn't work yet...
2009-07-07 05:41:59 +00:00
905b138005 NLA SoC: Start of integration of Meta-strips in Transform
* Chains of selected strips are now converted to meta-strips before transforms begin, and converted back afterwards. This simplifies the transform code needed in later stages...

* Transform-flushing code for Meta-Strips should now work. There seems to be a little bit of numeric inaccuracy problems somewhere, as two strips which met at the same frame can get separated when scaling.

* Meta-strips now draw with proper text identification

* Snapping strips now properly clears meta-strips if a moved strip needs to be moved into a new track to be accomodated.

* Fixed a filter used by a selection-operator.
2009-07-07 02:12:50 +00:00
aa4ed13e4a NLA SoC: NLA Mapping Cleanup
While trying to fix the mapping conversions for repeat, I came across some limitations with the current (soon to be previous) mapping methods. 

Now the mapping conversions should work nicely for all places that use them.
2009-06-28 07:32:00 +00:00
500507ddb1 NLA SoC: Merge from 2.5 - 21179 to 21209 2009-06-28 03:26:10 +00:00
912c2f440b Pointcache refresh part 2
* Based on what happens during simulation the cache is marked (also in cache panel, this could possibly be extended to 3d view as well) as:
	- exact (not marked)
	- outdated (simulation is not done completely with current settings)
	- non-exact (frames were skipped during simulation)

* The parameter "cache step" effects the number of frames between saved cache frames.
	- This can save a lot of memory (or disk space) if absolutely frame accurate simulation is not required.
	- Speeds up the "quick caching" very much.
	- Frames between cached frames are interpolated from the cached frames.
	- Current default value of 10 frames works nicely with up/down-arrows (skip 10 frames forwards/backwards on timeline), but can be changed if wanted.

* The caching can work in normal or "quick" mode:
	[Normal cache]
	- Basic: Calculate what even happens (settings change, big frame steps etc.) and cache results, if possible try to use "cache step" when saving cache frames.
	- Becomes non-exact: After larger than 1 frame steps.
	- Becomes outdated: After any change effecting the simulation other than frame steps.
	- Pros/cons: Freedom of doing anything and playing with particles, but exact results have to calculated from the beginning.

	[Quick cache]
	- Basic: Calculate simulation up to current frame automatically on changes with cache step sized jumps in simulation. With multiple "quick cached" simulations the smallest cache step is used.
	- Becomes non-exact: Always from frame 1 (unless cache step = 1).
	- Becomes outdated: Never.
	- Pros/cons: Not very accurate, but super fast!
	- Todo: Transform of any animated (non-autokeyed) object is locked! Probably needs some tinkering with anim sys overrides.

* The simulation can be run forwards or backwards even if it's cache is outdated or non-exact, the following rules apply in these situations:
	- step forwards (to unknown) -> simulate from last exact frame, store result
	- step backwards (to known) -> result is interpolated from existing frames, store result, clear cache forwards if current frame is after last exact frame

* "Calculate to current frame" runs the simulation from start to current frame with a frame steps of 1.
	- Baking does the same, but runs the simulation all the way to the end of simulation.
	- Rendering does this automatically if the simulation is outdated of non-exact, so all rendered simulations will always be updated and exact.
	
* Every cache panel also holds buttons to "Bake all dynamics", "Free all dynamics" and "Update all dynamics to current frame".

* Cloth simulation supports the new cache too.
2009-06-27 15:28:58 +00:00
6510da4ce2 NLA SoC: Fix transforms for transition strips. 2009-06-25 12:30:49 +00:00
a1c5c501a6 At last... this merge should finally do the trick!
21073 to 21145
2009-06-25 04:33:21 +00:00
717916c2b9 NLA SoC: Fixes for segfaults during NLA Transforms
The snapping code was incorrectly assuming that td->extra was always AnimData, but for NLA this is incorrect as it is used for special data used for checking back.
2009-06-24 01:41:12 +00:00
b4acd77526 NLA SoC: Big Commit - Restored NLA-Mapping Corrections
In TweakMode, the keyframes of the Active Action are now shown (and can be edited) in NLA-mapped time, with appropriate corrections applied when editing. This works in the DopeSheet and Graph Editors :)

To do this, got rid of the old wrappers/API-methods, replacing them with new-style ones. A few methods previously (in this branch) used only for evaluation are now used for this purpose too. As the same code is used for editing + evaluation, this should now be much better to work with.

I've only done a few brief tests now, but I think I might've muddled the invert-flags on one or two cases which I'll need to check out tomorrow. So, beware that there may be some weird and critical bugs for the next few days here...

Also, added proper license headers to new NLA files.


TODO:
- testing + bugfixing due to this commit
- show range of keyframes in NLA Editor active-action line
2009-06-23 13:25:31 +00:00
e2b6cea3b9 2.5: Tool Settings
* Moved proportional edit, snap, autokey mode, and a few others
  from Scene to ToolSettings.
* RNA wrapped properties in ToolSettings for the UV editor:
  proportional edit, snap settings, selection modes.
2009-06-23 00:41:55 +00:00
aa267976b8 NLA SoC: Merge from 2.5
21043 to 21072 

(NOTE TO SELF: Campbell made a commit in 2.5 before this merge finished)
2009-06-22 04:39:35 +00:00
6b15024f4a Pointcache refresh part 1:
* Particles support larger than 1 frame changes, bigger frame changes can result in inaccurate results, but it's super fast and you get a nice feeling of how the particles behave!
* "Cache to current frame" button calculates the exact result of particles at current frame.
* Current state of cache can be protected by making it a bake.
* Cache is now in memory by default, disk cache is an option.
* Only "viewport %" number of particles are calculated and cached in viewport, baking and rendering calculate all particles.
* Info on cached frames and memory usage given in ui.
* Support for exact "autocaching" of changes and large frame changes(disabled for now until exact place in event system is decided)
* "Continue physics" is probably deprecated after this and should be removed once sb & cloth use the new cache code.

Todo:
* Make softbody & cloth use the new cache things.

Other changes:
* Some cleanup of particle buttons.
2009-06-21 10:16:52 +00:00
ca5ff43b1f NLA SoC: Improved anim-channel filtering flags for NLA so that channels don't need to be checked to be NLA-Tracks before being used. 2009-06-09 12:28:10 +00:00
096e2f0b5a NLA SoC: Transform tools for NLA
This commit restores transform support for NLA. Grab, scale, 'extend', and tweak (i.e. grab by just click+dragging) are implemented. 

Notes:
- As soon as one end of a strip touches another adjacent strip (within the same track), that end stops moving. This has been done to avoid the situation where overlapping strips within the same track (which is not allowed) might be caused by transforms.
- Made some changes to the RNA setters for the strip extents so that the validation above could take place (and other necessary changes on a per-strip basis could also occur).

TODO's ?
- Strips cannot be transferred from track to track using transforms. I've yet to decide whether this needs to be done, or whether a separate operator will suffice.
- What happens to the range of Actions used when the strips change sizes unexpectedly (i.e. the no-overlap condition above)? Currently range stays the same, but this doesn't always seem desirable?
2009-06-09 11:26:45 +00:00
2dbf73f6a0 2.5 PoseLib - First steps to get PoseLib to work in 2.5
* Cleaned up Keyframing API to get eliminate some of the problems faced during the original implementation of PoseLib, thus reducing code redundancy. 
* Added new Animato evaluation functions specifically for use by PoseLib. 
* Replaced parts of PoseLib code which relied on old animation system to the equivalent code for Animato. Notice the much cleaner + saner + compact code!

Next step is to operatorfy the PoseLib tools (while maintaining possibility for an API to some things) :)
2009-04-15 01:10:36 +00:00
5b3d7bfdf6 2.5
More cleanup!

- removed old UI font completely, including from uiBeginBlock
- emboss hints for uiBlock only have three types now;
  Regular, Pulldown, or "Nothing" (only icon/text)
- removed old font path from Userdef
- removed all old button theme hinting
- removed old "auto block" to merge buttons in groups
  (was only in use for radiosity buttons)

And went over all warnings. One hooray for make giving clean output :)
Well, we need uniform definitions for warnings, so people at least fix
them... here's the real bad bugs I found:

- in mesh code, a call to editmesh mixed *em and *me
- in armature, ED_util.h was not included, so no warnings for wrong call
  to ED_undo_push()
- The extern Py api .h was not included in the bpy_interface.c, showing
  a several calls using different args.

Further just added the missing includes, and removed unused vars.
2009-04-14 15:59:52 +00:00
e4ee708cef Added back old code for transform seq overlap in an '#if 0',
since the loop that works around t->data being freed can sometimes shuffle strips that are not being transformed (eg, when extending or with locked strips)
2009-03-30 01:16:28 +00:00
4a164ce520 Shuffle only selected sequence blocks. 2009-03-28 22:01:07 +00:00
145a441357 Correctly cancel operator is there's no transform data.
Don't access RegionView3D if region is of the wrong type.

Correctly draw extra transform stuff (like snap and pet circles) in multiple 3d regions.
2009-03-28 20:46:38 +00:00
a5f32714f7 Remove exception for sequencer in after_trans by rewriting the update code. Please don't start adding exceptions like that in transform without asking first. 2009-03-28 16:45:22 +00:00
e42070d20f - made epydoc generator write a list of words used in descriptions
- fix spelling mistakes in rna docs (and some comments)
2009-03-28 11:44:07 +00:00
607d86167c * sequencer transform needs t->data not to be freed by postTrans so special_aftertrans_update can use it.
* text header needs a static char* so text is not rendered as gibberish. (until labels own their own strings)
* epy_doc_gen.py - write out a graphviz representation of the data api.
2009-03-27 06:06:11 +00:00
d93fd9ffc1 UI:
* Screen level regions created for menus are now a separate
  CTX_wm_menu in the context, so they don't interfere with
  existing regions.
* Fix context in popup menus to always come from the area
  and region the popup was opened from.
* Removed some unused context stuff: tasks and reports.
  The places that were using context reports were using it
  wrong anyway.
* Fix F6 closing immediately after editing a button, by
  making uiBlockSetFlag not clear existing flags anymore.
* Don't use ":" in boolean X/Y/Z buttons.
2009-03-25 20:49:15 +00:00
43d4e3fa7e Graph Editor: F-Curves which can only take integral values are now drawn stair-stepped using the sampling code. 2009-03-18 10:58:18 +00:00
d52400bfbd 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r18677:19317
Notes:
* Sequence transform strip uses G.scene global, this is commented
  out now, should be fixed.
* Etch-a-ton code was most difficult to merge. The files already in
  2.5 got merged, but no new files were added. Calls to these files
  are commented out with "XXX etch-a-ton". editarmature.c and
  transform_snap.c were complex to merge. Martin, please check?
* Game engine compiles and links again here for scons/make/cmake
  (player still fails to link).
2009-03-17 21:44:58 +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
06629033b3 Pose Channels - changing settings in RNA updates them correctly again 2009-03-02 01:22:02 +00:00
d52212c73e 2.5 - Various animation bugfixes for samples 2009-03-02 00:55:10 +00:00
9ac7c8e91a 2.5: Particle edit mode more functional now. Transform, brush
editing, paint cursor, radial control, mouse/border/circle/lasso
select, mirroring, bad level calls fixed, etc.
2009-02-25 19:29:58 +00:00
ebd2b1212d 2.5: Particle Edit, work in progress commit.
* Still incomplete and some operators don't work, refresh issues, etc.
* Made Hide/Reveal operators consistent for various modes.
2009-02-20 20:39:27 +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
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
f89e3d2517 2.5 - Context API access for Bones (EditMode and PoseMode)
* Added selected, selected+editable, and active to access EditBones for Armature Operators to use. These take into account X-Axis Mirror too, so there is really no need to check that sort of thing anymore in tools. 

* Added a quick testing operator for verifying that these loops filter the data correctly. I've dumped this in armature_ops.c for now. It can be activated using the TKEY hotkey in Armature EditMode only. This should be removed once we have a few more functional tools.

* Ported over cleaned up roll-calculation tools from AnimSys2
* Removed a few ugly stubs from posemode code
2009-02-05 03:28:07 +00:00
ce2446e3db * Was missing checks for scene->ed which crashed blender when using the sequencer for the first time.
* Added WM_OT_tweak_gesture operator for select, drag
* Sequencer select operator now returns OPERATOR_FINISHED|OPERATOR_PASS_THROUGH
2009-01-28 22:36:34 +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
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
0494683f44 Graph Editor: Bringing back editing tools
* Snap + Mirror Keyframes (Shift-S and Shift-M)
* Set Handle/Interpolation type
* Snap current frame to selected keyframes (Ctrl-Shift-S) from the DopeSheet

* Toggle visibility of all handles (Ctrl H) from AnimSys2 branch also ported
2009-01-28 06:32:47 +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
8078bc65d6 Graph Editor:
* Cleaned up code for borderselect with BKEY. There's still a bug here where y-values don't seem to be getting properly checked, so nothing seems to happen.

* Set up some code for transforming keyframes. It currently uses the wrong code though (i.e. it uses the code for Action Editor which is 1D not 2D, and doesn't have some of the special checks needed). More work on this later.
2009-01-27 11:09:30 +00:00
bf05827319 * Added WM_operator_filesel which can be used for an operators invoke function (like WM_operator_confirm).
It opens the files selector if "filename" property has not been set, else it executes the operator directly. Brecht, you might want to check, currently only sequencer add operators use it.
* Added back Effects menu back, replaced SEQUENCER_OT_add_color_strip with SEQUENCER_OT_add_effect_strip.
* Made sequencer header use operator UI functions.
* gcc complains when char's are used as array indicies when they are not explicitly signed/unsigned, corrected previous change for vpaint to silence this error.
2009-01-26 09:13:15 +00:00
784d8ee37a 2.5 DopeSheet/Action Editor
* Made the various datatypes in the DopeSheet get shown again (NOTE: some of the types that don't get conversions to Animato yet may need some further checking).
* Did some code cleanup to allow F-Curve channels to always show RNA-based names correctly
2009-01-26 04:13:38 +00:00
8b793524ff make operator names more consistent
ANIM_OT_toggle_time -> ANIM_OT_time_toggle
SCULPT_OT_toggle_mode -> SCULPT_OT_sculptmode_toggle
UV_OT_select_inverse -> UV_OT_select_invert
NODE_OT_toggle_visibility -> NODE_OT_visibility_toggle
OBJECT_OT_toggle_editmode -> OBJECT_OT_editmode_toggle

toggle was used last in other operators eg- VIEW3D_OT_vpaint_toggle and VIEW3D_OT_wpaint_toggle.

'invert' was used everywhere else.
2009-01-25 15:41:17 +00:00
31fc0ff995 * added operators SEQUENCER_OT_lock, unlock, reload, refresh_all, view_all, view_selected.
* sequencer transform now does overlap checks.
* removed old transform functions from sequencer_edit.c
* shuffle_seq moved to kernel, now moves strips to the end of the last sequence of itschannel (if all channels are used). 2.4x would remove the strip.
* most of the 'Strip' menu items now call their operators in the header menu, some for view and select too.
2009-01-25 14:53:41 +00:00
0ac35ca7c1 2.5
- Brought back code for particle edit and fluidsim
- Sanitized code from globals and bad level calls,
  so its ready to come back working.
- Fixed cirle selecting (Ckey now)
- Enabled undo for editmode curve, armature, particle
  and lattice

(another commit following)
2009-01-24 13:45:24 +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
a727277a25 my last commit broke transforming metastrips, use find_id for scene lookup. 2009-01-24 09:55:31 +00:00