Age | Commit message (Collapse) | Author |
|
pencil layer keyframes.
Used in action_select to refactor the selection operators.
No functional changes.
Reviewed By: Sybren A. Stüvel
Differential Revision: http://developer.blender.org/D16168
|
|
After the redo panel is added to animation editors in D14960, many
operators have now been adjusted to appear and function correctly.
A full list of changes is tracked in T98195.
This patch only includes actual usability fixes. It does not do any
changes for the user's convenience, like adding other helpful properties
to operators. This can be done in a follow-up patch.
Reviewed By: sybren
Maniphest Tasks: T98195
Differential Revision: https://developer.blender.org/D14977
|
|
|
|
|
|
Removes the following macros for scene/render frame values:
- `CFRA`
- `SUBFRA`
- `SFRA`
- `EFRA`
These macros don't add much, other than saving a few characters when typing.
It's not immediately clear what they refer to, they just hide what they
actually access. Just be explicit and clear about that.
Plus these macros gave read and write access to the variables, so eyesores like
this would be done (eyesore because it looks like assigning to a constant):
```
CFRA = some_frame_nbr;
```
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D15311
|
|
Grease Pencil animation channels are now also shown in the Dopesheet
mode of the Dopesheet editor and in the Timeline.
Grease pencil related events are now listened not only by container
`SACTCONT_GPENCIL` (Grease Pencil Dopesheet), but also
`SACTCONT_DOPESHEET` (main Dopesheet), and `SACTCONT_TIMELINE`
(timeline).
A new Animation Filter flag was added: `ANIMFILTER_FCURVESONLY`. For now
this only filters out Grease Pencil Layer channels.
**Implemented:**
- Preview range set: now only considers selected Grease Pencil keyframes
when `onlySel` parameter is true. Not only this allows the operator to
work with grease pencil keyframes in main dopesheet, but it also fixes
the operator in the Grease Pencil dopesheet.
- Translation: allocation (and freeing) of specific memory for
translation of Grease Pencil keyframes.
- Copy/Paste: call to both Fcurve and GPencil operators, to allow for
mixed selection. Errors are only reported when both the FCurve and
GPencil functions fail to paste anything.
- Keyframe Type change and Insert Keyframe: removed some code here to
unify Grease Pencil dopesheet and main dopesheet code.
- Jump, Snap, Mirror, Select all/box/lasso/circle, Select left/right,
Clickselect: account for Grease Pencil channels within the channels
loop, no need for `ANIMFILTER_FCURVESONLY` there.
**Not Implemented:**
- Graph-related operators. The filter `ANIMFILTER_FCURVESONLY` is
naively added to all graph-related operators, meaning more-or-less all
operators that used `ANIMFILTER_CURVE_VISIBLE`.
- Select linked: is for F-curves channel only
- Select more/less: not yet implemented for grease pencil layers.
- Clean Keys, Sample, Extrapolation, Interpolation, Easing, and Handle
type change: work on Fcurve-channels only, so the
`ANIMFILTER_FCURVESONLY` filter is activated
Graying out these operators (when no fcurve keyframe is selected) can be
done with custom poll functions BUT may affect performance. This is NOT
done in this patch.
**Dopesheet Summary Selection:**
The main summary of the dopesheet now also takes into account Grease
Pencil keyframes, using some nasty copy/pasting of code, as explained
[on devtalk](https://devtalk.blender.org/t/gpencil-layers-integration-in-main-dopesheet-selection-issue/24527).
It works, but may be improved, providing some deeper changes.
Reviewed By: mendio, pepeland, sybren
Maniphest Tasks: T97477
Differential Revision: https://developer.blender.org/D15003
|
|
A regression since 113b8030ced9: circle selection operators does not
define properties like deselect_all and a special name callback is to
be used for those.
This is what was already done for circle select in the 3D viewport.
Some other spaces were using the generic pick operator for the circle
selection which causes error prints in the console.
|
|
Assign get_name functions for select picking and circle select
so modifier keys show the result of holding the modifiers.
|
|
This avoids transform jumping which is a problem when tweaking values a
small amount. A fix for T40549 was made box-select used the location
when the key was pressed.
While it's important for box-select or any operator where it's expected
the drag-start location is used, this is only needed in some cases.
Since the event stores the click location and the current location,
no longer overwrite the events real location. Operators that depend on
using the drag-start can use this location if they need.
In some cases the region relative cursor location (Event.mval) now needs
to be calculated based on the click location.
- Added `WM_event_drag_start_mval` for convenient access to the region
relative drag-start location (for drag events).
- Added `WM_event_drag_start_xy` for window relative coordinates.
- Added Python property Event.mouse_prev_click_x/y
Resolves T93599.
Reviewed By: Severin
Ref D14213
|
|
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
- Bend (Transform).
- Extrude to Cursor.
- Lasso Select (related operators such as node-cut links, mask.. etc).
- Rip Mesh / UV's.
- Vertex/Edge Slide.
|
|
Change data structure of keylists. Reducing the balancing overhead and therefore increases performance.
| **Function** | **Master** | **Patch** |
|`draw_summary_channel`| 0.202105s| 0.083874s |
When adding items to the keylist it will store it in a linked list. This linked list is
accompanied with the length (key_len) and a `last_accessed_column`. last_accessed_column is a cursor
that improve the performance when adding new items as they are mostly ordered by frame numbers.
last_accessed_column is reset when a new fcurve/mask/... is added to the keylist.
Before searching or array access. the listbase needs to be converted to an array.
`ED_keylist_prepare_for_direct_access`. After that the caller can use
`ED_keylist_find_*` or `ED_keylist_array*` functions.
The internal array can also be accessed via the `ED_keylist_listbase` function.
The items inside the array link to the previous/next item in the list.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D12052
|
|
|
|
For T78995 we want to change the data structure of keylists to
improve performance. (Probably a Vector with bin-search capabilities).
This patch hides the internal structure of the keylists behind `AnimKeylist`
structure. This allows us to change the internals without 'breaking' where it is
being used.
The change adds functions to create, free, find and walk over the
keylist.
Reviewed By: sybren
Maniphest Tasks: T78995
Differential Revision: https://developer.blender.org/D11974
|
|
|
|
The keylist functions are used in other places for none drawing related
stuff. Fe pose_slide uses it.
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
|
|
Approximately 33 changes of capitalization to conform to MLA title style.
Differential Revision: https://developer.blender.org/D9796
Reviewed by Julian Eisel
|
|
Split up `ANIM_deselect_anim_channels()` into
`ANIM_anim_channels_select_set()` and
`ANIM_anim_channels_select_toggle()`.
`ANIM_anim_channels_select_set()` is equivalent to the old
`ANIM_deselect_anim_channels(..., false, ACHANNEL_SETFLAG_xxx)`.
`ANIM_anim_channels_select_toggle()` is equivalent to the old
`ANIM_deselect_anim_channels(..., true, ACHANNEL_SETFLAG_ADD)`.
`ANIM_deselect_anim_channels(..., true, ACHANNEL_SETFLAG_CLEAR)` was
also called once. The `true` parameter suggested the "toggle" behaviour
was intended, but the `ACHANNEL_SETFLAG_CLEAR` argument prevented any
toggling. This is now replaced with `ANIM_anim_channels_select_set(ac,
ACHANNEL_SETFLAG_CLEAR)` to make this explicit.
No functional changes, just a cleanup in order to better understand how
the selection works.
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
|
|
- 'coords' is an abbreviation for coordinates, not 'cords'.
- Rename 'moves' to 'coords_len'.
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
|
|
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.
Also, a huge code cleanup has been done at all levels.
Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.
Differential Revision: https://developer.blender.org/D6293
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
Clicking and dragging (aka tweaking) an unselected item should select
it, deselect others and translate. After rB395dfff103e1, it would not
deselect others anymore.
|
|
This wouldn't only behave glitchy, but break certain copy-paste
workflows. See T70457 for details.
Addresses T70457
|
|
Part of T57918. Selecting and dragging items were conflicting actions
previously when both were using the same mouse button. This avoids the
conflict.
See 056fcdfe7bbed3 for details on behavior.
|
|
in Dopesheet
Differential Revision: https://developer.blender.org/D5868
|
|
The Dopesheet was unlocked all layers because it was using the same logic used in UI panel, but this was wrong.
|
|
When select a layer in Dopesheet, the autolock layer was not working.
Now the Dopesheet code calls the function for autolock. Also some code cleanup to move the logic to new function.
|
|
Now, when clicking in the keys area, the layer is synchronized, not only in the left area with the names. This is one of the most requested feature by artists.
Also, removed some old comments.
Reviewers: brecht, angavrilov
Reviewed By: brecht
Subscribers: pepeland, mendio
Differential Revision: https://developer.blender.org/D5627
|
|
|
|
|
|
This includes refactoring of the `mouse_action_keys` to
make it easier to just detect if there is a key under
the mouse. The refactoring mostly consists of extracting
methods and reducing vertical scope of variables.
Reviewers: billreynish, brecht
Differential Revision: https://developer.blender.org/D5024
|
|
The issue is that generic ANIM_animchannel_keyframes_loop can't
handle non-FCurve keyframes, so every selection operator does
its own looping over special key types, and the box and region
select operators didn't have code to deal with the summary.
This adds code to handle that in a similar way to other ops.
|
|
The main reason for this change is to allow setting the
active frame with the left mouse button, while still being
able to select e.g. keyframes with the same mouse button.
The solution is to introduce a new scrubbing region with
a specialized keymap. There are a couple of related todos,
that will be handled in separate commits.
Those are listed in D4654.
This solves T63193.
Differential Revision: https://developer.blender.org/D4654
Reviewers: brecht, billreynish
|
|
At first you could think that this refactor would not be
necessary, because `ACHANNEL_FIRST` exists already.
It contained the small y offset that all channels had.
Unfortunately, a lot of code assumed that
`ACHANNEL_FIRST = -ACHANNEL_HEIGHT`, making the
define pretty much useless. This refactor fixes that
for the action and nla editor.
As a nice side effect, this patch fixes channel box select.
Before there was always have a half-channel offset.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4783
|
|
Prepare for enabling ReflowComments.
|
|
Should be last part of T63995.
|
|
|
|
Also removed annoying console error when clicking outside of valid range
of channels, that is no error at all. ;)
Part of T63995.
|
|
|
|
|
|
|