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-10-20Fix T92368: LMB mouse events (Selecting, doubleclicks etc) are brokenJulian Eisel
2021-10-20Fix T92347: Append function excludes Collections that do not contain Objects ↵Bastien Montagne
directly. Collections directly selected by the user should always be instantiated. Regression from recent append code refactor.
2021-10-20Cleanup: use an array for wmEvent cursor position variablesAaron Carlisle
Use arrays for wmEvent coordinates, this quiets warnings with GCC11. - `x, y` -> `xy`. - `prevx, prevy` -> `prev_xy`. - `prevclickx, prevclicky` -> `prev_click_xy`. There is still some cleanup such as using `copy_v2_v2_int()`, this can be done separately. Reviewed By: campbellbarton, Severin Ref D12901
2021-10-20View3D: Cursor Snap RefactorGermano Cavalcante
Make the snap system consistent with the placement tool and leak-safe. **Changes:** - Store `SnapCursorDataIntern` in a `static` variable; - Initialize (lazily) `SnapCursorDataIntern` only once (for the keymap). - Move setup members of `V3DSnapCursorData` to a new struct `V3DSnapCursorState` - Merge `ED_view3d_cursor_snap_activate_point` and `ED_view3d_cursor_snap_activate_plane` into `state = ED_view3d_cursor_snap_active()` - Merge `ED_view3d_cursor_snap_deactivate_point` and `ED_view3d_cursor_snap_deactivate_plane` into `ED_view3d_cursor_snap_deactive(state)` - Be sure to free the snap context when closing via `ED_view3d_cursor_snap_exit` - Use RNA properties callbacks to update the properties of the `"Add Primitive Object"` operator
2021-10-20Cleanup: use elem macrosCampbell Barton
2021-10-19Asset Browser: Improved workflow for asset catalog savingSybren A. Stüvel
No longer save asset catalogs on blendfile save. Instead: - extend the confirmation prompt for unsaved changes to show unsaved catalogs. - In the confirmation prompt, make catalog saving explicit & optional, just like we do it for external images. {F10881736} - In the Asset Browser catalog tree, show an operator icon to save the catalogs to disk. It's grayed out if there are no changes to save, or if the .blend wasn't saved yet (required to know where to save the catalog definitions to). {F10881743} Much of the work was done by @Severin and reviewed by me, then we swapped roles. Reviewed By: Severin Differential Revision: https://developer.blender.org/D12796
2021-10-19Fix T92224: Refactor of append code unexpectedly changed behavior with ↵Bastien Montagne
'localize all' off. In 2.93 and before, when appending wityh 'localize all' off, all linked IDs (including indirectly linked ones) from initial library would be made local. In 3.0, after refactor from rB3be5ce4aad5e, only directly linked IDs (i.e. user-selected IDs) would be made local. This change was not intentional (result of confusing code and naming in previous implementation), and old behavior is used in some workflows to control which data is kept linked and which data is made local. This commit revert to 2.93 behavior. NOTE: there is still an (extreme) corner case where behavior is different between 2.93 and 3.0: If you append (at the same time) object A from LibA.blend, and object B from LibB.blend, and object B uses somehow a material from LibA.blend: * In 2.93, that material would have been made local (because it belonged to one of the 'initial' libraries, even though not the initial lib of object B). * In 3.0, this material will remain linked, since from object B persective it comes from a different library.
2021-10-19Cleanup: use 'e' prefix for enum typesCampbell Barton
2021-10-18WM: support setting the operators idle cursorCampbell Barton
Support setting a cursor when an operator is waiting for input.
2021-10-18Fix frame overlay not refreshing the sequencer previewCampbell Barton
Regression in 46aa70cb486d719139ac43e5c9ac4b0fe998e202
2021-10-18Cleanup: spelling in commentsCampbell Barton
2021-10-16Fix T92252: User after free when opening file after Blender startsCampbell Barton
Oversight in 6e4ab5b761b03b52177985ecbeb2c2f576159c74
2021-10-15Fix crash handling tool-keymap eventsCampbell Barton
There was a rare crash in WM_event_get_keymap_from_toolsystem_fallback when wm->winactive was NULL. This could happen when the event was handled immediately after closing a window.
2021-10-15Fix is_repeat being set for in between mouse-move eventsCampbell Barton
2021-10-15Fix crash using menu search without an active areaCampbell Barton
2021-10-15Cleanup: use const for context argumentCampbell Barton
2021-10-12Cleanup: Typo in comment.Bastien Montagne
2021-10-12WindowManager: Keep track or the source library when appending.Jeroen Bakker
Keep track of the source library allowing other parts of the code to to make better decisions. This is needed to localize external files. In this case the file paths are updated when `making local`. But we should decide based on the source library if we want to copy the file relative to the new blend file. See D12423. Reviewed By: mont29, Severin Differential Revision: https://developer.blender.org/D12765
2021-10-12XR Controller Support Step 3: XR EventsPeter Kim
Integrates XR input actions with the WM event system. With this commit, all VR action functionality (operator execution, pose querying, haptic application), with the exception of custom drawing, is enabled. By itself, this does not bring about any changes for regular users, however it is necessary for the upcoming VR add-on update that will expose default controller actions to users. For add-on developers, this updates the Python API with access to XR event data (input states, controller poses, etc.), which can be obtained via the "xr" property added to the bpy.types.Event struct. For XR events, this property will be non-null and the event will have the type XR_ACTION. Further details: XR-type window events are queued to the regular window queues after updating and interpreting VR action states. An appropriate window is found by either using the window the VR session was started in or a fallback option. When handling XR events, mouse-specific processing is skipped and instead a dedicated XR offscreen area and region (see 08511b1c3de0) is used to execute XR event operators in the proper context. Reviewed By: Severin Differential Revision: https://developer.blender.org/D10944
2021-10-08WM: always reset message-bus on file loadCampbell Barton
Previously this was only happening when "Load UI" was enabled, making it difficult for Python script authors to know when re-registering subscribers was needed.
2021-10-07Fix screenshot editor showing status text in the editorCampbell Barton
This caused problems calling screenshot from menu-search which included the status text in the screenshot. Now the status text is shown in the global status bar for any operators called from a screen context.
2021-10-06Gizmo: remove wmGizmoGroup.use_fallback_keymapCampbell Barton
This ended up being a copy of: `toolsettings->workspace_tool_type == SCE_WORKSPACE_TOOL_FALLBACK` requiring boiler plate assignment in gizmos refresh callbacks. Remove this struct member and check `toolsettings->workspace_tool_type` directly, since so far there has been no advantage in gizmo-groups being able to control this themselves.
2021-10-06Keymap: ignore the fallback keymap when "Active Tool" is setCampbell Barton
Resolve regression in c9d9bfa84ad5cb985e3feccffa702b2f3cc2adf8, which added support for tools to be tagged as using a fallback too. In these cases the "Active Tool" setting was ignored and the fallback tool would be used (the spin tool would box select for example).
2021-10-06Fix handling of overrides during append.Bastien Montagne
Liboverride references need a special handling during append, since those pointers should never be made local, nor reampped to newly localized data. And liboverride references should never be directly made local either, to ensure their liboverride usages remain pointing to linked data and not local one. Issue was reported by the studio, and also probably as part of T91892.
2021-10-06Cleanup: rename BKE_font.h -> BKE_vfont.hCampbell Barton
Match API naming prefix (BKE_vfont_*) and DNA_vfont_types.h.
2021-10-06Cleanup: spelling in commentsCampbell Barton
2021-10-05Fix T86379: When using "Append" not handling properly RigidBody constraintsBastien Montagne
This was simply never handled apparently. Also fixes a regression from recent append refactor that prevented RB objects to to properly handled too (since we instantiate loose objects in append step now, we need to handle RigidBody ones after that instantiation stage, otherwise nothing will happen since loose objects won't be in any scene).
2021-10-05XR: Add runtime window area for XR eventsPeter Kim
This adds an offscreen View3D window area for the VR view in order to execute XR events/operators in the proper context. The area is created as runtime data before XR events are dispatched and set as the active area during XR event handling. Since the area is runtime-only, it will not be saved in files and since the area is offscreen, it will not interfere with regular window areas. The area is removed with the rest of the XR runtime data on exit, file read, or when stopping the VR session. Note: This also adds internal types (EVT_DATA_XR, EVT_XR_ACTION) and structs (wmXrActionData) for XR events. Reviewed By: Severin Differential Revision: https://developer.blender.org/D12472
2021-10-04Keymap: print more verbose output for --debug-handlersCampbell Barton
Include the short-cut text and the operator properties to make it easier to track down the key-map item source that matched the event.
2021-10-04Asset Browser: Support dragging assets into catalogsJulian Eisel
With this it is possible to select any number of assets in the Asset Browser and drag them into catalogs. The assets will be moved to that catalog then. However, this will only work in the "Current File" asset library, since that is the only library that allows changing assets, which is what's done here. While dragging assets over the tree row, a tooltip is shown explaining what's going to happen. In preparation to this, the new UI tree-view API was already extended with custom drop support, see 4ee2d9df428d. ---- Changes here to the `wmDrag` code were needed to support dragging multiple assets. Some of it is considered temporary because a) a proper #AssetHandle design should replace some ugly parts of this patch and b) the multi-item support in `wmDrag` isn't that great yet. The entire API will have to be written anyway (see D4071). Maniphest Tasks: T91573 Differential Revision: https://developer.blender.org/D12713 Reviewed by: Sybren Stüvel
2021-10-01Fix T91834: Appending objects with shape keys into new file is broken.Bastien Montagne
Recent append refactor 'broke' this, we need special recursive care and handling of those nasty shpae keys... again.
2021-09-30Fix possible use-after-free in drag-drop handling logicJulian Eisel
Would happen when there were multiple drag items in parallel. There was a listbase constructed with twice the same item, even though that item would be deleted after it was handled the first time.
2021-09-29Fix T89864: Adding an asset referencing other objects adds it to scene but ↵Bastien Montagne
only adds data-blocks of referenced objects. Link/append code needs proper access to scene/view3d data to handle collections/objects instantiation. Note that this is a temporary hack more than a proper fix, which would require a deeper redesign of drag&drop code. Also note that this will not handle 'properly' (i.e. as user would expect it) cases like implicitely appended parent objects, in that only the explicitely appended object will be dropped to the nes location, the others will remain at their original coordinates. Differential Revision: https://developer.blender.org/D12696
2021-09-29Assets: Expose option to reuse data-block data when appendingJulian Eisel
With 794c2828af60 & f48a4aa0f915 it's possible to reuse possibly expensive, nested data of a data-block when appending. E.g. the texture of a material, or the mesh of an object. Without this it's easy to bloat memory and the file size. Duplicated textures also cause unnecessary shader recompilations. The feature was intended to be the new default behavior for the Asset Browser, but it wasn't actually added to the UI yet. This patch adds a new import type option to the Asset Browser. So from the menu in the header, you can now choose between: * Link * Append * Append (Reuse Data) The latter is the new default. Maniphest Task: https://developer.blender.org/T91741 Differential Revision: https://developer.blender.org/D12647 Reviewed by: Sybren Stüvel, Bastien Montagne
2021-09-28Cleanup: convert compositor nodes to c++Aaron Carlisle
- Many cleanups of to use list base - Some variable changes These change is needed to migrate to the new socket builder API Reviewed By: manzanilla Differential Revision: https://developer.blender.org/D12366
2021-09-28VSE: Implement sanity check for files with more channels than supportedDalai Felinto
This is a follow up to 8fecc2a8525467ee2fbbaae16ddbbc10b3050d46. This makes sure future .blend files that have more channels than the limit won't break Blender. It can be backported to LTS. This is part of https://developer.blender.org/D12645 Differential Revision: https://developer.blender.org/D12648
2021-09-27Fix two issues with recent new Append code.Bastien Montagne
* ID pointer returned by `wm_file_link_append_datablock_ex` was improperly extracted from `WMLinkAppendDataItem` before append step. * Code deleting linked IDs when their local matching version was re-used did not properly clear `LIB_TAG_DOIT` beforehand.
2021-09-24LibOverride: Deprecate Proxies: Add auto-conversion on file load.Bastien Montagne
This commit also add an experimental userPreferences to prevent proxies conversions on file load, and reporting for amount of coverted proxies (and possible issues). Note that potentially linked proxies from other libraries are not hamdled here (this feature seems to be broken anyway in master currently?).
2021-09-23WM: gestures now activate immediately on mouse pressCampbell Barton
Some gestures were activating immediately on tweak events, extend this to mouse-press and click-drag. Without this change, box-select for example wouldn't be automatically activated on mouse-press.
2021-09-23LibLink: Modify WM API to link/append one ID to take flag parameter.Bastien Montagne
There is no reason to lock behavior into a specific configuration in those calls, make them properly configurable like the rest of the link/append code. This also enable users of those functions to activate 'ID reuse' behavior.
2021-09-23LibLink Append: Expose 'reuse ID' through new BLO flag, and add basic tests.Bastien Montagne
Option is now available to append operator, alsthough hidden and disabled by default.
2021-09-23LibLink Append: Fix 'reused ID' case keeping linked data around.Bastien Montagne
When we re-use a local ID, we need to delete the matching linked data.
2021-09-23Cleanup: proper handling of `LIB_TAG_DOIT` in append code.Bastien Montagne
2021-09-23Append: Reuse local data: remove limitation on directly selected data.Bastien Montagne
in asset context, when user drag & drop a material several time, they would still expect to re-use existing one instead of getting new copies of it, even if this material is directly appended (and not an indirect dependency of an object e.g.).
2021-09-23Link/Append: Refactor flags.Bastien Montagne
Flags controlling link/append code are split between two enums, one in `DNA_space_types.h` and one in `BLO_readfile.h`. This commit: - Moves flags exclusively used in WM and BLO code to `eBLOLibLinkFlags` in `BLO_readfile.h`. Flags in `eFileSel_Params_Flag` from `DNA_space_types.h` are now only the ones effectively used by the file browser editor code too. - Fixes some internal utils in `readfile.c` still taking `short` flag parameter instead of proper `int` one. NOTE: there are a few other flags that could probably be moved to `eBLOLibLinkFlags` (at the very least `FILE_LINK`, probably also `FILE_AUTOSELECT` and `FILE_ACTIVE_COLLECTION`), since those are not effectively used by the file browser, and control linking/appending behavior, not filebrowser behavior. However for now think it's safer to not touch that.
2021-09-23Cleanup: spelling in commentsCampbell Barton
2021-09-22Initial implementation of local ID re-use when appending.Bastien Montagne
This commit adds to ID struct a new optional 'weak reference' to a linked ID (in the form of a blend file library path and full ID name). This can then be used on next append to try to find a matching local ID instead of re-making the linked data local again. Ref. T90545 NOTE: ID re-use will be disabled for regular append for the time being (3.0 release), and only used for assets. Therefore, this commit should not change anything user-wise. Differential Revision: https://developer.blender.org/D12545
2021-09-22Cleanup: spelling in commentsCampbell Barton
2021-09-21UI: Style drag-drop indicators as tooltipsPablo Vazquez
Currently, the drop indicator colors are hardcoded to white text on semi-transparent black background. This patch makes the drop indicator use the tooltip theme settings, as they serve a similar purpose. {F10530482, size=full} All built-in themes seem to work well and got improved readability. Reviewed By: HooglyBoogly Differential Revision: https://developer.blender.org/D12588
2021-09-21Cycles: merge of cycles-x branch, a major update to the rendererBrecht Van Lommel
This includes much improved GPU rendering performance, viewport interactivity, new shadow catcher, revamped sampling settings, subsurface scattering anisotropy, new GPU volume sampling, improved PMJ sampling pattern, and more. Some features have also been removed or changed, breaking backwards compatibility. Including the removal of the OpenCL backend, for which alternatives are under development. Release notes and code docs: https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Cycles https://wiki.blender.org/wiki/Source/Render/Cycles Credits: * Sergey Sharybin * Brecht Van Lommel * Patrick Mours (OptiX backend) * Christophe Hery (subsurface scattering anisotropy) * William Leeson (PMJ sampling pattern) * Alaska (various fixes and tweaks) * Thomas Dinges (various fixes) For the full commit history, see the cycles-x branch. This squashes together all the changes since intermediate changes would often fail building or tests. Ref T87839, T87837, T87836 Fixes T90734, T89353, T80267, T80267, T77185, T69800