Age | Commit message (Collapse) | Author |
|
So far it was needed to declare a new RNA struct to `RNA_access.h` manually.
Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property
declarations. Now this also includes the RNA struct declarations, so they don't
have to be added manually anymore.
Differential Revision: https://developer.blender.org/D13862
Reviewed by: brecht, campbellbarton
|
|
Activating a gizmo used the windows eventstate which may have values
newer than the event used to activate the gizmo.
This meant transforms check for the key that activated transform
could be incorrect.
Support passing an event when calling operators to avoid this problem.
|
|
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
|
|
Turn off "Sync Length" when splitting an NLA strip.
The NLA Strip-Action Clip has a setting called "Sync Length" that is on
by default and helps to update the length of the clip to the current
actions keyframes so the strip shows the entire actions stored
animation.
When you split one of these strip-action clips in the NLA to trim it
shorter or to move it somewhere else in the NLA tracks to blend or work
with, the "Sync Length" setting stays checked on. You can have many
strips in the NLA that all look to the same action, if you split one
strip , you now have two strips showing or linked to the same action.
To see or edit keyframes on a strip, you enter tweak mode. When you exit
tweak mode, if "Sync Length" is active on the strip-action clip
settings, the strip length is changed/reset to match the action keys.
When you have many clips, this causes all of them to evaluate and update
no matter where they are in the NLA. This destroys/undoes all the user
work to trim down and place the clips in the NLA.
**Description of the proposed solution:**
This patch/change would turn off, the "Sync Length" setting when the
split tool was used on a strip/action clip to help protect the users
choice to trim and keep the clip that length. It doesn't change the
ability to turn the setting back on or off, it just makes sure that the
user doesn't accidentally or unknowingly loose work.
The same process happens when an action is created that has a "manual
range" set that is different than the length of the actions start-end
keyframes. It makes sense to do the same thing for the split tool.
**Alternative solutions:**
While the user could know this and turn off this setting by hand, it is
easy to forget and or the user might think that it only happened to the
one clip they were editing and not realize it happened to all the
trimmed versions, changing the users choice without the user knowing it
happened.
**Limitations of the proposed solution:**
It only fixes the split tool, if another tool was created and some how
impacted the clip length we would need to have that tool also take the
sync length into account.
Reviewed By: sybren
Maniphest Tasks: T84486
Differential Revision: https://developer.blender.org/D10168
|
|
Ref T92709
|
|
Some operations, e.g. adding a new action strip to NLA, require
knowing the active frame range of an action. However, currently it
can only be deduced by scanning the keyframes of the curves within
it. This is not ideal if e.g. curves are staggered for overlap.
As suggested by Nathan Vegdahl in comments to T54724, this patch adds
Action properties that allow manually specifying its active frame range.
The settings are exposed via a panel in the Dopesheet and Action Editor.
When enabled, the range is highlighted in the background using a striped
fill to distinguish it from the solid filled regular playback range.
When set, the frame range is used when adding or updating NLA tracks,
and by add-ons using `Action.frame_range`, e.g. FBX exporter.
Differential Revision: https://developer.blender.org/D11803
|
|
This is available in the DopeSheet, GraphEditor, and NLA Editor.
Currently:
- Dopesheet advertises to take selection into account...
-- ...but doesnt - which might be a mistake in rBe3842d1ca4dd
- Graph Editor does not mention selection...
-- ...and also does not take it into account
- NLA does not mention selection...
-- ...but takes it into account
Now:
- make them **all** take selection into account (you can still do a
quick 'Select All' prior to get the full range -- better than not being
able to set this based on selection)
- mention this for all in the tooltip
- also reword to 'Set Preview Range to Selected' since using the term
'Auto' impilies this would change on selection change.
Maniphest Tasks: T91743
Differential Revision: https://developer.blender.org/D12651
|
|
Comment was pasted from entering tweakmode.
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
|
|
Remove redundant headers using
`./source/tools/utils_maintenance/code_clean.py`
Reviewed By: jmonteath
Ref D10364
|
|
|
|
Outliner display under 'Animation' > 'NLA Tracks' was not updating in
the following cases:
- adding strips
- removing strips
- duplicating strips (possibly to different track)
- swapping strips
- reordering tracks
- changing strip order by translating
- translating strips between tracks
- renaming tracks
In the case of deleting strips/tracks, this was also resulting in a use-
after-free error in Outliner drawing code (this was reported specifically
in T84586).
Most of these operators already sent a ND_NLA|NA_EDITED notifier, but the
Outliner is not listening to these. Listening to NA_EDITED is also not
what we want since this also happens a lot in cases irrelevant to the
Outliner. Now be a bit more specific and send ND_NLA|NA_ADDED / ND_NLA|
NA_REMOVED or a new ND_NLA_ORDER (to distinguish from NA_EDITED
'only' - where a redraw is not neccessary) and listen to these from the
Outliner.
(note: places that were listening to ND_NLA|NA_EDITED before are also
listening to NA_ADDED or NA_REMOVED, so changing NA_EDITED should not be
a problem here)
(note 2: for cases like swapping tracks/strips order, NA_ADDED or
NA_REMOVED does not make sense, neither can we use NA_EDITED [since we
dont want to listen to this], so in this case an additional ND_NLA_ORDER
is now sent)
(note 3: in nla transform code, this is now always sent on confirm. There
are cases were the notifier would not be needed, but checking exactly all
cases were it actually would be needed seems overkill [history of D10073
has example code to check if strips moved between tracks])
Maniphest Tasks: T84586
Differential Revision: https://developer.blender.org/D10073
|
|
Also makes NLA tracks and strips overridable.
User can either edit existing strips in existing NLA tracks (but not add or remove them), and/or add new NLA tracks after those comming from the linked data.
Most of the work was as usual checking operators and adding protections against illegal operations in override context.
Note that since we can only rely on indices to deal with local added tracks, we forbid any local track being before any linked/original track.
Maniphest Tasks: T72629
Differential Revision: https://developer.blender.org/D9611
|
|
Add "Selection to" as prefix for those menu items that move the selected
keyframes to something, for both the Key → Snap menu and the Shift+S pie
menu.
No functional changes.
This was missed in rB477d983c2e8ab298cbf638d5aadd77fad9c2f677
Differential Revision: https://developer.blender.org/D9304
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Those were only shallow wrappers around `BKE_id_copy`, barely used (even
fully unused in some cases), and we want to get rid of those ID-specific
helpers for the common ID management tasks. Also prevents weird custom
behaviors (like `BKE_object_copy`, who was the only basic ID copy
function to reset user count of the new copy to zero).
Part of 71219.
|
|
Change the way Sync Length works so that it keeps keyframes at the same
key as before the sync. Now when the user exits tweak mode, the overall
NLA result is unchanged.
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D7602
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors` module.
No functional changes.
|
|
Avoid mixing different terminologies up,
current frame is used in a majority of Blender.
|
|
This change was done time ago but it was still missing in some operators.
|
|
|
|
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
|
|
|
|
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.
|
|
Addresses T74331
|
|
Avoid accessing inline since it's often used multiple times.
In some cases it was already defined.
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
In our animation editors, we have a feature called View Frame. Problem is, it is not self evident what this feature does. Does it show frame numbers? Does it show all frames? Does it frame the view? Does it frame the view?
What this does, is it moves the view to where the playhead is. With clearer naming, we can communicate this much more clearly.
This is just a simple patch that changes the name from 'View Frame' -> 'Go to Current Frame'.
Differential Revision: https://developer.blender.org/D6437
|
|
|
|
A lot of areas were querying sound information directly using audio handle
which does not exist on an original sound IDs.
This change basically makes it so it's possible to query information about
given sound ID, without worrying about whether it's loaded or not: if it is
needed to load it first it happens automatically (no automatically-opened
handles are left behind though).
While this seems a bit extreme to open files on such queries it is still
better than the old situation when all sound handles were opened on file
load, no matter if it's needed or not. Besides, none of the changed code
paths are performance critical, just handful of tools.
Fixes T65696: Sequencer fails to create a new sound sequence strip via Python
Fixes T65656: Audio strip - SHIFT K crashes Blender
Reviewers: brecht
Reviewed By: brecht
Subscribers: ISS
Maniphest Tasks: T65696, T65656
Differential Revision: https://developer.blender.org/D5061
|
|
Part of T43295.
|
|
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.
|
|
|
|
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed for clan-format not to wrap onto one line.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
Prevents clang-format wrapping text before comments.
|