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-11-23Cleanup: Animation, split `graph_edit.c` into separate filesChristoph Lendenfeld
Split some of the code of `graph_edit.c` into: * `graph_view.c`: preview range, view all, view selected etc. * `graph_slider_ops.c`: the decimate modal operator code. The latter file will be extended later with more slider-based operators. Maniphest Tasks: T81785 Reviewed By: sybren Differential Revision: https://developer.blender.org/D9312
2020-11-23Animation: New Euler filter implementationSybren A. Stüvel
This new discontinuity filter performs actions on the entire Euler rotation, rather than only on the individual X/Y/Z channels. This makes it fix a wider range of discontinuities, for example those in T52744. The filter now runs twice on the selected channels, in this order: - New: Convert X+Y+Z rotation to matrix, then back to Euler angles. - Old: Add/remove factors of 360° to minimize jumps. The messaging is streamlined; it now reports how many channels were filtered, and only warns (instead of errors) when there was an actual problem with the selected channels (like selecting three or more channels, but without X/Y/Z triplet). A new kernel function `BKE_fcurve_keyframe_move_value_with_handles()` is introduced, to make it possible to move a keyframe's value and move its handles at the same time. Manifest Task: T52744 Reviewed By: looch Differential Revision: https://developer.blender.org/D9602
2020-11-19Cleanup: Animation, fix uninitialised variable in Euler filter codeSybren A. Stüvel
No functional changes.
2020-11-19Cleanup: Animation, refactor Euler filterSybren A. Stüvel
Split up the Euler filter function into two more functions. The Euler filter operator works in two stages (find channels that define the X/Y/Z Euler rotations, and perform filtering on those channels), and each stage now has its own function. This makes it clearer which data are used in which part of the code, and makes future improvements easier. No functional changes.
2020-11-06Cleanup: follow our code style for float literalsCampbell Barton
2020-11-03Fix paste f-curve modifiers default "Only Active" valueSebastian Parborg
The tooltip implies that this option should be off per default instead of on. Some talking with the animators at the studio and in the animation module confirmed that this seems to be the most logical default.
2020-11-03Fix C operators can't set default display or sort type for File BrowserJulian Eisel
`WM_operator_properties_filesel()` allows C operators to set a display or sort type for the File Browser to use. But the File Browser would always override that because of an invalid `_is_set()` check. (The operators don't actually set the value, they only set the property's default value.) The only operator affected by this is "Recover Auto Save". It is supposed to show a vertical list ordered chronologically. It used settings from the previous File Browser usage before this patch. Operators using the File Browser should generally use `FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not to. See comments at their definition. ---- This makes it so operators that set a different display or sort type don't change the sort or display type for the next File Browser operation. So using "Recover Auto Save" entirely isolates display and sort type from other operations. Differential Revision: https://developer.blender.org/D8598 Reviewed by: Bastien Montagne
2020-10-29Merge branch 'blender-v2.91-release'Campbell Barton
2020-10-28Animation: Improve labels on Snap menu in NLA & DopesheetAaron Carlisle
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
2020-10-28Add a Un-Bake FCurves operatorSebastian Parborg
We already had the ability to bake fcurves but no way to convert the baked result back without using python. This patch adds and operator that is available now next to the bake operator in the drop down menu, Reviewed By: Sybren Differential Revision: http://developer.blender.org/D6379
2020-10-20Cleanup: General comment style clean up of graph_edit.c and fcurve.cSebastian Parborg
No functional changes. Reviewed By: Sybren A. Stüvel Differential Revision: http://developer.blender.org/D7850
2020-10-16Animation: Snap Cursor Value operatorSybren A. Stüvel
Add operator to snap the 2D Cursor value to selected keyframes. This is doing almost the same as the "Cursor to Selected" operator, except that it doesn't affect the current frame, just the Y-coordinate (the value) of the 2D cursor. The "snap cursor" operators are added to the Key → Snap menu and to the Snap pie menu. This means that these menus are now extended in meaning, to not only mean "snap the selected keyframes to the cursor", but also for some options "snap the cursor to selected keyframes". This fixes T76596.
2020-10-16Cleanup: Animation, split up frame jump operatorSybren A. Stüvel
Split up `GRAPH_OT_frame_jump` exec function and added some local variables to give names to the cryptic `ked.f1`, `ked.f2`, and `ked.i1`. No functional changes.
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-09-30Cleanup: convert gforge task ID's to phabricator formatValentin
Cleanup old tracker task format to the new. e.g: [#34039] to T34039 Ref D8718
2020-09-25Cleanup: SpaceGraph ED code: use boolean litterals when needed.Bastien Montagne
2020-08-01Cleanup: spelling (initialized)Campbell 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-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-05Code Cleanup: fcurve function namingJeroen Bakker
2020-06-05CleanUp: Introduce BKE_fcurve_createJeroen 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-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-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-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-01-25Cleanup: spellingCampbell Barton
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
2020-01-21Fix T68677: Graph Editor zoom to selected ignores scrollbar occlusionAurel Wildfellner
Reviewed by: Sybren Stüvel, Julian Eisel Differential Revision: https://developer.blender.org/D6309
2020-01-10Cleanup: ARegion.sizex/y should not be used to access region sizeJulian Eisel
This should only be used to change and recalculate region sizes in a DPI independent way. To get the size with DPI applied, ARegion.winx/y should be used instead. Added note on this in comment.
2019-12-17Fix unreported: Crash when confirms GRAPH_OT_decimatemano-wii
`dgo` is MEM_freed just before.
2019-12-06Fix crash when trying to decimate baked fcurve channelsSebastian Parborg
No curve data was available for the modal decimate operator. Added a check for when the curve has baked data.
2019-12-04Make curve decimation only take into account the selected curve pointsSebastian Parborg
Previously the decimation would take the whole curve into account when decimating and not just the selected part. This also contains various smaller bug fixes for the fcurve decimation. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D6286
2019-11-21Fix T67873: View Selected in Graph Editor (Only Selected CurvePhilipp Oeser
Keyframes) takes hidden keys into account when calculating zoom Note that with the 'View Only Selected Curve Keyframes' option enabled, it is also possible to select [box/circle/lasso] hidden/non-visible keyframes. Think this should never happen, but that is for a later commit (along some deduplication of animdata filtering code) Reviewed By: Severin, Sybren Maniphest Tasks: T67873 Differential Revision: https://developer.blender.org/D6237
2019-11-21Add curve decimate in the graph editorSebastian Parborg
Added a animation curve decimate operator in the graph editor Reviewed By: Sybren Differential Revision: http://developer.blender.org/D4841
2019-11-18WM: remove view operators from the undo stackAlessio Monti di Sopra
2019-11-08UI: Graph Editor Insert Keyframes MenuHarley Acheson
Fixes alignment issues on Graph Editor menus used to insert keyframes. Differential Revision: https://developer.blender.org/D6213 Reviewed by Campbell Barton
2019-09-20UI: Fix CapitalizationYevgeny Makarov
Differential Revision: https://developer.blender.org/D5716
2019-09-03UI: File Browser Design OverhaulJulian Eisel
This is a general redesign of the File Browser GUI and interaction methods. For screenshots, check patch D5601. Main changes in short: * File Browser as floating window * New layout of regions * Popovers for view and filter options * Vertical list view with interactive column header * New and updated icons * Keymap consistency fixes * Many tweaks and fixes to the drawing of views ---- General: * The file browser now opens as temporary floating window. It closes on Esc. The header is hidden then. * When the file browser is opened as regular editor, the header remains visible. * All file browser regions are now defined in Python (the button layout). * Adjusted related operator UI names. Keymap: Keymap is now consistent with other list-based views in Blender, such as the Outliner. * Left click to select, double-click to open * Right-click context menus * Shift-click to fill selection * Ctrl-click to extend selection Operator options: These previously overlapped with the source list, which caused numerous issues with resizing and presenting many settings in a small panel area. It was also generally inconsistent with Blender. * Moved to new sidebar, which can easily be shown or hidden using a prominent Options toggle. * IO operators have new layouts to match this new sidebar, using sub-panels. This will have to be committed separately (Add-on repository). * If operators want to show the options by default, they have the option to do so (see `WM_FILESEL_SHOW_PROPS`, `hide_props_region`), otherwise they are hidden by default. General Layout: The layout has been changed to be simpler, more standard, and fits better in with Blender 2.8. * More conventional layout (file path at top, file name at the bottom, execute/cancel buttons in bottom right). * Use of popovers to group controls, and allow for more descriptive naming. * Search box is always live now, just like Outliner. Views: * Date Modified column combines both date and time, also uses user friendly strings for recent dates (i.e. "Yesterday", "Today"). * Details columns (file size, modification date/time) are now toggleable for all display types, they are not hardcoded per display type. * File sizes now show as B, KB, MB, ... rather than B, KiB, MiB, … They are now also calculated using base 10 of course. * Option to sort in inverse order. Vertical List View: * This view now used a much simpler single vertical list with columns for information. * Users can click on the headers of these columns to order by that category, and click again to reverse the ordering. Icons: * Updated icons by Jendrzych, with better centering. * Files and folders have new icons in Icon view. * Both files and folders have reworked superimposed icons that show users the file/folder type. * 3D file documents correctly use the 3d file icon, which was unused previously. * Workspaces now show their icon on Link/Append - also when listed in the Outliner. Minor Python-API breakage: * `bpy.types.FileSelectParams.display_type`: `LIST_SHORT` and `LIST_LONG` are replaced by `LIST_VERTICAL` and `LIST_HORIZONTAL`. Removes the feature where directories would automatically be created if they are entered into the file path text button, but don't exist. We were not sure if users use it enough to keep it. We can definitely bring it back. ---- //Combined effort by @billreynish, @harley, @jendrzych, my university colleague Brian Meisenheimer and myself.// Differential Revision: https://developer.blender.org/D5601 Reviewers: Brecht, Bastien
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-06-16Drivers: fix Variable Copy & Paste in the edit popover.Alexander Gavrilov
Without these buttons the functionality of the popover is incomplete compared to the Graph Editor panel. To support this the operators have to read the active F-Curve from the context, instead of directly scanning animation data. Expanding the context would also help Python operators.
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-21Cleanup: use term pad instead of paddingCampbell Barton
- Use min/max instead of bottom/top (in keeping with the rest of the BLI_rect API). - Swap args (was passing in max, min).
2019-05-21Graph Editor: view-selected takes scrubbing and marker region into accountJacques Lucke
2019-05-16Fix T64681: evaluate curves with generative modifiers and no keys.Alexander Gavrilov
Introduce a new function and use it everywhere, including automatic curve deletion checks to guarantee consistency.