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-12-16WM: various changes to file writing behaviorCampbell Barton
Saving with only a filename (from Python) wasn't being prevented, while it would successfully write the file to the working-directory, path remapping and setting relative paths wouldn't work afterwards as `Main.filepath` would have no directory component. Disallow this since it's a corner case which only ever occurs when path names without any directories are used from Python, the overhead of expanding the working-directory for all data saving operations isn't worthwhile. The following changes have been made: - bpy.ops.wm.save_mainfile() without a filepath argument fails & reports and error when the file hasn't been saved. Previously it would write to "untitled.blend" and set the `G.main->filepath` to this as well. - bpy.ops.wm.save_mainfile(filepath="untitled.blend") fails & reports and error as the filename has no directory component. - `BLI_path_is_abs_from_cwd` was added to check if the path would attempt to expand to the CWD.
2021-12-16Cleanup: simplify file saving logicCampbell Barton
Revert part of the fix from 073669dd8588a3b80dfffee98b4f239b4baee8c8 that initialized the file-path on first save as it's no longer needed. Also remove relbase argument to BLI_path_normalize as the destination file paths shouldn't use relative locations.
2021-12-16Remove G.relbase_validCampbell Barton
In almost all cases there is no difference between `G.relbase_valid` and checking `G.main->filepath` isn't an empty string. In many places a non-empty string is already being used instead of `G.relbase_valid`. The only situation where this was needed was when saving from `wm_file_write` where they temporarily became out of sync. This has been replaced by adding a new member to `BlendFileWriteParams` to account for saving an unsaved file for the first time. Reviewed By: brecht Ref D13564
2021-12-15Fix T93949: Preview Image Error When No ScreenHarley Acheson
Fix an error if "File Preview Type" is "Auto" and there is no screen. See D13574 for details. Differential Revision: https://developer.blender.org/D13574 Reviewed by Julian Eisel
2021-12-14Fix possible use-after-free on error handling during VR view drawingJulian Eisel
Whenever an exception happens in VR session code, we cancel the entire session. Alongside that, we removed the "surface" item used to draw into an offscreen context. This would mess up the iterator of the surface draw loop. Similar to 7afd84df409a.
2021-12-14Fix null-pointer dereference on error handling during VR view drawingJulian Eisel
2021-12-14Fix possible use-after-free on error handling during VR view drawingJulian Eisel
Whenever an exception happens in VR session code, we cancel the entire session. Alongside that, we removed the "surface" item used to draw into an offscreen context. But this may still be stored as active surface, leading to a use-after-free when deactivating this active surface, for example.
2021-12-14Fix T93649: Blender freezes when saving with active VR sessionJulian Eisel
Dead-lock when VR viewport drawing and depsgraph updates would fight for the draw-manager GL lock. This didn't usually cause issues because the depsgraph would be evaluated at this point already, except in rare exceptions like after file writing. Fix this by ensuring the XR surface gets its depsgraph updated after handling notifiers, which is where regular windows also do the depsgraph updating.
2021-12-14Cleanup: consistent naming for the blender file nameCampbell Barton
2021-12-14Cleanup: use typed enum for wmDrag.flagsCampbell Barton
Also use 'e' prefix for enum type name.
2021-12-14Cleanup: resolve parameter mis-matches in doc-stringsCampbell Barton
Renamed or removed parameters which no longer exist.
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-14Remove G.save_overCampbell Barton
The difference between G.save_over and G.relbase_valid was minor. There is one change in functionality. When saving the default-startup file from an already loaded blend file - future save actions will continue to write to the originally loaded file instead of prompting the user to select a location to save the file. This change makes saving the startup file behave the same way "Save a Copy" does. Reviewed By: brecht Ref D13556
2021-12-13Cleanup: spelling in commentsCampbell Barton
Also move notes about where noise functions come from into the function body as it's not relavant to the public doc-string.
2021-12-13Cleanup: use "filepath" term for Main, BlendFileData & FileGlobalCampbell Barton
Use "filepath" which is the current convention for naming full paths. - Main use "name" which isn't obviously a file path. - BlendFileData & FileGlobal used "filename" which is often used for the name component of a path (without the directory).
2021-12-09Fix incorrect copying of XR action map itemsPeter Kim
After using MEM_dupallocN() on the original item, the bindings ListBase for the new item needs to be cleared and each binding copied separately.
2021-12-08Cleanup: move public doc-strings into headers for 'windowmanager'Campbell Barton
Ref T92709
2021-11-30Cleanup: capitalize NOTE tagCampbell Barton
2021-11-30Cleanup: spelling in comments & stringsCampbell Barton
2021-11-29Refactor BKE_bpath module.Bastien Montagne
The main goal of this refactor is to make BPath module use `IDTypeInfo`, and move each ID-specific part of the `foreach_path` looper into their own IDTypeInfo struct, using a new `foreach_path` callback. Additionally, following improvements/cleanups are included: * Attempt to get better, more consistent namings. ** In particular, move from `path_visitor` to more standard `foreach_path`. * Update and extend documentation. ** API doc was moved to header, according to recent discussions on this topic. * Remove `BKE_bpath_relocate_visitor` from API, this is specific callback that belongs in `lib_id.c` user code. NOTE: This commit is expected to be 100% non-behavioral-change. This implies that several potential further changes were only noted as comments (like using a more generic solution for `lib_id_library_local_paths`, addressing inconsistencies like path of packed libraries always being skipped, regardless of the `BKE_BPATH_FOREACH_PATH_SKIP_PACKED` `eBPathForeachFlag` flag value, etc.). NOTE: basic unittests were added to master already in rBdcc500e5a265093bc9cc. Reviewed By: brecht Differential Revision: https://developer.blender.org/D13381
2021-11-24Assets: Sanitize threaded preview creation with undoJulian Eisel
Basically, this fixes disappearing previews when editing asset metadata or performing undo/redo actions. The preview generation in a background job will eventually modify ID data, but the undo push was done prior to that. So obviously, an undo then would mean the preview is lost. This patch makes it so undo/redo will regenerate the preview, if the preview rendering was invoked but not finished in the undone/redone state. The preview flag PRV_UNFINISHED wasn't entirely what we needed. So I had to change it to a slightly different flag, with different semantics.
2021-11-24Cleanup: `IDTypeInfo` new `asset_type_info` member.Bastien Montagne
Two issues addressed here: I) `asset_type_info` is sub-data, not a callback. Therefore, move it before the callbacks in the `IDTypeInfo` struct. II) More important, initialize this new attribute in *ALL* `IDTypeInfo` instances. No member of this struct should ever be left implicitely uninitilazed, ever. Aftermath of rBa84f1c02d251.
2021-11-23Merge remote-tracking branch 'origin/blender-v3.0-release'Sybren A. Stüvel
2021-11-23Asset Browser: add operator for installing asset bundlesSybren A. Stüvel
Add an operator "Copy to Asset Library" for installing asset bundles into already-existing asset libraries. The operator is shown when: - the "Current File" library is selected, - the blend file name matches `*_bundle.blend`, and - the file is not already located in an asset library. The user can select a target asset library, then gets a "Save As" dialogue box to select where in that library the file should be saved. This allows for renaming, saving in a subdirectory, etc. The Asset Catalogs from the asset bundle are merged into the target asset library. The operator will refuse to run when external files are referenced. This is not done in its poll function, as it's quite an extensive operator (it loops over all ID datablocks). Reviewed by: Severin Differential Revision: https://developer.blender.org/D13312
2021-11-23BKE link/append: Add optional blendfile handle to libraries.Bastien Montagne
This enables calling code to deal with the blendfile handle themselves, BKE_blendfile_link then just borrows, uses this handle and does not release it. Needed e.g. for python's libcontext system to use new BKE_blendfile_link_append code. Part of T91414: Unify link/append between WM operators and BPY context manager API, and cleanup usages of `BKE_library_make_local`.
2021-11-22BKE Link/Append: Use BLO's LibraryLink_Params.Bastien Montagne
This allows to reduce signature of several functions, and make it eaiser to integrate more higher-level usages later on. This should be a non-behavioral-change commit. Part of T91414: Unify link/append between WM operators and BPY context manager API, and cleanup usages of `BKE_library_make_local`.
2021-11-22Link/Append: Move most of core link/append code from WM to new ↵Bastien Montagne
`BKE_blendflie_link_append` module. This will allow to expose all those advanced features of the WM operators to other parts of the code, like the python library context manager, copy/paste code, etc. This is expected to be a strictly no-behavioral-change commit. Part of T91414: Unify link/append between WM operators and BPY context manager API, and cleanup usages of `BKE_library_make_local`. Maniphest Tasks: T91414 Differential Revision: https://developer.blender.org/D13222
2021-11-18Revert fixesGermano Cavalcante
2021-11-18Revert "Revert "Revert "Revert "Allow navigating while transforming""""Germano Cavalcante
This reverts commit 717a971035071d36af03d65713408f4da1f69cb3.
2021-11-18Revert "Revert "Revert "Allow navigating while transforming"""Germano Cavalcante
This reverts commit 2a9cfdac7e126e37afb82e15a131717041f3d2f8.
2021-11-18Revert "Revert "Allow navigating while transforming""Germano Cavalcante
This reverts commit 5e6fdaa07fff907e02b36813ccde0702bad4fb4d.
2021-11-18Revert "Allow navigating while transforming"Germano Cavalcante
This reverts commit 1d1855e95f916685fed970904fc37701a4a0e031.
2021-11-18Allow navigating while transformingGermano Cavalcante
This feature has been desired for some time: - https://rightclickselect.com/p/ui/Tqbbbc/allow-navigating-while-transforming (See comments); - D1583; - T37427; In short, blocking navigation during transform limits the user to move the object only to visible areas within the screen and hinders the allocation of objects within closed meshes. The node editor is also impaired because some nodes are far between them and the connectors are too small. The only disadvantage of this patch (as I see it) is the conflict with the existing key map: MIDDLEMOUSE: - enable axis constrain in 3D view; WHEELDOWNMOUSE, WHEELUPMOUSE, PAGEUPKEY, PAGEDOWNKEY: - change the threshold of the proportional edit; So the patch solution was to change these keymaps: - MIDDLEMOUSE to Alt+MIDDLEMOUSE; - WHEELDOWNMOUSE, WHEELUPMOUSE, PAGEUPKEY, PAGEDOWNKEY to Alt+(corresponding key); When you use this new keymap for the first time in the proportional edit, it may seem strange due to the custom of using it (both in View2D and View3D). But quickly the user gets used to it. Alternatively we can add an option to the user preferences ([] Allow navigating while transforming). (I'm not much fan of this option). The patch was done on branch2.8. But maybe it's a good idea to apply it to 2.79 Differential Revision: https://developer.blender.org/D2624
2021-11-18Merge branch 'blender-v3.0-release'Julian Eisel
2021-11-18Fix asset preview not showing up for current file data-blocksJulian Eisel
For data-blocks from the current file, the image-buffer for dragging wasn't set at all. This wasn't intentional, dragging things in the Asset Browser should just always show the preview.
2021-11-16Merge branch 'blender-v3.0-release'Julian Eisel
2021-11-16UI: Fix hard to read text for drag disabled hintsJulian Eisel
In 499dbb626acb, the background color of drag tooltips were changed so text becomes more readable. But multiple people were touching the same code, so the disabled hint tooltips didn't get the same tweak. They would benefit from them even more, since the red text is even harder to read on the transparent background than the regular, white text.
2021-11-13BLF: Use Floats for Font Point SizesHarley Acheson
Allow the use of floating-point values for font point sizes, which allows greater precision and flexibility for text output. See D8960 for more information, details, and justification. Differential Revision: https://developer.blender.org/D8960 Reviewed by Campbell Barton
2021-11-13Cleanup: spelling in comments, comment block formattingCampbell Barton
2021-11-12Cleanup: Move remaning node editor files to C++Hans Goudey
Differential Revision: https://developer.blender.org/D13200
2021-11-12Merge branch 'blender-v3.0-release'Campbell Barton
2021-11-12Merge branch 'blender-v3.0-release'Campbell Barton
2021-11-12Fix crash saving blend files in background modeCampbell Barton
Reading the windows pixels was attempted in background mode.
2021-11-12Cleanup: use term sequence_strip instead of vse_stripCampbell Barton
2021-11-09Fix T92704: Redrawing while saving crashes outside the main threadJeducious
If the blend file is saved from a script in another thread, like the render thread for example, Blender will crash on the call that redraws the UI. Ref D13140
2021-11-09Fix T92704: Redrawing while saving crashes outside the main threadJeducious
If the blend file is saved from a script in another thread, like the render thread for example, Blender will crash on the call that redraws the UI. Ref D13140
2021-11-05Merge branch 'blender-v3.0-release'Bastien Montagne
2021-11-05Fix potential uninitialized memory in link/append code.Bastien Montagne
2021-11-05Cleanup (UI): Add/use type for operator context enumJulian Eisel
Adds a `wmOperatorCallContext` typedef for the existing `WM_OP_XXX` operator context enum. This adds type safety, allows the compiler to produce better warnings and helps understanding what a variable is for. Differential Revision: https://developer.blender.org/D13113 Reviewed by: Campbell Barton
2021-11-05Merge branch 'blender-v3.0-release'Campbell Barton