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.
In Blender 2.81 we update and draw all nodes inside the view planes.
When navigating with a pen tablet after an operation that tags the whole
mesh to update (like undo or inverting the mask), this introduces some
lag as nodes are updating when they enter the view. The viewport is not
fully responsive again until all nodes have entered the view after the
operation.
This commit delays nodes updates until the view navigation stops, so the
viewport navigation is always fully responsive. This introduces some
artifacts while navigating, so it can be disabled if you don't want to
see them.
I'm storing the update planes in the PBVH. This way I can add support
for some tools to update in real-time only the nodes inside this plane
while running the operator, like the mesh filter.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D6269
All DirectX management happens on Ghost level now, higher level code can
just assume everything is OpenGL (except of the upside-down drawing that
still needs to be done for DirectX). This is similar to how the
metal-layer is hidden outside of Ghost.
The Ghost-XR graphics binding for DirectX is responsible for managing
the DirectX compatibility now.