Age | Commit message (Collapse) | Author |
|
|
|
Commit of patch #5385, to make forward cycling more
user-controllable. Previously it only worked on one axis,
which was auto-detected from movement. This allows forward
cycling to work in more situations, such as stair
stepping.
|
|
In a few cases, it may be helpful to turn off the 'only show objects that are
in visible scene layers in the nla' trick. By default though, this is still on. Find
the switch in the View menu of NLA editor.
|
|
Now, objects without actions/nlastrips cannot get collapsed anymore
as it didn't make sense. The open/close triangle is no longer shown
for these.
Also, I went through and made sure all the NLA tools to comply with this.
This fixes bug #5591.
|
|
When animating, it is often useful to be able to visually see where the
'pauses' are between keyframes. Long keyframes do this - linking two
keyframes in the same channel together.
Long keyframes are only drawn when the two keyframes have the exact
same values. This has to happen for every ipo-curve represented by the
keyframes shown for a long keyframe to be drawn.
I've added two new theme colours for the action editor. They are for
the selected and deselected colours of the long keyframes (currently
defaulted to be the same as the NLA strip selection colours).
|
|
Strips under an object's strip in the NLA editor can now get collapsed,
like items in the Outliner.
Once an object's strips have been collapsed, it is still possible to add
strips to that object; Other operations will not be possible.
|
|
Fix for a few alpha problems with icons beside channels when markers are drawn
|
|
Now time-markers work in all time-related spaces (i.e. Ipo,
Action Editor, NLA editor, TimeLine, Sound). The hotkeys and
functionality set should be the same for each of these modes
(with a few exceptions still). I've had to change a few hotkeys
here and there, so hopefully they aren't too bad.
Marker Operations:
MKEY - Add Marker
SHIFT MKEY - Rename marker (was CTRL MKEY)
XKEY - Delete Marker
PAGE UP - Jump to next marker
PAGE DOWN - Jump to previous marker
CTRL A - Select all markers
SHIFT G - Transform markers (NLA, IPO, Action)
G - Transform markers (Sound, Timeline)
CTRL SHIFT D - Duplicate markers (NLA, IPO, Action)
SHIFT D - Duplicate markers (Sound, Timeline)
BKEY - select markers and other keyframes (if any)
I've also made a few little tool additions to NLA and Action editors:
* NLA editor - Snap To Frame.
Now with the option to offset strip so that it starts at the current frame.
Added menus for this.
* Action editor - Snap To Frame
A few new menus for this too
|
|
NLA window now follows visibility for scene layers, cleaning up complex
files quite some. Only note we could make is if this could be optional,
sometimes it's also nice to see the entire scene.
Note for Roland: this is a recoded version, with about 10% of code :)
|
|
NLA Strip "Mute" option, to temporally disable a strip. Option only in
Properties panel still, should be in menus and hotkey.
|
|
- FORWARD CYCLING & MATCHING
Up to no now, adding multiple actions in NLA with walkcycles required to
animate them standing still, as if walking on a conveyor belt. The stride
option then makes the object itself move forward, trying to keep the foot
stuck on the floor (with poor results!).
This option now allows to make walk cycles moving forward. By
indicating a reference Offset Bone, the NLA system will use that bone to
detect the correct offset for the Armature Pose to make it seamlessly going
forward.
Best of all, this option works as for cyclic Action Strips as well as for
individual Action Strips. Note that for individual strips, you have to set
the strip on "Hold". (Might become automatic detected later).
Here's an example edit image for NLA:
http://www.blender.org/bf/nla_match-cycle.jpg
And the animation for it:
http://download.blender.org/demo/test/2.43/0001_0150_match.avi
Blender file:
http://download.blender.org/demo/test/2.43/mancandy_matching.blend
Using this kind of cycling works pretty straightforward, and is a lot
easier to setup than Stride Bones.
To be further tested:
- Blending cycles
- matching rotation for the bones as well.
- ACTION MODIFIERS (motion deformors)
The above option was actually required for this feature. Typically walk
cycles are constructed with certain Bones to be the handles, controlling
for example the torso or feet.
An Action Modifier allows you to use a Curve Path to deform the motion of
these controlling bones. This uses the existing Curve Deformation option.
Modifiers can be added per Action Strip, each controlling a channel (bone)
by choice, and even allows to layer multiple modifiers on top of each other
(several paths deforming motion). This option is using the dependency graph,
so editing the Curve will give realtime changes in the Armature.
The previous walkcycle, controlled by two curves:
http://download.blender.org/demo/test/2.43/0001_0150_deform.avi
Blender file:
http://download.blender.org/demo/test/2.43/mancandy_actiondeform.blend
Action Modifiers can be added in the NLA Properties Panel. Per Modifier you
have to indicate the channel and a Curve Object. You can copy modifiers from
one strip to another using CTRL+C (only copies to active Object strips).
Setting up a correct Curve Path has to be carefully done:
- Use SHIFT+A "Curve Path" in top view, or ensure the path is not rotated.
- make sure the center point of the Curve Object is at the center of the
Armature (or above)
- move the first point of the curve to the center point as well.
- check if the path starts from this first point, you can change it using
(in Curve EditMode) the option Wkey -> "Switch Direction"
- Make sure alignment uses the correct axis; if the Armature walks into
the negative Y direction, you have to set in Object Buttons, "Anim settings"
Panel, the correct Track option. (Note; option will probably move to the
Modifier later).
This is a good reason to make such paths automatic (on a command). Is on the
todo list.
Also note this:
- the Curve Path extends in beginning and ending, that's (for now) the default,
and allows to use multiple paths. Make sure paths begin and end horizontal.
- Moving the Curve in Object Mode will change the "mapping" (as if the landscape
a character walks over moves). Moving the Curve in Edit Mode will change the
actual position of the deformation.
- Speed (Ipos) on paths is not supported yet, will be done.
- The Curve "Stretch" deform option doesn't work.
- Modifiers are executed *after* all actions in NLA are evaluated, there's no
support yet for blending multiple strips with Modifiers.
- This doesn't work yet for time-mapping...
This commit is mostly for review by character animators... some details or
working methods might change.
This feature can also be used for other modifiers, such as noise (Perlin) or
the mythical "Oomph" (frequency control) and of course Python.
Special thanks to Bassam & Matt for research & design help. Have fun!
|
|
In outliner, the icons sometimes were drawing too large or too small.
Same happened in NLA, Action, Image window etc. And it happened
for "International fonts" when set to use 'texture drawing'.
Reason: the API call for setting icon size BIF_icon_set_aspect() was not
used consistantly. Sometimes it was set, sometimes not. And even worse,
for every icon drawn in UI buttons, the icon lookup had to be done twice
because of the aspect function.
Solved it by removing this call, and adding a new function:
BIF_icon_draw_aspect()
The old BIF_icon_draw() call now draws with aspect 1.0 always. The icons
code already had optimal checking for changed sizes, zo a change in aspect
won't result in much cpu overhead. Plus it saves calling icons lookup code,
which will make it all a bit faster.
Andrea: I've added this aspect function a long while ago, I think you also
like it better how it is now? Please check!
|
|
NLA window: the "blend in/out" values were limited to action lenght, which
should the strip length instead.
|
|
calls caused icon hashing not to work too. Runs smooth here :)
|
|
world and lamp. Also for images in pupmenus.
Also preparation for work on using preview images in imagebrowser.
-- Andrea
|
|
For some ancient reason, the stride option only worked on a single strip,
and extended always. This made it nearly impossible to integrate it well
with other actions in NLA.
This commit changes it as follows;
- As any strip, the striding-strip also stops at the end of a strip
- This allows to put multiple different actions on a single path, and if
all of these have the striding option set, the actions will each do their
own individual stride.
- To match the different actions, a new "Action Offset" button was added
in the NLA Panel, which allows to internally cycle the action.
- Of course, blend-in and blend-out works nicely too.
Here's a quick AVI test with 2 actions. There's some slipping of the feet
between actions still, because of the stridebone blending. I might look
at that later, for now you can correct it with a simple Ipo on Armature too
http://www.blender.org/bf/0007_0151.avi
|
|
-> Any Group Duplicate now can get local timing and local NLA override. This
enables to control the entire animation system of the Group.
Two methods for this have been implemented.
1) The quick way: just give the duplicator a "Startframe" offset.
2) Advanced: in the NLA Editor you can add ActionStrips to the duplicator
to override NLA/action of any Grouped Object.
For "Group NLA" to work, an ActionStrip needs to know which Object in a
group it controls. On adding a strip, the code checks if an Action was
already used by an Object in the Group, and assigns it automatic to that
Object.
You can also set this in the Nkey "Properties" panel for the strip.
Change in NLA: the SHIFT+A "Add strip" command now always adds strips to
the active Object. (It used to check where mouse was). This allows to add
NLA strips to Objects that didn't have actions/nla yet.
Important note: In Blender, duplicates are fully procedural and generated
on the fly for each redraw. This means that redraw speed equals to stepping
through frames, when using animated Duplicated Groups.
-> Recoded entire duplicator system
The old method was antique and clumsy, using globals and full temporal
copies of Object. The new system is nicer in control, faster, and since it
doesn't use temporal object copies anymore, it works better with Derived
Mesh and DisplayList and rendering.
By centralizing the code for duplicating, more options can be easier added.
Features to note:
- Duplicates now draw selected/unselected based on its Duplicator setting.
- Same goes for the drawtype (wire, solid, selection outline, etc)
- Duplicated Groups can be normally selected too
Bonus goodie: SHIFT+A (Toolbox) now has entry "Add group" too, with a
listing of all groups, allowing to add Group instances immediate.
-> Library System
- SHIFT+F4 data browse now shows the entire path for linked data
- Outliner draws Library Icons to denote linked data
- Outliner operation added: "Make Local" for library data.
- Outliner now also draws Groups in regular view, allowing to unlink too.
-> Fixes
- depsgraph missed signal update for bone-parented Objects
- on reading file, the entire database was tagged to "recalc" fully,
causing unnecessary slowdown on reading.
Might have missed stuff... :)
|
|
Previously, using the "Stride Bone" tried to get that Bone motionless on
the path by correcting the internal time of the Action. This however caused
too many problems, especially with irregular walks.
The new system also tries to keep the Stride Bone motionless, but this by
moving the entire armature, and not changing the timing of the Action.
Give much nicer results. :)
To make editing Strides easier, I've added a new option in the NLA
panel to disable the path. This way you can quickly switch to editing the
action itself (keying the stride bone) and viewing the result.
|
|
1) Stride Bone
For walkcycles, you could already set an NLA strip to cycle over a path
based on a preset distance value. This cycling happens based on a linear
interpolation, with constant speed.
Not all cycles have a constant speed however, like hopping or jumping.
To ensure a perfect slipping-less foot contact, you now can set a Bone
in an Armature to define the stride. This "Stride Bone" then becomes a
sort-of ruler, a conveyor belt, on which the character walks. When using
the NLA "Use Path" option, it then tries to keep the Stride Bone entirely
motionless on the path, by cancelling out its motion (for the entire
Armature). This means that the animation keys for a Stride Bone have to be
exactly negative of the desired path. Only, at choice, the X,Y or Z Ipo
curve is used for this stride.
Examples:
http://www.blender.org/bf/0001_0040.avi
The top armature shows the actual Action, the bottom armature has been
parented to a Path, using the Stride Bone feature.
http://www.blender.org/bf/0001_0080.avi
Here the Stride Bone has a number of children, creating a ruler to be
used as reference while animating.
Test .blend:
http://www.blender.org/bf/motionblender1.blend
Notes:
- Note that action keys for Bones work local, based on the Bone's
orientation as set in EditMode. Therefore, an Y translation always
goes in the Bone's direction.
- To be able to get a "solvable" stride, the animation curve has
to be inverse evaluated, using a Newton Raphson root solver. That
means you can only create stride curves that keep moving forward, and
cannot return halfway.
- Set the Stride Bone in the Editing Buttons, Bone Panel. You can set
change the name or set the axis in the NLA Window, Strip Properties Panel.
- Files in this commit will move to the blender.org release section.
2) Armature Ghosting
In EditButtons, Armature Panel, you can set an armature to draw ghosts.
The number value denotes the amount of frames that have to be drawn extra
(for the active action!) around the current frame.
Ghosts only evaluate its own Pose, executing it's Actions, Constraints and
IK. No external dependencies are re-evaluated for it.
3) NLA/Action time control
If you click in the NLA window on the action (linked to Object), it makes
sure the Timing as drawn in the Action editor is not corrected for NLA.
If you also set the Object to "Action", this timing will be executed on the
Object as well (not NLA time).
(It's a bit confusing... will make a good doc & maybe review UI!)
|
|
-> Locked Strip length
When changing time of the animation curves in an Action, the strips in NLA
just remained the same length, causing very confusing situations.
By setting the strips to Locked (Nkey NLA window), it always updates the
strip length to make sure all keys are included, and not more. From now on
(not on old files) this is the default strip method.
-> ALT+C clear size
This menu has 2 options, the first clears the size, the 2nd remaps the
action (only when you didnt use the new Lock feature).
Both options are in the Pulldown menu too
-> Key drawing
The weird beveled button in Action/NLA didn't accurately show what time it
was actually on. I've replaced it with an Icon now, diamond shaped, in a
design derived from the TimeLine markers.
|
|
- NLA: Hotkey ALT+S resets (synchs) action start/end in selected Strips
- NLA: Panel for Strips allow setting negative "Action start"
- NLA: When transforming strips, the selected keys for that action don't
get included (caused weird errors)
- Action: cleanup of drawing horizontal bars.
- Action: Pulldown menu option "Lock time" was in different location than
for the other pulldowns
|
|
- ALT+C "convert action into strip" didn't calculate the mouse position
correct. Also changed menu a bit to tell which action it makes a strip
- Select action strips now activates Object too
- Icons in Object 'row' (denoting NLA override or not) now draw blended
|
|
- Added (BKE_utildefines.h) POINTER_TO_INT(poin) and INT_TO_POINTER(int)
defines, to help fixing issues with switch to 64 bits systems. This
assumes that a) not more than 16GB mem is used and b) that address
space is below the 1<<35 value. The latter has to be confirmed, but it
seems to conform the current 64 bits generation of OSs (for mallocs).
Needless to say; use long if you want to store pointers! This is for
temporal fixing.
- Added editmesh version for mesh-octree lookups, not used yet.
- Fix: ESC on armature posemode restored the actions, should not happen
- Fix: If in NLA an action was 0 frame long, it caused draw error
- Fix: Click on name in Action Window now activates Bones
- Fix: "Snap to" options in Armature editmode now use X-axis mirror edit.
|
|
-> Note; added 2 new c files (split editipo.c). MSVC needs upgrade.
Impatient people can check the goodies in CMS:
http://www.blender3d.org/cms/Action_and_NLA_editor.706.0.html
Most work was on trying to unwind the spaghetti for editing ipos. Too much
history and bad design got added here. Most evident changes:
- made generic 'context' for detecting which Ipo is being edited, or to
assign ipos or to retrieve ipo curves.
- made generic insertkey() for all ipo types, including actions
- shuffled a lot of code around to make things more logical. Also made
sure local functions are not exported
It is far from ready... when action/nla was added in Blender, a lot of
duplicate code was generated. That's for another time.
Now the goodies;
- made Actions to allow any Ipo type
- made NLA to define active actions, for Action window too
- corrected timing for active action, so it shows the 'real time', as
defined in NLA editor.
I did update python code, but that would require testing. Testing is
needed for this commit in general, too many changes happened on all
levels of the animation system. :)
Will keep track of all reports this evening, hopefully it doesnt break
the pre-release schedule!
|
|
- added support for vector icons, from user API side is just like using
a regular icon... on icon side is defined by a function in resources.c
instead of using the blenderbuttons png file. vector icons are much
easier to add and scale properly. intent is that vector icons would
be drawn in window coordinates which lets icon developers make the
most beautiful icons, but this requires some tweaking of the interface
drawing that I am not going to do atm.
- changed BIF_draw_icon* to take coordinates of where to draw icon instead
of using passed in raster position
- switch modifier UI to using vector icons, and tweaked some position and
style stuff.
- replaced most uses of UI_EMBOSSX with UI_EMBOSS (do same thing, just there
to confuse people I guess)
After the window coordinate stuff is sorted out with vector icons
it probably makes sense to move all non-photorealistic icons in blenderbuttons
to vector form just so scaling goes better.
|
|
that face... this situation should still not happen with well
written modifiers but at least it won't crash now
- bug fix in mirror modifier, calculation during editmode did not
check to make sure built mface's had valid indices... grr the
==0 tagging system is really a pain.
- convert a few uiDefBut calls to use explicit type
|
|
- switched almost all uiDefBut(..., TOG|BIT|..) to use UiDefButBit and the
name of the actual bit define instead of just a magic constant, this makes
searching the code much nicer. most of the credit here goes to LetterRip
who did almost all of the conversions, I mostly just checked them over.
|
|
other maximums).
Tried to change it everywhere, hopefully I didn't miss any.
Also raised max frame to 30000 (maintainer of that code can safely modify it back since it is in one spot now ;) )
Needed that limit for a marketing video contract, might as well commit it.
|
|
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
|
|
without the (ugly) global curarea being set.
Fixed the crash in his sample by nicely passing on 'current area' as
argument.
|
|
- themecolor for the 'bars' in NLA used signed char
- global undo, restore pointers for UI accidentally added user values for
oops and outliner, causing unused blocks to show used
- moved popup menus one pix up or down, it was overlapping the button
causing accidental selection of menus
|
|
Just one simple report, 4-5 hours work...
reported was that selecting in action+nla window is slightly off. Quite
annoying. It appeared to be a wrong usage of View2D facilities, causing
part rewrite of a lot of stuff here. Mainly did it as excercise, to get
better understanding of all of this. Would need some testing though!
PLus; fixed crash while using "single user" menu with Ipos in Object.
|
|
|
|
Added support for Panels, and converted old NKEY menu here.
Also enabled zooming in further, as for Action Window.
(note: this editor can use some work, this action stuff is underdeveloped
and mysterious!)
- UI code
Brought back fix that sets for each Panel a GL matrix for UI code thats
coming after it. This makes system more flexible, and prevents conflicts
with other uiBlocks in a window (like ipo, action).
This will give a tinsy bit more load for moving mouse around... please
report back if this causes troubles.
|
|
- first code for panel in NLA window, tomorrow I continue with it.
|
|
all calls to ortho2 with correctness offset of 0.375 instead of 0.5.
this efficiently solves bug in drawing UV lines as reported.
cvS: ----------------------------------------------------------------------
|
|
BTW: text colors don't work everywhere yet... but this state should
be save to store themes in your .B.blend (CTRL+X)
and some fixes:
- leftmouse click now works in NLA and Action window to select a
strip in the left part
- faceselect+vpaint mode didnt show both panels
|
|
include only (use BIF_interface.h instead)
- split up interface.c in two files: NEW: interface_panel.c
- removed the temporal text files
WARN: FIX AUTOMAKE AND MSVC!
|
|
this is part 1 of the UI makeover. It has:
- menu system from Matt integrated
- buttons drawing from Matt
- generic button panel system implemented
- converted displaybuttons (not the rest yet)
- cleaned up a lot in drawing spaces itself, to make it aligned and pixel exact.
- cleaned loads of little compiler warnings, protos...
still a lot of work needed, will all be in next week i hope!
(warn: 2 new c files! butspace.c and buttons_scene.c)
|
|
Well, it fixes the crash, but the cause can still be in wrong freeing
memory when deleting strips...
Hos; I leave in the bugreport with a note for you
|
|
- drawXXXspace, changeXXXspace, and winqreadXXXspace now receive the area
and spacedata as explicit arguments, allowing them to access private
data w/o going through globals.
- pass the new BWinEvent through to the winqreadXXXspace, allowing future
access to extended event data.
Removed direct calls to winqreadXXXspace to simulate user actions, replaced
by calls to action functions in edit.c or the appropriate handler.
|
|
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
Just need to finish cpp files now :)
Kent
--
mein@cs.umn.edu
|
|
|
|
|