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-02-10Rebase on mastertemp-license-header-spdxCampbell Barton
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.
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-05-14Cleanup: spelling, rename metas to meta-strips / meta-ballsCampbell Barton
2021-04-09Cleanup: use our own code style for doxy-gen comment blocksCampbell Barton
2021-03-05Cleanup: rename evt to eventCampbell Barton
Following naming convention of most operators.
2021-02-19UI: FModifier layout updates, drag and dropHans Goudey
This patch implements the list panel system D7490 for FCurve modifiers. The UI layouts are updated to make use of subpanels and to be consistent with the rest of the interface, and easier to understand. See the differential revision for screenshots. This commit also significantly cleans up the FModifier UI code, and improves, mainly by replacing the old button creation code is with the newer interface API using RNA. In turn there is a bit of complexity added because each FModifier has a separate panel. Although reordering of FModifiers was not implemented before, we get drag and drop basically for free here, so it is also included. As noted in some older to do tasks, FModifiers aren't evaluated in perfect order, which may be a point of improvement for the future. Differential Revision: https://developer.blender.org/D7997
2021-02-14Cleanup: use doxy sectionsCampbell Barton
2021-02-14Cleanup: use return argument prefixCampbell Barton
2021-02-10Cleanup: remove redundant headers in source/blender/editors/Campbell Barton
Remove redundant headers using `./source/tools/utils_maintenance/code_clean.py` Reviewed By: jmonteath Ref D10364
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-25Cleanup: pass 'rctf' rectangle to 2D box drawing functionsCampbell Barton
Passing 4x arguments for the rectangle, mixed in with round-box radius & color wasn't very readable. Instead, pass a `rctf` as the first argument to UI box drawing functions.
2021-01-22Merge branch 'blender-v2.92-release'Campbell Barton
2021-01-22Fix the NLA setting the active object without exiting edit-modeCampbell Barton
This is done by convention in the outliner and dope-sheet. Missing edit-mode exit causes glitches with mixed object/edit-mode undo.
2021-01-19Cleanup: use 'const' argument for parameter argumentCampbell Barton
2021-01-19UI Code Quality: Use "params" struct for area and region callbacksHans Goudey
These functions with many arguments can be unwieldy. Aside from the obvious issues with rewriting the list of arguments and the opportunities for error and frustration that presents, the long list of arguments make these systems hard to change. So when an argument should be added, someone might skip that and add some hack instead. So, as proposed in T73586#1037210, this patch instead uses a "params" struct for each of these callbacks. - Use param argument for `ARegionType.listener` - Remove unused window field in region listener - Use param argument for `SpaceType.listener` - Use params struct for `ARegionType.message_subscribe` Differential Revision: https://developer.blender.org/D9750
2021-01-18Fix T84586: missing Outliner redraws for certain NLA operatorsPhilipp Oeser
Outliner display under 'Animation' > 'NLA Tracks' was not updating in the following cases: - adding strips - removing strips - duplicating strips (possibly to different track) - swapping strips - reordering tracks - changing strip order by translating - translating strips between tracks - renaming tracks In the case of deleting strips/tracks, this was also resulting in a use- after-free error in Outliner drawing code (this was reported specifically in T84586). Most of these operators already sent a ND_NLA|NA_EDITED notifier, but the Outliner is not listening to these. Listening to NA_EDITED is also not what we want since this also happens a lot in cases irrelevant to the Outliner. Now be a bit more specific and send ND_NLA|NA_ADDED / ND_NLA| NA_REMOVED or a new ND_NLA_ORDER (to distinguish from NA_EDITED 'only' - where a redraw is not neccessary) and listen to these from the Outliner. (note: places that were listening to ND_NLA|NA_EDITED before are also listening to NA_ADDED or NA_REMOVED, so changing NA_EDITED should not be a problem here) (note 2: for cases like swapping tracks/strips order, NA_ADDED or NA_REMOVED does not make sense, neither can we use NA_EDITED [since we dont want to listen to this], so in this case an additional ND_NLA_ORDER is now sent) (note 3: in nla transform code, this is now always sent on confirm. There are cases were the notifier would not be needed, but checking exactly all cases were it actually would be needed seems overkill [history of D10073 has example code to check if strips moved between tracks]) Maniphest Tasks: T84586 Differential Revision: https://developer.blender.org/D10073
2021-01-13UI: Revert design changes to data-block selector for the 2.92 releaseJulian Eisel
Partially reverts 2250b5cefee7. Removing the user count and fake user count icons was controversial (which was expected) and there are a few further changes needed, that won't make it in time for the release, see D9946. While there is a design to bring back the user count and fake user indicators, a new design idea was proposed that the UI team wants to follow. This came too late for the 2.92 release, the new design is targeted at the 2.93 release now. Meanwhile, UI team decision was to simply revert the design changes. The new design is being worked on in https://developer.blender.org/T84669. Note that this commit does not revert some internal changes done in 2250b5cefee7. Namely the introduction of `ed_util_ops.c` and data-block operators in there. These will still be needed in the new design.
2021-01-04Cleanup: redundant code, minor inconsistenciesCampbell Barton
- Remove ternary operators when both values are the same. - Remove break after return. - Remove redundant NULL checks for code which handles those cases immediately beforehand.
2020-12-24UI: Cleanup spelling of compound wordsYevgeny Makarov
Approximately 138 changes in the spelling of compound words and proper names like "Light Probe", "Shrink/Fatten", "Face Map". In many cases, hyphens were used where they aren't correct, like "re-fit". Other common changes include: - "Datablock" -> "data-block" - "Floating point" -> "floating-point" - "Ngons" -> "n-gons" These changes help give the language used in the interface a consistent, more professional feel. Differential Revision: https://developer.blender.org/D9923
2020-12-24Cleanup: Fix capitalization in various UI stringsYevgeny Makarov
Approximately 195 changes of capitalization to conform to MLA title style. UI labels and property names should use MLA title case, while descriptions should be capitalized like regular prose, generally with only the start of a sentence capitalized. Differential Revision: https://developer.blender.org/D9922
2020-12-19Fix T83868: Button animation states no longer visible without embossHans Goudey
This bug was caused by making it so that non-embossed modifier icon buttons could become an operator button and retain their red highlight for disabled modifiers. The icon button needs emboss turned off, but in earlier versions of Blender, `UI_EMBOSS_NONE` would be overridden by animation or red alert states. Instead of abusing "NONE" to mean "none unless there is animation or red alert", this commit adds a new emboss flag for that situation, `UI_EMBOSS_NONE_OR_STATUS`, which uses no emboss unless there is an animation state, or another status. There are only a few situations where this is necessary, so the change isn't too big. Differential Revision: https://developer.blender.org/D9902
2020-12-18UI: Redesigned data-block selectorsJulian Eisel
The previous design is rather old and has a couple of problems: * Scalability: The current solution of adding little icon buttons next to the data-block name field doesn't scale well. It only works if there's a small number of operations. We need to be able to place more items there for better data-block management. Especially with the introduction of library overrides. * Discoverability: It's not obvious what some of the icons do. They appear and disappear, but it's not obvious why some are available at times and others not. * Unclear Status: Currently their library status (linked, indirectly linked, broken link, library override) isn't really clear. * Unusual behavior: Some of the icon buttons allow Shift or Ctrl clicking to invoke alternative behaviors. This is not a usual pattern in Blender. This patch does the following changes: * Adds a menu to the right of the name button to access all kinds of operations (create, delete, unlink, user management, library overrides, etc). * Make good use of the "disabled hint" for tooltips, to explain why buttons are disabled. The UI team wants to establish this as a good practise. * Use superimposed icons for duplicate and unlink, rather than extra buttons (uses less space, looks less distracting and is a nice + consistent design language). * Remove fake user and user count button, they are available from the menu now. * Support tooltips for superimposed icons (committed mouse hover feedback to master already). * Slightly increase size of the name button - it was already a bit small before, and the move from real buttons to superimposed icons reduces usable space for the name itself. * More clearly differentiate between duplicate and creating a new data-block. The latter is only available in the menu. * Display library status icon on the left (linked, missing library, overridden, asset) * Disables "Make Single User" button - in review we weren't sure if there are good use-cases for it, so better to see if we can remove it. Note that I do expect some aspects of this design to change still. I think some changes are problematic, but others disagreed. I will open a feedback thread on devtalk to see what others think. Differential Revision: https://developer.blender.org/D8554 Reviewed by: Bastien Montagne Design discussed and agreed on with the UI team, also see T79959.
2020-12-08LibOverride: Add initial support for adding new NLA tracks.Bastien Montagne
Also makes NLA tracks and strips overridable. User can either edit existing strips in existing NLA tracks (but not add or remove them), and/or add new NLA tracks after those comming from the linked data. Most of the work was as usual checking operators and adding protections against illegal operations in override context. Note that since we can only rely on indices to deal with local added tracks, we forbid any local track being before any linked/original track. Maniphest Tasks: T72629 Differential Revision: https://developer.blender.org/D9611
2020-11-13Cleanup: Make panel type flag names more clearHans Goudey
The overlap with the `Panel` flags that start with "PNL" was quite confusing because wasn't clear which enum a flag was from. The new names are a bit longer, but the clarity is worth it.
2020-11-02Fix crash opening some 2.4x .blend files with drivers or NLA editorBrecht Van Lommel
For example, outlinertest.blend from test240.zip.
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