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
2022-09-06GPU: remove 'GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR'Germano Cavalcante
The only difference between `GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR` and `GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions.
2022-09-05GPU: remove 'GPU_SHADER_2D_UNIFORM_COLOR'Germano Cavalcante
The only real difference between `GPU_SHADER_2D_UNIFORM_COLOR` and `GPU_SHADER_3D_UNIFORM_COLOR` is that in the vertex shader the 2D version uses `vec4(pos, 0.0, 1.0)` and the 3D version uses `vec4(pos, 1.0)`. But VBOs with 2D attributes work perfectly in shaders that use 3D attributes. Components not specified are filled with components from `vec4(0.0, 0.0, 0.0, 1.0)`. So there is no real benefit to having two different shader versions. This will simplify porting shaders to python as it will not be necessary to use a 3D and a 2D version of the shaders. In python the new name for '2D_UNIFORM_COLOR'' and '3D_UNIFORM_COLOR' is 'UNIFORM_COLOR', but the old names still work for backward compatibility. Differential Revision: https://developer.blender.org/D15836
2022-08-27Cleanup: pass notifiers as constCampbell Barton
2022-08-15GPU: replace GLEW with libepoxyChristian Rauch
With libepoxy we can choose between EGL and GLX at runtime, as well as dynamically open EGL and GLX libraries without linking to them. This will make it possible to build with Wayland, EGL, GLVND support while still running on systems that only have X11, GLX and libGL. It also paves the way for headless rendering through EGL. libepoxy is a new library dependency, and is included in the precompiled libraries. GLEW is no longer a dependency, and WITH_SYSTEM_GLEW was removed. Includes contributions by Brecht Van Lommel, Ray Molenkamp, Campbell Barton and Sergey Sharybin. Ref T76428 Differential Revision: https://developer.blender.org/D15291
2022-07-26default N-panel open for animation editorsNate Rupsis
The Graph, Driver, and Dopesheet's (and sub modes) properties panel (N-Panel) are now open by default. This includes the editors in the default Animation workspace. Note that, because the Timeline is implemented as a special mode of the Dopesheet, switching between Timeline and Dopesheet will *not* change the visibility of the properties panel. Maniphest Tasks: T97980 Differential Revision: https://developer.blender.org/D14910
2022-07-19Fix T97559: Undoing of NLA strip duplication requires two undo stepsColin Basnett
Fix the issue where undoing a "duplicate NLA strip" operation would require two undo steps. The cause of this was that the operator was not using the operator macro system to combine both the duplication and the translate operators into one. Instead, the old code was simply manually invoking invoking the translate operator after the duplicate operator had completed. This patch requires the default keymap to be modified to include the two new macro operators, `NLA_OT_duplicate_move` and `NLA_OT_duplicate_linked_move` in favour of the old keymap that simply called `NLA_OT_duplicate` and passed along a `linked` argument. `duplicate_move` and `duplicate_move_linked` are two different enough operations to justify having their own operators from user's point-of-view, especially since we cannot yet have different tool-tips based on an operator's settings. Reviewed By: sybren, mont29 Differential Revision: https://developer.blender.org/D15086
2022-07-14Cleanup: format, unused argumentCampbell Barton
2022-07-14Cleanup: Rename & refactor several F-curve functionsColin Basnett
Rename and refactor several F-curve key manipulation functions, and move them from `editors` to `blenkernel`. The functions formerly known as `delete_fcurve_key`, `delete_fcurve_keys`, and `clear_fcurve_keys` have been moved from `ED_keyframes_edit.h` to `BKE_fcurve.h` and have been renamed according to hierarchical naming rules. Below is a table of the naming changes. | From | To | | -- | -- | | `delete_fcurve_key(fcu, index, do_recalc)` | `BKE_fcurve_delete_key(fcu, index)` | | `delete_fcurve_keys(fcu)` | `BKE_fcurve_delete_keys_selected(fcu)` | | `clear_fcurve_keys(fcu)` | `BKE_fcurve_delete_keys_all(fcu)` | | `calchandles_fcurve()` | `BKE_fcurve_handles_recalc()` | | `calchandles_fcurve_ex()`| `BKE_fcurve_handles_recalc_ex()` | The function formerly known as `delete_fcurve_key` no longer takes a `do_fast` parameter, which determined whether or not to call `calchandles_fcurve`. Now, the responsibility is on the caller to run the new `BKE_fcurve_handles_recalc` function if they have want to recalculate the handles. In addition, there is now a new static private function called `fcurve_bezt_free` which sets the key count to zero and frees the key array. This function is now used in couple of instances of functionally equivalent code. Note that `BKE_fcurve_delete_keys_all` is just a wrapper around `fcurve_bezt_free`. This change was initially spurred by the fact that `delete_fcurve_keys` was improperly named; this was a good opportunity to fix the location and naming of a few of these functions. Reviewed By: sybren Differential Revision: https://developer.blender.org/D15282
2022-07-07Fix T99505: NLA tweak mode crashes with GPencil dataAmélie Fondevilla
Adding Grease Pencil keyframes in the dopesheet (rB92d7f9ac56e0) lead to crashes from the NLA editor (T99505). This is now resolved, by removing grease pencil keyframes from NLA editor (as it was in 3.2), and filtering them out of all NLA-related operations. Reviewed By: sybren Differential Revision: https://developer.blender.org/D15391
2022-07-05NLA: change behavior of 'Frame Start' / 'End' slidersThibault de Villèle
Change the behavior of the "Frame start" and [Frame] "End" fields of an NLA Strip in the NLA editor. Frame Start now behaves like translating with {key G} and moving the mouse. It also updates the Frame End to ensure the strip remains the same length. Frame End changes the length of the strip, based on the Repeat property. If there are no repeats (i.e. number of repeats = 1) the underlying Action will change length, such that more or less of its keyframes will be part of the NLA strip. If there are repeats (i.e. number of repeats smaller or larger than 1), the number of repeats will change. Either way, the effective end frame off the strip will be the one set in the Frame End slider. The old behavior of stretching time has been removed. It is still possible to stretch time of a strip, but this no longer automatically happens when manipulating the Frame Start and Frame End sliders. **Technical details:** new RNA properties `frame_start_ui` and `frame_end_ui` have been added. Changing those values (for example via the sliders, but also via Python) trigger the above behavior. The behavior of the already-existing `frame_start` and `frame_end` properties has been simplified, such that these can be set from Python without many side-effects, simplifying import of data into the NLA. Reviewed By: sybren, RiggingDojo Differential Revision: https://developer.blender.org/D14658
2022-06-30Cleanup: Remove scene frame macros (`CFRA` et al.)Julian Eisel
Removes the following macros for scene/render frame values: - `CFRA` - `SUBFRA` - `SFRA` - `EFRA` These macros don't add much, other than saving a few characters when typing. It's not immediately clear what they refer to, they just hide what they actually access. Just be explicit and clear about that. Plus these macros gave read and write access to the variables, so eyesores like this would be done (eyesore because it looks like assigning to a constant): ``` CFRA = some_frame_nbr; ``` Reviewed By: sergey Differential Revision: https://developer.blender.org/D15311
2022-06-30Cleanup: spelling in commentsCampbell Barton
2022-06-21Fix T97533: Extrapolation of NLA strips outside current view are not renderedColin Basnett
Do a more thorough search for strips that are not visible themselves, but still influence the viewed time range. The problem before was that tracks not immediately visible would not be drawn at all. The strategy for fixing this was to simply include strips that are visible only because of their extrapolation mode. To do this, there is now a new function `get_visible_nla_strips` which gives a first and last `NlaTrack` that needs to be drawn. Tagging along with this is the removal of the strip index indicator from the name on meta tracks. Because of the new structure of the code, it would incur a performance penalty to restore the previous behavior (requiring a linear search for the index). Since this number is of virtually no utility to the user anyways (it has the look & feel of developer debugging information), this is something I think we can safely remove without regret. Reviewed By: sybren Differential Revision: https://developer.blender.org/D14738
2022-06-03Cleanup: spelling in commentsCampbell Barton
2022-05-09Fix T97529: NLA track buttons still work when hiddenColin Basnett
NLA track option buttons (lock track, etc.) now no longer respond to clicks when they are hidden. The bug stems from the fact that there was duplicate input handling going on for the buttons: once in the normal button UI system, and then again in the `mouse_nla_channels` function. The logic in `mouse_nla_channels` does not inspect whether or not the setting button is there or not, it just assumes that it is. This function should no longer be handling mouse input for buttons (there is even comment suggesting that the button handling to be deprecated) since the button UI system already handles it. Therefore, the button handling code has been removed from that `mouse_nla_channels`. In addition, the redundant mouse button handling for pressing the "Push Down Action" button has also been removed from this function as well. Reviewed By: sybren, lichtwerk Differential Revision: https://developer.blender.org/D14868
2022-05-03NLA: improve visibility of action & active channelNate Rupsis
Selecting Action channel in NLA now sets the context in the N-panel. The actively selected channel is now also drawn in a different way, so that it's visible which one is selected. Old: - The NLA sidebar didn't refresh with the creation of a new action. - There was no indication of the action channel being selected. New: - NLA side bar now refreshed when keyframes are added (new action is created) - Clicking on the action channel now gives visual indication of being selected Reviewed By: RiggingDojo, sybren Maniphest Tasks: T97372 Differential Revision: https://developer.blender.org/D14820
2022-04-26Animation: Sensible frame range for motion pathsColin Marmond
Motion paths can now be initialised to more sensible frame ranges, rather than simply 1-250: - Scene Frame Range - Selected Keyframes - All Keyframes Reviewed By: sybren, looch, dfelinto, pablico Maniphest Tasks: T93047 Differential Revision: https://developer.blender.org/D13687
2022-04-21Fix T97497: NLA strip names are now properly contained within the strip boundsColin Basnett
Very easy fix, the bug seemed to be a result of a typo on the right-most margin. Old: {F13013777} New: {F13013782} Maniphest Tasks: T97497 Differential Revision: https://developer.blender.org/D14711
2022-04-14NLA: Keyframe Remap Through Upper StripsWayde Moss
Add a new operator, "Start Tweaking Strip Actions (Full Stack)", which allows you to insert keyframes and preserve the pose that you visually keyed while upper strips are evaluating, The old operator has been renamed from "Start Tweaking Strip Actions" to "Start Tweaking Strip Actions (Lower Stack)" and remains the default for the hotkey {key TAB}. **Limitations, Keyframe Remapping Failure Cases**: 1. For *transitions* above the tweaked strip, keyframe remapping will fail for channel values that are affected by the transition. A work around is to tweak the active strip without evaluating the upper NLA stack. It's not supported because it's non-trivial and I couldn't figure it out for all transition combinations of blend modes. In the future, it would be nice if transitions (and metas) supported nested tracks instead of using the left/right strips for the transitions. That would allow the transitioned strips to overlap in time. It would also allow N strips to be part of the (previously) left and right strips, or perhaps even N strips being transitioned in sequence (similar to a blend tree). Proper keyframe remapping through all that is currently beyond my mathematical ability. And even if I could figure it out, would it make sense to keyframe remap through a transition? //This case is reported to the user for failed keyframe insertions.// 2. Full replace upper strip that contains the keyed channels. //This case is reported to the user for failed keyframe insertions.// 3. When the same action clip occurs multiple times (colored Red to denote it's a linked strip) and vertically overlaps the tweaked strip, then the remapping will generally fail and is expected to fail. I don't plan on adding support for this case as it's also non-trivial and (hopefully) not a common or expected use case so it shouldn't be much of an issue to lack support here. For anyone curious on the cases that would work, it works when the linked strips aren't time-aligned and when we can insert a keyframe into the tweaked strip without modifying the current frame output of the other linked strips. Having all frames sampled and the strip non-time aligned leads to a working case. But if all key handles are AUTO, then it's likely to fail. //This case is not reported to the user for failed keyframe insertions.// 4. When using Quaternions and a small strip influence on the tweaked Combine strip. This was an existing failure case before this patch too but worth a mention in case it causes confusion. D10504 has an example file with instructions. //This case is not reported to the user for failed keyframe insertions. // 5. When an upper Replace strip with high influence and animator keys to Quaternion Combine (Replace is fine). This case is similar to (4) where Quaternion 180 degree rotation limitations prevent a solution. //This case is not reported to the user for failed keyframe insertions.// Reviewed By: sybren, RiggingDojo Differential Revision: https://developer.blender.org/D10504
2022-03-18Cleanup: Compilation warningsSergey Sharybin
Mainly -Wset-but-unused-variable. Makes default compilation on macOS way less noisy. Differential Revision: https://developer.blender.org/D14357
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
2022-03-14RNA: Generate property declerations header, solving msg-bus C++ incompatibilityJulian Eisel
Lets `makesrna` generate a `RNA_prototypes.h` header with declarations for all RNA properties. This can be included in regular source files when needing to reference RNA properties statically. This solves an issue on MSVC with adding such declarations in functions, like we used to do. See 800fc1736748. Removes any such declarations and the related FIXME comments. Reviewed By: campbellbarton, LazyDodo, brecht Differential Revision: https://developer.blender.org/D13837
2022-03-14Revert "Animation: Sensible frame range for motion paths"Sybren A. Stüvel
This reverts commit 1558b270e9fcbc2e23fa248b0e7e770dddae155c. An earlier commit (rB101fadcf6b93c) introduced some new functionality, which was overlooked in reviewing this commit & got broken. Will re-commit after the issue has been fixed. Ref: D13687
2022-03-11Fix out of order event handling when calling operators from gizmosCampbell Barton
Activating a gizmo used the windows eventstate which may have values newer than the event used to activate the gizmo. This meant transforms check for the key that activated transform could be incorrect. Support passing an event when calling operators to avoid this problem.
2022-03-04Cleanup: remove outdated references to tweakCampbell Barton
2022-02-28Animation: Sensible frame range for motion pathsColin Marmont
Motion paths can now be initialised to more sensible frame ranges, rather than simply 1-250: - Scene Frame Range - Selected Keyframes - All Keyframes The Motion Paths operators are now also added to the Object context menu and the Dopesheet context menu. The scene range operator was removed, because the operators now automatically find the range when baking the motion paths. The clear operator now appears separated in "Selected Only" and "All", because it was not clear for the user what the button was doing. Reviewed By: sybren, looch Maniphest Tasks: T93047 Differential Revision: https://developer.blender.org/D13687
2022-02-25Cleanup: use flags for wmEvent modifier keysCampbell Barton
Using flags makes checking multiple modifiers at once more convenient and avoids macros/functions such as IS_EVENT_MOD & WM_event_modifier_flag which have been removed. It also simplifies checking if modifier keys have changed.
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-10Fix T84486: NLA, disable "Sync Length" after splitBrad Clark
Turn off "Sync Length" when splitting an NLA strip. The NLA Strip-Action Clip has a setting called "Sync Length" that is on by default and helps to update the length of the clip to the current actions keyframes so the strip shows the entire actions stored animation. When you split one of these strip-action clips in the NLA to trim it shorter or to move it somewhere else in the NLA tracks to blend or work with, the "Sync Length" setting stays checked on. You can have many strips in the NLA that all look to the same action, if you split one strip , you now have two strips showing or linked to the same action. To see or edit keyframes on a strip, you enter tweak mode. When you exit tweak mode, if "Sync Length" is active on the strip-action clip settings, the strip length is changed/reset to match the action keys. When you have many clips, this causes all of them to evaluate and update no matter where they are in the NLA. This destroys/undoes all the user work to trim down and place the clips in the NLA. **Description of the proposed solution:** This patch/change would turn off, the "Sync Length" setting when the split tool was used on a strip/action clip to help protect the users choice to trim and keep the clip that length. It doesn't change the ability to turn the setting back on or off, it just makes sure that the user doesn't accidentally or unknowingly loose work. The same process happens when an action is created that has a "manual range" set that is different than the length of the actions start-end keyframes. It makes sense to do the same thing for the split tool. **Alternative solutions:** While the user could know this and turn off this setting by hand, it is easy to forget and or the user might think that it only happened to the one clip they were editing and not realize it happened to all the trimmed versions, changing the users choice without the user knowing it happened. **Limitations of the proposed solution:** It only fixes the split tool, if another tool was created and some how impacted the clip length we would need to have that tool also take the sync length into account. Reviewed By: sybren Maniphest Tasks: T84486 Differential Revision: https://developer.blender.org/D10168
2022-01-30Cleanup: Cmake: remove unnecessary definitions for internationalizationAaron Carlisle
Previously, macros were ifdefed using the cmake option `WITH_INTERNATIONAL` However, the is unnecessary as withen the functions themselves have checks for building without internationalization. This also means that many `add_definitions(-DWITH_INTERNATIONAL)` are also unnecessary. Reviewed By: mont29, LazyDodo Differential Revision: https://developer.blender.org/D13929
2022-01-26Performance: Remap multiple items in UIJeroen Bakker
During sprite fright loading of complex scenes would spend a long time in remapping ID's The remapping process is done on a per ID instance that resulted in a very time consuming process that goes over every possible ID reference to find out if it needs to be updated. If there are N of references to ID blocks and there are M ID blocks that needed to be remapped it would take N*M checks. These checks are scattered around the place and memory. Each reference would only be updated at most once, but most of the time no update is needed at all. Idea: By grouping the changes together will reduce the number of checks resulting in improved performance. This would only require N checks. Additional benefits is improved data locality as data is only loaded once in the L2 cache. It has be implemented for the resyncing process and UI editors. On an Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz 16Gig the resyncing process went from 170 seconds to 145 seconds (during hotspot recording). After this patch has been applied we could add similar approach to references (references between data blocks) and functionality (tagged deletion). In my understanding this could reduce the resyncing process to less than a second. Opening the village production file between 10 and 20 seconds. Flame graphs showing that UI remapping isn't visible anymore (`WM_main_remap_editor_id_reference`) * Master {F12769210 size=full} * This patch {F12769211 size=full} Reviewed By: mont29 Maniphest Tasks: T94185 Differential Revision: https://developer.blender.org/D13615
2022-01-25Revert "Performance: Remap multiple items in UI"Jeroen Bakker
This reverts commit 948211679f2a0681421160be0d3b90f507bc0be7. This commit introduced some regressions in the test suite. As this change is a core part of blender Bastien and I decided to revert it as the solution isn't clear and needs more investigation. The following tests FAILED: 62 - blendfile_liblink (SEGFAULT) 63 - blendfile_library_overrides (SEGFAULT) It fails in (id_us_ensure_real)
2022-01-25Performance: Remap multiple items in UIJeroen Bakker
During sprite fright loading of complex scenes would spend a long time in remapping ID's The remapping process is done on a per ID instance that resulted in a very time consuming process that goes over every possible ID reference to find out if it needs to be updated. If there are N of references to ID blocks and there are M ID blocks that needed to be remapped it would take N*M checks. These checks are scattered around the place and memory. Each reference would only be updated at most once, but most of the time no update is needed at all. Idea: By grouping the changes together will reduce the number of checks resulting in improved performance. This would only require N checks. Additional benefits is improved data locality as data is only loaded once in the L2 cache. It has be implemented for the resyncing process and UI editors. On an Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz 16Gig the resyncing process went from 170 seconds to 145 seconds (during hotspot recording). After this patch has been applied we could add similar approach to references (references between data blocks) and functionality (tagged deletion). In my understanding this could reduce the resyncing process to less than a second. Opening the village production file between 10 and 20 seconds. Flame graphs showing that UI remapping isn't visible anymore (`WM_main_remap_editor_id_reference`) * Master {F12769210 size=full} * This patch {F12769211 size=full} Reviewed By: mont29 Maniphest Tasks: T94185 Differential Revision: https://developer.blender.org/D13615
2022-01-24Cleanup: spelling in commentsCampbell Barton
2021-12-08Cleanup: move public doc-strings into headers for 'editors'Campbell Barton
Ref T92709
2021-11-24Animation: allow manually setting the intended playback range for actions.Alexander Gavrilov
Some operations, e.g. adding a new action strip to NLA, require knowing the active frame range of an action. However, currently it can only be deduced by scanning the keyframes of the curves within it. This is not ideal if e.g. curves are staggered for overlap. As suggested by Nathan Vegdahl in comments to T54724, this patch adds Action properties that allow manually specifying its active frame range. The settings are exposed via a panel in the Dopesheet and Action Editor. When enabled, the range is highlighted in the background using a striped fill to distinguish it from the solid filled regular playback range. When set, the frame range is used when adding or updating NLA tracks, and by add-ons using `Action.frame_range`, e.g. FBX exporter. Differential Revision: https://developer.blender.org/D11803
2021-11-05UI: Use arrow icon on context pathsPablo Vazquez
The current `ICON_SMALL_TRI_RIGHT_VEC` uses dark hard-coded colors ([`0.2`, `0.2`, `0.2`]) which makes it impossible to theme and hard to see in dark contexts. Use `ICON_RIGHTARROW` to match the Outliner's breadcrumbs. This icon uses `TH_TEXT` so it's visible as long as the rest of the text is. ##### Master (Properties editor background made red on purpose to be able to see the triangle icon) {F11713038, size=full} #### This patch {F11713039, size=full} Reviewed By: #user_interface, Severin, HooglyBoogly Maniphest Tasks: T92771 Differential Revision: https://developer.blender.org/D13106
2021-10-25Cleanup: silence warning in recent commitPablo Vazquez
Thanks to Dr. Sybren for pointing it out!
2021-10-25UI: Use flat colors for NLA strip drawingPablo Vazquez
The NLA editor is in need of a design overhaul, hopefully for 3.1 or 3.2. This should be a project on itself, however, the worst offender currently is the use of gradients on strips. Something that can be fixed easily. {F11390293, size=full, loop, autoplay} A simple replace of `UI_draw_roundbox_shade_x` for `UI_draw_roundbox_4fv` brings strips in line with how other areas are drawn. This patch also: * Remove embossed lines around active action channel. * Highlight the strip while being moved. This patch does not include any theme changes. This will be tackled separately. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D12968
2021-10-14Fix T91743: Unify behavior of 'Auto Set Preview Range'Philipp Oeser
This is available in the DopeSheet, GraphEditor, and NLA Editor. Currently: - Dopesheet advertises to take selection into account... -- ...but doesnt - which might be a mistake in rBe3842d1ca4dd - Graph Editor does not mention selection... -- ...and also does not take it into account - NLA does not mention selection... -- ...but takes it into account Now: - make them **all** take selection into account (you can still do a quick 'Select All' prior to get the full range -- better than not being able to set this based on selection) - mention this for all in the tooltip - also reword to 'Set Preview Range to Selected' since using the term 'Auto' impilies this would change on selection change. Maniphest Tasks: T91743 Differential Revision: https://developer.blender.org/D12651
2021-09-28Fix Drivers Editor showing playhead on the X AxisPhilipp Oeser
Currently the Drivers Editor shows this (the blue thing can be dragged to change frame): {F10647661} But the Drivers Editors X axis is the output of the driver [which can be further tweaked by the curve] not time(frame). So it seems better to not mix them here, it is just confusing to have two different units on one axis. Especially since what we really want to look at in X (the drivers output value) can be in a totally unrelated range compared to frames, so e.g. we might be interested in a drivers range from 0.0 to 1.0 and a framerange of 100 to 200, so putting this on one axis just does not make sense. Better to use a separate timeline for this. Note 2.79 also did not do this. Maniphest Tasks: T91157 Differential Revision: https://developer.blender.org/D12392
2021-09-23Cleanup: Remove hardcoded values and rename keyframe shape shadersDalai Felinto
No functional change. The shader is complicated by itself, having hardcoded values makes it even more cryptic. I also renamed the shader because the shader is not for the keyfarme diamond only, but for all the keyframe shapes. Differential Revision: https://developer.blender.org/D12615
2021-08-31Context: add "active_nla_track" & "active_nla_strip" context membersCampbell Barton
Selection was already accessible but not active. Add utility functions: - ANIM_nla_context_track to access the active track, following the convention of ANIM_nla_context_strip. - ANIM_nla_context_*_ptr versions of these functions, needed to for creating context members to access the ID pointer. Part of fix for T90723.
2021-08-13Cleanup: correct comment exiting NLA tweakmodePhilipp Oeser
Comment was pasted from entering tweakmode.
2021-08-13Keyframe: Reduce GPU context switches.Jeroen Bakker
This change reduces the GPU context switches when drawing keyframes. In the previous situation the keyframe blocks and keyframe keys were drawn per channel. With this patch first all the keyframe blocks are drawn for all channels and after that the keyframe keys are collected for all channels and send to the GPU in a single draw call.
2021-08-12Fix NLA action cannot be unlinked in certain casesPhilipp Oeser
The poll for unlinking calls `nla_panel_context` without providing an adt pointer, and there is a check for this pointer in `nla_panel_context` leading to never returning true if it is not provided. (this is fine if there are tracks already, poll would succeed in this case, `nla_panel_context` goes a different code path then) Same call to `nla_panel_context` is also done in the beginning of the corresponding unlink exec function (but this time providing the pointer because it is used later), so it makes sense to do the same thing in the poll function. Equal check is also done in the panel poll function, so now these are all in sync. Part of T87681. Maniphest Tasks: T87681 Differential Revision: https://developer.blender.org/D11041
2021-08-03Cleanup: Hide implementation details for ED_keyframe_keylist.Jeroen Bakker
For T78995 we want to change the data structure of keylists to improve performance. (Probably a Vector with bin-search capabilities). This patch hides the internal structure of the keylists behind `AnimKeylist` structure. This allows us to change the internals without 'breaking' where it is being used. The change adds functions to create, free, find and walk over the keylist. Reviewed By: sybren Maniphest Tasks: T78995 Differential Revision: https://developer.blender.org/D11974
2021-07-29VSE: Change grid line drawingRichard Antalik
Add overlay option to disable grid drawing. Reuse drawing code from other editors (timeline editor) Add argument `display_minor_lines` to function `UI_view2d_draw_lines_x__discrete_frames_or_seconds` This way minor line drawing can be disabled and so it doesn't cause too much visual noise. Also spacing seems to be too fine, so VSE uses 3x what is defined in preferences. Reviewed By: fsiddi, Severin Differential Revision: https://developer.blender.org/D11790
2021-07-19Cleanup: Separate keyframes_draw and keyframes_keylist.Jeroen Bakker
The keylist functions are used in other places for none drawing related stuff. Fe pose_slide uses it.
2021-07-09Cleanup: rename BKE_animdata_{add=>ensure}_idCampbell Barton
Use the term `ensure` as existing data is used when present.