Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-21Cleanup: spellingCampbell Barton
2020-07-20T77086 Animation: Passing Dependency Graph to DriversSybren A. Stüvel
Custom driver functions need access to the dependency graph that is triggering the evaluation of the driver. This patch passes the dependency graph pointer through all the animation-related calls. Instead of passing the evaluation time to functions, the code now passes an `AnimationEvalContext` pointer: ``` typedef struct AnimationEvalContext { struct Depsgraph *const depsgraph; const float eval_time; } AnimationEvalContext; ``` These structs are read-only, meaning that the code cannot change the evaluation time. Note that the `depsgraph` pointer itself is const, but it points to a non-const depsgraph. FCurves and Drivers can be evaluated at a different time than the current scene time, for example when evaluating NLA strips. This means that, even though the current time is stored in the dependency graph, we need an explicit evaluation time. There are two functions that allow creation of `AnimationEvalContext` objects: - `BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float eval_time)`, which creates a new context object from scratch, and - `BKE_animsys_eval_context_construct_at(AnimationEvalContext *anim_eval_context, float eval_time)`, which can be used to create a `AnimationEvalContext` with the same depsgraph, but at a different time. This makes it possible to later add fields without changing any of the code that just want to change the eval time. This also provides a fix for T75553, although it does require a change to the custom driver function. The driver should call `custom_function(depsgraph)`, and the function should use that depsgraph instead of information from `bpy.context`. Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D8047
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-03Clang-tidy: Enable braces-around-statements warningSebastian Parborg
2020-07-03Cleanup: Editors/Animation, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors/animation` module. No functional changes.
2020-06-27Docs: correct invalid doxygen params & referencesCampbell Barton
2020-06-26Fix for T78191: Timeline lines changing thicknessHarley Acheson
Fixes issue where lines in timeline are sometimes double-width when hovering in area. Differential Revision: https://developer.blender.org/D8116 Reviewed by Brecht Van Lommel
2020-06-23Performance: Draw play head as an overlayJeroen Bakker
When playing back animations a playhead is updated in all the animation editors. The drawing of the playhead is part of the drawing of the main region `RGN_TYPE_WINDOW` that redraws the whole region. This change will draw the play head and window scrollers when updating the screen. This affects the Action editor, Timeline, Graph editor, NLA editor and Sequence editor. There is noticeable speedup when using complex animation files. Spring 02_020_A.anim.blend fps went from 11.8 to 12.5 when showing a timeline and a action editor on a Ryzen 1700. * When playing back animation the markers don't jump up/down when near the frame. This could be added back. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D8066
2020-06-15Fix T77116: Current frame indicator text color hardcodedHans Goudey
Draw the text with the "header text highlight" theme color, which is rarely used, making it a good candidate for this special case. Differential Revision: https://developer.blender.org/D7897
2020-06-05Code Cleanup: fcurve function namingJeroen Bakker
2020-06-05CleanUp: Introduce BKE_fcurve_createJeroen Bakker
2020-06-05GPencil: Channel Lock tooltipAntonio Vazquez
After talking with UI team, we decided to change the tooltip.
2020-06-04GPencil: Fix Lock Frame Dopesheet tooltipAntonio Vazquez
The old tooltip was not clear enough
2020-06-03Object: refactor mode switchingCampbell Barton
Functionality here has become confusing over time, this removes duplicate, similar functions, preferring to set the mode instead of toggle, enter, exit. Mode switching utility function behaved differently regarding undo, 'ED_object_mode_toggle' for example didn't skip the undo push where 'ED_object_mode_set' did. Some callers chose these functions based on the intended undo behavior, even when toggling didn't make sense. There was also ED_object_mode_generic_enter which was similar to ED_object_mode_set, instead of the reverse of ED_object_mode_generic_exit. Simplify object mode switching internals: - Replace ED_object_mode_generic_enter with ED_object_mode_set. - Remove ED_object_mode_toggle as nearly all callers needed to check the current mode so toggling would set the mode argument correctly. - Use ED_object_mode_set for the object mode switching operator to simplify logic. - Add ED_object_mode_set_ex which has an argument to disable undo, needed when loading undo data needs to set the mode. - Remove unused ED_object_mode_exit.
2020-06-02Cleanup: Remove Obsolete Current Frame Indicator Drawing CodeHans Goudey
This code was made obsolete by the changes to the animation editor scrubbing areas in D4654. Differential Revision: https://developer.blender.org/D7898
2020-05-15Merge branch 'blender-v2.83-release'Philipp Oeser
2020-05-15Fix T76734: Changing Envelope FModifier controlpoints missing updatePhilipp Oeser
Issue is that update functions defined in `rna_def_fmodifier_envelope_ctrl` (namely `rna_FModifier_update`) are actually never called. This is because UI code for FCurve modifiers often does not use RNA buttons but uses custom update functions (or non at all). For example, rB9a88bd55903a did this for the generators, envelope control points did not have this at all. This is now changed to use RNA buttons for the envelope control points, this could done for other non-RNA buttons as well to get rid of 'validate_fmodifier_cb()'. Maniphest Tasks: T76734 Differential Revision: https://developer.blender.org/D7732
2020-05-12UI/Animation: Don't change Graph Editor cursor from scrubbing regionJulian Eisel
Do not execute the operator to change the Graph Editor cursor when changing the active frame through the scrubbing region. This is not what users expect, see T76599. Removes an explicit exception to not let the regular frame change operator execute in the Graph Editor. It was needed to let the cursor operator run instead, but the interplay between the two operators is now handled at keymap level. Fixes T76599.
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-05-04Cleanup: rename mcords to mcoordsCampbell Barton
- 'coords' is an abbreviation for coordinates, not 'cords'. - Rename 'moves' to 'coords_len'.
2020-05-01Cleanup: moved drivers to BKE_fcurve_driver.h / fcurve_driver.cSybren A. Stüvel
All the driver-specific code in `fcurve.c` has been moved into a new file `fcurve_driver.c`. The corresponding declarations have been moved from `BKE_fcurve.h` to `BKE_fcurve_driver.h`. All the `#include "BKE_fcurve.h"` statements have been investigated and replaced with `BKE_fcurve_driver.h` where necessary. No functional changes.
2020-04-27Merge branch 'blender-v2.83-release'Philipp Oeser
2020-04-27Fix T75519: Graph editor tooltips give false impression of the toggle stateyves
It is just a quick fix for the tooltips in the graph editor, it replaces: - "F-curve modifiers are disabled" with "Enable F-Curve modifiers" - "F-curve is visible in graph editor for editing" with "F-Curve visibility in Graph Editor". Reviewed By: billreynish Maniphest Tasks: T75519 Differential Revision: https://developer.blender.org/D7387
2020-04-21Merge remote-tracking branch 'origin/blender-v2.83-release'Sybren A. Stüvel
2020-04-21Fix T75472 Crash on "Remove Empty Animation Data" in NLA editorSybren A. Stüvel
The `ANIMFILTER_NODUPLIS` option, to prevent duplicates in the list of animation data to be freed, was missing. This caused a use-after-free.
2020-04-20Simulations: Add new simulation data blockJacques Lucke
This data block will be the container for simulation node trees. It will be used for the new particle node system (T73324). The new data block has the type `ID_SIM`. It is not visible to users and other developers by default yet. To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`. New simulation data blocks can be created by running `bpy.data.simulations.new("name")`. Reviewers: brecht Differential Revision: https://developer.blender.org/D7225
2020-04-13Fix T75676: Inconsistent "Only selected" GP layers in Dope SheetAntonio Vazquez
The selection was not checking all modes.
2020-04-09Cleanup: Remove unused varAntonio Vazquez
This was not removed in previous fix.
2020-04-09Cleanup: unused variableCampbell Barton
2020-04-09Fix T75122: Annotations: Only visible scene annotations in dopesheetAntonio Vazquez
The loop of datablocks was using the scene datablock (3D View) only, but all others datablocks were ignored. Now the loop consider any annotation datablock.
2020-04-06VSE: don't allow strip preview when clicking on the scrubbing regionRichard Antalik
Don't set 'special preview' or Solo mode if scrubbing in scrubbing region. Author: a.monti Reviewed By: Severin Differential Revision: https://developer.blender.org/D7234
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
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
2020-04-03Cleanup: Including "BLI_listbase.h" for LISTBASE_FOREACH macroDalai Felinto
These headers are not needed right away, but will be in the upcoming commit.
2020-04-03Cleanup: Rename ExtensionRNA variables from ext to rna_extJulian Eisel
Makes it more clear that code using this is related to the RNA integration of a type. Part of T74432. Also ran clang-format on affected files.
2020-04-03Cleanup: Animation, move AnimData API to `anim_data.c`/`BKE_anim_data.h`Sybren A. Stüvel
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.
2020-04-03Cleanup: Rename bScreen variables from sc/scr to screenJulian Eisel
Part of T74432. Mostly a careful batch rename but had to do few smaller fixes. Also ran clang-format on affected files.
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
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.
2020-04-03Cleanup: use abbreviated names for unsigned types in editorsCampbell Barton
2020-03-27Fix T74927: Slow playback using Auto NormalizationPhilipp Oeser
Caused by rBedb3b7a323a1. Using evaluate_fcurve_only_curve actually causes quite a bit of slowdown [6x] compared to bezier forward differencing [which was used prior to rBedb3b7a323a1]. But full fcurve evaluation is desired with Dynamic Interpolation Effects [Back/Elastic] since their min/max will not be captured with forward differencing. So now gain back speed [using bezier forward differencing] and only do the full fcurve evaluation for dynamic interpolation effects. Maniphest Tasks: T74927 Differential Revision: https://developer.blender.org/D7196
2020-03-26Fix crashes from various missing checks in operator poll functionsCampbell Barton
Issues exposed by 'bl_run_operators.py' utility.
2020-03-25Cleanup: use 'r_' prefix for output argumentsCampbell Barton
Also pass some args as 'const'.
2020-03-22Cleanup: spelling, correct Mesh.mface docsCampbell Barton
2020-03-19Fix UI alignment in generator f-curve modifier.Yevgeny Makarov
Differential Revision: https://developer.blender.org/D7167
2020-03-19Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.Bastien Montagne
Mpving utils from idcode to idtype proved to be somewhat painful for some reasons, but now all looks good. Had to add a fake/empty shell for the special snowflake too, `ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cleanup: Resolve HKEY conflictRay Molenkamp
Both the MS headers and blender headers define the HKEY which gives all kind of inclusion order issues. This diff renames all *KEY constants to EVT_*KEY to resolve this conflict. Reviewed By: brecht , dfelinto Differential Revision: http://developer.blender.org/D7164
2020-03-18GPencil: Remove background to Dopesheet buttonsAntonio Vazquez
This was missing in previous commit.
2020-03-18Objects: add Volume object type, and prototypes for Hair and PointCloudBrecht Van Lommel
Only the volume object is exposed in the user interface. It is based on OpenVDB internally. Drawing and rendering code will follow in another commit. https://wiki.blender.org/wiki/Source/Objects/Volume https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES build option. These are unfinished, and included only to make it easier to cooperate on development in the future and avoid tricky merges. https://wiki.blender.org/wiki/Source/Objects/New_Object_Types Ref T73201, T68981 Differential Revision: https://developer.blender.org/D6945
2020-03-18GPencil: Invert Dopesheet icons to same order than properties panelAntonio Vazquez
2020-03-16Fix T61234 Mirroring Grease Pencil keyframes in the Dopesheet failsSybren A. Stüvel
`ANIM_animdata_update()` did not sort grease pencil frames. A pre-existing comment stated this wouldn't be necessary as `posttrans_gpd_clean()` already does this. However, this is only applicable when the change is performed via the transform system. The mirror operator doesn't call `posttrans_gpd_clean()`, invalidating the assumption in the comment. I moved the sorting code into `BKE_gpencil_layer_frames_sort()`, which is now called from both `ANIM_animdata_update()` and `posttrans_gpd_clean()`.