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
2021-09-10Anim: Keylist drawing optimization by using arrays.Jeroen Bakker
Change data structure of keylists. Reducing the balancing overhead and therefore increases performance. | **Function** | **Master** | **Patch** | |`draw_summary_channel`| 0.202105s| 0.083874s | When adding items to the keylist it will store it in a linked list. This linked list is accompanied with the length (key_len) and a `last_accessed_column`. last_accessed_column is a cursor that improve the performance when adding new items as they are mostly ordered by frame numbers. last_accessed_column is reset when a new fcurve/mask/... is added to the keylist. Before searching or array access. the listbase needs to be converted to an array. `ED_keylist_prepare_for_direct_access`. After that the caller can use `ED_keylist_find_*` or `ED_keylist_array*` functions. The internal array can also be accessed via the `ED_keylist_listbase` function. The items inside the array link to the previous/next item in the list. Reviewed By: sybren Differential Revision: https://developer.blender.org/D12052
2021-09-06UI: Area Split and Join Mouse Cursor FeedbackHarley Acheson
This patch just changes the mouse cursor to a "stop sign" when dragging to an unsupported location during Join or Split operations. See D11396 for details and examples. Differential Revision: https://developer.blender.org/D11396 Reviewed by Campbell Barton
2021-09-04Python: Allow Area Close via ScriptingHarley Acheson
Screen area maintenance "Close" function allowed to be scripted. See D12307 for usage example. Differential Revision: https://developer.blender.org/D12307 Reviewed by Campbell Barton
2021-09-02Cleanup: remove redundant alloc argument to SEQ_editing_getCampbell Barton
Callers that require lazy initialization can use SEQ_editing_ensure.
2021-09-02Cleanup: spelling in commentsCampbell Barton
2021-08-31Cleanup: add CTX_data_pointer_set_ptr & CTX_data_list_add_ptrCampbell Barton
Many callers expanded a PointerRNA argument, so add a version of these functions that takes a PointerRNA.
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-31Context: add "active_sequence_strip" context memberPhilipp Oeser
This is an alternative to context.scene.sequence_editor.active_strip which could be verbose, especially with additional None checks. Part of fix for T90723, extracted from D12297.
2021-08-26UI: Consistent Area Move Snapping LocationsHarley Acheson
Change Area Move snapping locations to even 12ths, rather than current eights and thirds, so snap distances are consistent sizes. Also adds snapping at minimum and maximum locations. see D11938 for details and illustrations. Differential Revision: https://developer.blender.org/D11938 Reviewed by Hans Goudey
2021-08-20Cleanup: use "free_data" suffix when the argument isn't freedCampbell Barton
Avoid API misuse that caused leaks in T90791 & 2788b0261cb7d33a2f6f2978ff4f55bb4987edae.
2021-08-16XR: Color Depth AdjustmentsPeter Kim
This addresses reduced visibility of scenes (as displayed in the VR headset) that can result from the 8-bit color depth format currently used for XR swapchain images. By switching to a swapchain format with higher color depth (RGB10_A2, RGBA16, RGBA16F) for supported runtimes, visibility in VR should be noticeably improved. However, current limitations are lack of support for these higher color depth formats by some XR runtimes, especially for OpenGL. Also important to note that GPU_offscreen_create() now explicitly takes in the texture format (eGPUTextureFormat) instead of a "high_bitdepth" boolean. Reviewed By: Julian Eisel, Clément Foucault Differential Revision: http://developer.blender.org/D9842
2021-08-09Cleanup/fixes in UI messages.Bastien Montagne
2021-08-06Cleanup: rename `FileList::asset_library` → `asset_library_ref`Sybren A. Stüvel
In the `FileList` struct, rename the `AssetLibraryReference *asset_library` field to `asset_library_ref` -- it's a description of which asset library is used, and not the asset library itself. This is to make space for a future `AssetLibrary *asset_library` field, which will point to an actual asset library struct/class. No functional changes. Reviewed by: Severin Differential Revision: https://developer.blender.org/D12151
2021-08-06Cleanup: use const result in `ED_keyframes_find_*` functions.Jeroen Bakker
2021-08-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-08-05Cleanup: remove redundant parenthesisCampbell Barton
2021-08-04Cleanup: rename restrict to hide/visibility in Object, Collection, MaskLayerBrecht Van Lommel
This makes the internal naming consistent with the public API. And also gives us a visibility_flag rather than restrictflag that can be extended with more flags.
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-08-02Fix T87041: Driver Editor not updated in realtimePhilipp Oeser
Caused by {rBbbb2e0614fc3} Since above commit only the playhead is updated as an overlay in animation playback (was moved out of drawing of the main region for perfomance reasons). The driver value "debug" visualization is very useful to have during playback though but was left in main region drawing as part of `draw_fcurve` (thus does not update in realtime anymore). Moving `graph_draw_driver_debug` into the overlay is not feasible because it requires animation filtering which has significant overhead which needs to be avoided in the overlay which is redrawn on every UI interaction. Now tag the whole main region for updates in the Driver Editor during playback instead (which will make the Drivers Editor as slow during playback as before rBbbb2e0614fc3 -- but with realtime updates of the debug visualization). Maniphest Tasks: T87041 Differential Revision: https://developer.blender.org/D12003
2021-08-02WindowManager: Support Dynamic tooltips when dragging.Jeroen Bakker
Originally the operator name was drawn next to the dragging content. After that there was an option to add custom, static text with the dragging content. This patch allows dynamic text to be drawn. The custom text was implemented as out parameter of the poll function what made the code unclear. This patch introduces a tooltip function that separates tooltip generation from the poll function. NOTE: the text should always be returned in its own memory block. This block will be freed after it is copied in the drag struct. Reviewed By: Severin Differential Revision: https://developer.blender.org/D12104
2021-07-30Assets: Disable File Browser only operators for asset browsingJulian Eisel
These operators shouldn't be available in the Asset Browser. https://developer.blender.org/T83556 Added a comment to each operator poll assignment to explicitly mention the intention. That should also remind devs to decide if the operator should apply for both file & asset browsing when copy & pasting operator definition code.
2021-07-21Assets: Rename workspace active asset library DNA variableJulian Eisel
This new variable was introduced with 7898089de3f2. We don't usually use an `active` prefix variable. Plus, this makes the name match the one of the Asset Browser active library variable, so we can use the `rna_def_asset_library_reference_common()` helper for both. This will cause Asset Views to open with the default "Current File" Asset Library. We could avoid that, but it's a minor issue really.
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-15UI/Assets: Initial Asset View UI templateJulian Eisel
The asset view UI template is a mini-version of the Asset Browser that can be placed in regular layouts, regions or popups. At this point it's made specifically for placement in vertical layouts, it can be made more flexible in the future. Generally the way this is implemented will likely change a lot still as the asset system evolves. The Pose Library add-on will use the asset view to display pose libraries in the 3D View sidebar. References: * https://developer.blender.org/T86139 * https://code.blender.org/2021/06/asset-browser-project-update/#what-are-we-building * https://code.blender.org/2021/05/pose-library-v2-0/#use-from-3d-viewport Notes: * Important limitation: Due to the early & WIP implementation of the asset list, all asset views showing the same library will show the same assets. That is despite the ID type filter option the template provides. The first asset view created will determine what's visible. Of course this should be made to work eventually. * The template supports passing an activate and a drag operator name. The former is called when an asset is clicked on (e.g. to apply the asset) the latter when dragging (e.g. to .blend a pose asset). If no drag operator is set, regular asset drag & drop will be executed. * The template returns the properties for both operators (see example below). * The argument list for using the template is quite long, but we can't avoid that currently. The UI list design requires that we pass a number of RNA or custom properties to work with, that for the Pose Libraries should be registered at the Pose Library add-on level, not in core Blender. * Idea is that Python scripts or add-ons that want to use the asset view can register custom properties, to hold data like the list of assets, and the active asset index. Maybe that will change in future and we can manage these internally. As an example, the pose library add-on uses it like this: ``` activate_op_props, drag_op_props = layout.template_asset_view( "pose_assets", workspace, "active_asset_library", wm, "pose_assets", workspace, "active_pose_asset_index", filter_id_types={"filter_action"}, activate_operator="poselib.apply_pose_asset", drag_operator="poselib.blend_pose_asset", ) drag_op_props.release_confirm = True drag_op_props.flipped = wm.poselib_flipped activate_op_props.flipped = wm.poselib_flipped ```
2021-07-15UI: Auto-scroll to keep active text buttons in viewJulian Eisel
If a text button is activated that is not in view (i.e. scrolled away), the scrolling will now be adjusted to have it in view (with some small additional margin). While entering text, the view may also be updated should the button move out of view, for whatever reason. For the most part, this feature shouldn't be needed and won't kick in, except when a clicked on text button is partially out of view or very close to the region edge. It's however quite important for the previously committed feature, that is, pressing Ctrl+F to start searching in a UI list. The end of the list where the scroll button appears may not be in view. Plus while filtering the number of visible items changes so the scrolling has to be updated to keep the search button visible. Note that I disabled the auto-scrolling for when the text button spawned an additional popup, like for search-box buttons. That is because current code assumes the button to have a fixed position while the popup is open. There is no code to update the popup position together with the button/scrolling. I also think that the logic added here could be used in more places, e.g. for the "ensure file in view" logic the File Browser does.
2021-07-15UI: Support UI list tooltips, defined via Python scriptsJulian Eisel
Makes it possible to create tooltips for UI list rows, which can be filled in .py scripts, similar to how they can extend other menus. This is used by the (to be committed) Pose Library add-on to display pose operations (selecting bones of a pose, blending a pose, etc). It's important that the Python scripts check if the UI list is the correct one by checking the list ID. For this to work, a new `bpy.context.ui_list` can be checked. For example, the Pose Library add-on does the following check: ``` def is_pose_asset_view() -> bool: # Important: Must check context first, or the menu is added for every kind of list. list = getattr(context, "ui_list", None) if not list or list.bl_idname != "UI_UL_asset_view" or list.list_id != "pose_assets": return False if not context.asset_handle: return False return True ```
2021-07-15Assets: Expose active asset library in contextJulian Eisel
For the Asset Browser, this returns the active asset library of the Asset Browser, otherwise it returns the one active in the workspace. This gives simple access to the active asset library from UI code and Python scripts. For example the upcoming Pose Library add-on uses this, as well as the upcoming asset view template.
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
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-29Fix T89526: "Toggle Maximize Area" clears context screen propertiesCampbell Barton
Removed in b787581c9cda5a0cd4bc8b03bbdd1f9832438db4 as it's comment noted it was bad code, the reason for it's necessity was no longer valid. Add this back with comment explaining why it's still needed.
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-20Cleanup: use eSpace_Type enum typeCampbell Barton
2021-06-19Spreadsheet Editor: Row FiltersHans Goudey
This patch adds support for filtering rows based on rules and values. Filters will work for any attribute data source, they are a property of the spreadsheet rather than of the attribute system. The properties displayed in the row filter can depend on data type of the currently visible column with that name. If the name is no longer visible, the row filter filter is grayed out, but it will remember the value until a column with its name is visible again. Note: The comments in `screen.c` combined with tagging the sidebar for redraw after the main region point to a lack of understanding or technical debt, that is a point to improve in the future. **Future Improvements** * T89272: A search menu for visible columns when adding a new filter. * T89273: Possibly a "Range" operation. Differential Revision: https://developer.blender.org/D10959
2021-06-16Tweaks to Constraints operators poll functions.Bastien Montagne
Mainly: * Make `ED_operator_object_active_editable_ex` properly report poll messages on failure. * Add `ED_operator_object_active_local_editable_posemode_exclusive` for bone constraints requiring pure local Object (non-override one). * General cleanup and adding more poll messages on failures.
2021-06-16Screen: simplify internal logic for new full-screen areasCampbell Barton
Creating a new full screen area had it's area initialized as empty, updating the screen then set the area to a 3D view (as a fallback), before the actual area type was set. This made setting the intended space-type run the 3D views exit callback on a 3D view without a View3D struct allocated, which the exit callback needed to account for. Resolve by calling ED_screen_change after the area type has been set.
2021-06-15Fix: Sequencer backdrop not updated during playback.Jeroen Bakker
Caused by recent optimization in {7b76a160a4}.
2021-06-11Render Window as Non-Child on Win32 platformHarley Acheson
This patch makes the "Render" window a top-level window, not a child of the main window, which was the case in blender versions prior to 2.93. This means it is no longer "on top", nor is the icon grouped on the taskbar in the same way, but you can Alt-Tab between it and the main window. This change only affects the Windows platform as the other platforms behave this way. See D11576 for links to negative feedback that prompts this change. Differential Revision: https://developer.blender.org/D11576 Reviewed by Brecht Van Lommel
2021-06-11Sequencer: Do not redraw during playback.Jeroen Bakker
When using large sequences including audio the drawing of the audio on top of the strip takes a lot of time. This effects the playback performance heavily. During the animation playback performance there was a solution for this by only drawing the playhead overlay. This was reverted for the sequence editor as it didn't update the color strips when they were animated. This patch checks if there are animated color strips if so the full screen is redrawn, otherwise only the playhead is redrawn. Reviewed By: ISS Differential Revision: https://developer.blender.org/D11580
2021-05-21Cleanup: spellingLeon Zandman
Includes fixes to misspelled function names. Ref D11280
2021-05-14Cleanup: use enum types for screen direction variablesCampbell Barton
The term direction was used in 3 different ways in screen editing code, making it hard to follow: - 0-3 for as magic numbers mapped to [west,north,east,south]. - `h`, `v` characters for [horizontal,vertical] axes. - Cycle direction SPACE_CONTEXT_CYCLE_PREV, SPACE_CONTEXT_CYCLE_NEXT The following changes have been made: - Add `eScreenDir` for [west,north,east,south], use variable name `dir`. - Add `eScreenAxis` for [horizontal,vertical] values, use variable name `dir_axis`. - Add `eScreenCycle` for existing enum `SPACE_CONTEXT_CYCLE_{PREV/NEXT}`. - Add macros `SCREEN_DIR_IS_VERTICAL(dir)`, `SCREEN_DIR_IS_HORIZONTAL(dir)`. Replacing `ELEM(dir, 1, 3)`, `ELEM(dir, 0, 2)`. - Move `ED_screen_draw_join_highlight`, `ED_screen_draw_split_preview` to `screen_intern.h`. Reviewed By: Severin Ref D11245
2021-05-13Cleanup: use boolean argumentCampbell Barton
2021-05-13UI: Improved "Area Close" Neighbor SelectionHarley Acheson
The new "Close Area" operator can let any neighbor replace the area to be closed. This patch improves the selection of the best, and most- aligned, neighbor. It maximizes the ratio of the shared edge lengths, rather than minimize the absolute amount of misalignment. This follows our expectations closer because it takes into account the relative sizes of the areas and their edges. see D11143 for details and examples. Differential Revision: https://developer.blender.org/D11143 Reviewed by Campbell Barton
2021-04-30Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-30Fix crash running window operators in background modeCampbell Barton
2021-04-26Cleanup: spellingCampbell Barton
2021-04-26Cleanup: inconsistent naming for screen editing variables & argsCampbell Barton
2021-04-26UI: Adding Constraint to the Area Join OperationsHarley Acheson
Removing mid-operation area re-targeting for safety and predictability. Differential Revision: https://developer.blender.org/D11066 Reviewed by Campbell Barton