Splits up wm_xr.c into multiple files in their own folder:
source/blender/windowmanager/xr. So this matches how the message bus and
gizmo code have their own folder and files.
This allows better structuring and should make the code scale better.
I rather do this early on than to wait until we end up with a single,
huge file.
Also improves a bit how data is prepared and updated for drawing.
- Adds select menu
- Removes undo/redo controls
- Adds delete menu
- Refactor
- Combines font and text menu
The goal is to match other edit menus better and match the text editor.
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
The 'name' parameter of `BKE_idtype_idcode_from_name()`, and the `str`
parameter of `idtype_get_info_from_name()`, are expected to be the
'user visible name' of an `IDTypeInfo` struct. This is made clearer in
the code by renaming those parameters to `idtype_name` and mentioning
it in the documentation of the `BKE_idtype_idcode_from_name()`
function.
Differential Revision: https://developer.blender.org/D7317
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData
API" section. The code in that section has now been split off, and
placed into `BKE_anim_data.h` and `anim_data.c`.
All files that used to include `BKE_animsys.h` have been adjusted to
only include the animation headers they need (sometimes none).
No functional changes.
The island `axismtx` is only necessary in some transform modes.
In the case of `Shrink/Fatten`, the calculated `axismtx` brings an
undesirable result.
This commit rearrange the struct `TransIslandData` in order to
calculate and reference only the arrays that will be used for each
transform mode.
Differential Revision: https://developer.blender.org/D7305
There is no guarantee that depsgraph is ran between two undo steps, so
when re-using an existing data-block we should never wipe completly its
recalc flags, but instead complement them with new ones from accumulated
'storage' as needed.
It should be possible to `#include` any header without having to worry
about its dependencies.
I didn't go and check all include files for this, just the ones that caused
me errors while I was refactoring the `anim_sys.c` file.
No functional changes.
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 files are now split up into the following sections:
- `BKE_anim_path.h` and `anim_path.c` for path/curve functions.
- `BKE_anim_visualization.h` and `anim_visualizationanim_path.c` for
animation visualization (mostly motion paths).
- `BKE_duplilist.h` for DupliList function declarations. These were
already implemented in `object_dupli.c`, so they were rather out of
place being declared in `BKE_anim.h` in the first place.
No functional changes.
My compiler (GCC 7.5.0) was warning about these variables potentially not
being initialised. Since the function is highly complex, instead of
analysing it I just trust my compiler and added initial values.
This should be no functional change.
This was only reported for the 'Change Active Layer' operator [which was
not setting the channel as selected in the dopesheet], but this is also
the case elsewhere [where BKE_gpencil_layer_active_set is used], namely:
- gp_layer_remove_exec
- gp_layer_copy_exec
- gp_merge_layer_exec
- gp_layer_change_exec
- gp_layer_active_exec
- gp_stroke_separate_exec
We could set GP_LAYER_SELECT "by hand" in
BKE_gpencil_layer_active_set(), but there is already
animchan_sync_gplayer() that does that. For this, we need the
NA_SELECTED notifier though.
Maniphest Tasks: T75250
Differential Revision: https://developer.blender.org/D7311
There was one function to access both pose/edit bones,
which returned a void pointer type.
Split these into 3 functions which return EditBone, bPoseChannel or Bone
types.
Internally the logic is still shared, this just makes it clearer to
callers which type is expected.
Also use more conventional prefix for picking API:
- ED_armature_pick_(ebone/pchan/bone)
- ED_armature_pick_(ebone/pchan/bone)_from_selectbuffer
This reverts commit ee0d91df5dd75029de6886db13e45af3d4c7ef7c. This is
modifying scene data on write, which causes crashes. It can only do that
on a copy of the data.