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-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-03Cleanup: Editors, 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` module. No functional changes.
2020-06-29GPencil: Cleanup - Rename some functions from gp_ to gpencil_Antonio Vazquez
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-22Refactoring: View2DScrollers memory allocationJeroen Bakker
View2DScrollers used the memory manager to allocate memory. This isn't a problem but in a upcoming change the scrollers will be drawn more often than it used to (See {D8066}). To limit the number of allocations and frees this patch will use the stack for allocation. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D8076
2020-06-19Fix T77997: GPencil insert keyframe on timeline doen't update viewportAntonio Vazquez
The reason was the datablock is changed but it was not tagged for depsgraph refresh. In some cases it could be possible to tag several times the same datablock, but as this is not the case all the times and the number of tags is always very small, it doesn't worth a complex code to keep a memory list of the datablocks to tag.
2020-06-18Cleanup: redundant parenthesisCampbell Barton
2020-06-08Simulations: initial simulation state and cacheJacques Lucke
The current particle state is stored in a `CustomData` instance and the cache is stored in `PointCache`. The current state exists on the copy-on-write copies of the simulation, while the cache only exists in the original data block. This patch implements a temporary trivial particle simulation that does not use the node system yet. It is used for testing and will be replaced soon. `PointCache` still has some limitations that need to be overcome using separate refactorings. For example, we need to be able to store the number of particles in the point cache. Also we need to change which attributes are stored for a particle system more dynamically than is currently possible afaik. Reviewers: brecht Differential Revision: https://developer.blender.org/D7836
2020-06-05Code Cleanup: fcurve function namingJeroen Bakker
2020-06-01UI: use term current frame instead of playheadCampbell Barton
Avoid mixing different terminologies up, current frame is used in a majority of Blender.
2020-05-12UI: Rename 'View All' operator to 'Frame All'Pablo Vazquez
This change was done time ago but it was still missing in some operators.
2020-05-09Cleanup: doxy commentsCampbell Barton
2020-05-09Cleanup: spellingCampbell Barton
2020-05-04Cleanup: rename mcords to mcoordsCampbell Barton
- 'coords' is an abbreviation for coordinates, not 'cords'. - Rename 'moves' to 'coords_len'.
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: 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 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-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-10Fix T65076: Missing EasingType implementation on the DopesheetSybren A. Stüvel
EasingType was implemented rBdaccaa713b6e for the GraphEditor (but never made it to the Dopesheet). If you can select Easing Mode in the DopeSheet, then you should also be able to select the associated Easing Type. Thanks @lichtwerk for the initial implementation. Maniphest Tasks: T65076 Differential Revision: https://developer.blender.org/D6094
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
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
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
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.
2020-03-06Cleanup: keyframing return argumentsCampbell Barton
- Use 'int' for counters instead of short. - Use 'bool' instead of a counter when only a change is being detected. - Use typed enum for keying set flags. - Include in comments when a negate error code may be returned.
2020-03-05Cleanup: redundant castsCampbell Barton
2020-03-04UI: rename View Selected" to "Frame Selected"Asad-ullah Khan
Addresses T74331
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
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.
2020-02-06Fix (unreported) timeline missing refresh on VSE selection changePhilipp Oeser
Keyframes and channels were not updating immediately (you had to enter channel and main regions with the mouse to force a redraw). Differential Revision: https://developer.blender.org/D6762
2020-02-03Fix: Broken tweak select-transform in DopesheetJulian Eisel
Clicking and dragging (aka tweaking) an unselected item should select it, deselect others and translate. After rB395dfff103e1, it would not deselect others anymore.
2020-01-29Dopesheet: Avoid deselect-all triggering on every box-selectJulian Eisel
This wouldn't only behave glitchy, but break certain copy-paste workflows. See T70457 for details. Addresses T70457
2020-01-23Fix T51011: bpy.ops.action.new does nothing when invoked from scriptmano-wii
The operator always expect to be called form a button. But this is not always the case. This does not bring functional changes when not called from python.
2020-01-23UI: Rename 'View Frame' to 'Go to Current Frame'William Reynish
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
2019-11-30UI: allow to hide markers region per editorAlessio Monti di Sopra
Instead of having the option to show marker lines, make the marker region optional. - Added a Show Markers entry in the View menu of the animation editors. - If the markers region is not active then the Marker menu gets hidden. - Removed marker menu from the driver editor and don't allow to use marker operators.
2019-11-18WM: remove view operators from the undo stackAlessio Monti di Sopra
2019-10-04UI: Move all Selected Dopesheet Keys when DraggingJulian Eisel
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.
2019-09-23Fix T70143: GPencil Multiframe selection is not updated when use Box select ↵Antonio Vazquez
in Dopesheet Differential Revision: https://developer.blender.org/D5868
2019-09-20UI: Fix CapitalizationYevgeny Makarov
Differential Revision: https://developer.blender.org/D5716
2019-09-07Fix T69597: Changing Grease Pencil Layer in Dopesheet unlocks all layersAntonio Vazquez
The Dopesheet was unlocked all layers because it was using the same logic used in UI panel, but this was wrong.
2019-09-03GPencil: Fix unreported autolock layers using DopesheetAntonio Vazquez
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.
2019-08-30GPencil: Set active layer when click in Dopesheet keyframe areaAntonio Vazquez
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
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-23RNA: Cleanup PointerRNA structJacques Lucke
The old layout of `PointerRNA` was confusing for historic reasons: ``` typedef struct PointerRNA { struct { void *data; } id; struct StructRNA *type; void *data; } PointerRNA; ``` This patch updates it to: ``` typedef struct PointerRNA { struct ID *owner_id; struct StructRNA *type; void *data; } PointerRNA; ``` Throughout the code base `id.data` was replaced with `owner_id`. Furthermore, many explicit pointer type casts were added which were implicit before. Some type casts to `ID *` were removed. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D5558
2019-08-21Timeline: refactor cache drawingJacques Lucke
I did this mostly to get to know the point cache from this direction. This should not change anything from the user perspective.
2019-07-31Animation: Remove depsgraph argument from a lot of APISergey Sharybin
Use explicit boolean flag to indicate whether flush to original data is needed or not. Makes it possible to avoid confusion on whether an evaluated or any depsgraph can be passed to the API. Allows to remove depsgraph from bAnimContext as well. Reviewers: brecht Differential Revision: https://developer.blender.org/D5379
2019-07-29Fix T67863: Crash pressing Ctrl +/- in gpencil action editorCampbell Barton
2019-06-12Cleanup: spelling in commentsCampbell Barton
2019-06-05Dopesheet: drag to box select in dopesheetJacques Lucke
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
2019-06-04Cleanup: rename 2D scroll definesCampbell Barton
- Use `V2D_SCROLL_` prefix. - Use more descriptive names.
2019-05-29Fix T64995: box and circle select summary in Grease Pencil dopesheet.Alexander Gavrilov
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.
2019-05-28Cleanup: use time scrub instead of scrubbingCampbell Barton
Renaming was only done to ED_time_scrub_ui.h, function names and struct members used term 'scrubbing' which is ambiguous.
2019-05-20Cleanup: reorder report argument for pointer assignmentCampbell Barton
Most code uses ReportList argument last (or at least not first) when an optional report list can be passed in.