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-04-25Revert "Info Editor: move to c++"Ray Molenkamp
This reverts commit 9cce18a5858cb93da626f5f0fd7e09cd66637e05. rB9cce18a5858c broke the build in unforeseen ways, not easily fixable. revert for now, so master will at least build again.
2021-04-24Info Editor: move to c++Jacques Lucke
I'm currently doing some experiments in the info editor and for that it is easier if the info editor is in c++ already.
2021-04-24Merge branch 'blender-v2.93-release'Campbell Barton
2021-04-24Fix T85567: Crash accessing gizmo group on `__del__`Campbell Barton
- Re-order freeing so an instances __del__ method runs before the `ExtensionRNA` has been freed. - "remove" functions no longer free the gizmo/gizmo-group memory, needed so the identifier used when freeing the extension doesn't use the freed identifier.
2021-04-23Cleanup: clang-formatCampbell Barton
2021-04-23Fix T86566: Do Not Close if File Cannot Be SavedHarley Acheson
If saving a file using CloseSave dialog, do not close if there is an error doing so, like if read-only. Differential Revision: https://developer.blender.org/D10722 Reviewed by Julian Eisel
2021-04-21UI: Use proper close file dialog for "Restore Last Session"Julian Eisel
Was showing a simple confirm dialog, even if the file didn't contain unsaved changes. The confirm dialog would also show up when choosing "Restore Last Session" from the splash screen right after startup, which is weird. Instead show the proper file closing dialog that allows saving, but only if there are actually unsaved changes.
2021-04-21Cleanup: Deduplicate file closing dialog logicJulian Eisel
Was doing almost the same thing in two places, plus I need the same for a third case. So better have a helper function for it.
2021-04-21Cleanup: Create/use types for generic WM callbacksJulian Eisel
Makes it less of a hassle to pass these callbacks around as function arguments, and deduplicates their signature when doing so.
2021-04-20Cleanup: add CTX_wm_operator_poll_msg_clearCampbell Barton
Call this function instead of `CTX_wm_operator_poll_msg_set(C, NULL)`
2021-04-19Fix drag event leaving the gizmo not under the cursor highlightedCampbell Barton
Prevent drag events from changing the highlighted gizmo unless the drag event activates the gizmo. This resolves a glitch where testing a drag event would highlight at the point the drag was initiated even when the event was not handled.
2021-04-19Cleanup: re-order gizmo handling checksCampbell Barton
Non-functional change in preparation for fix.
2021-04-19Fix spin-gizmo button tool-tip placementCampbell Barton
gizmo_button2d_bounds result wasn't valid when the gizmo was part of a 3D gizmo group. Regression in cf6d17a6aa421e0038fc1f8e60e3f1f708887c3e
2021-04-16Fix missing owner_id values from 919558854d624f5db40acfa9f5674ac8c94873b6Campbell Barton
This prevented dynamic enum callbacks being called.
2021-04-16WM: remove redundant click-drag offset for gizmo highlight checkingCampbell Barton
Tweak and click-drag events already apply this offset, this was a no-op.
2021-04-16WM: prevent drag events being continually testedCampbell Barton
Click-drag events that weren't handled would continually be tested for each mouse-motion event. As well as being redundant, this added the overhead of querying gizmos twice per motion event. Now click-drag is only tested once when the drag threshold is reached. This mitigates T87511, although the single drag test still causes the snap gizmo to flicker.
2021-04-16Fix T65064: Keymaps items controlling dynamic enums fail to exportCampbell Barton
Keymap UI and import/export could depend on the current context for dynamic enum's. Use STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID for OperatorProperties.
2021-04-13Cleanup: redundant struct declarationsCampbell Barton
2021-04-13Fix snap gizmo flickering while draggingCampbell Barton
Ignore click-drag for non-mouse button drag events Alternative to fix issue detailed in D10886.
2021-04-11Cleanup: use ELEM, STREQ macrosCampbell Barton
2021-03-30Cleanup/Refactor: Unify functions that redraw the depth bufferGermano Cavalcante
Now `ED_view3d_backbuf_depth_validate`, `ED_view3d_draw_depth` and `ED_view3d_draw_depth_gpencil` are unified in `ED_view3d_depth_override`. This new function replaces `ED_view3d_autodist_init`. Also, since `ED_view3d_depth_update` depends on the render context, and changing the context is a slow operation, that function also was removed, and the depth buffer cached is now updated inside the new unified drawing function when the "bool update_cache" parameter is true. Finally `V3D_INVALID_BACKBUF` flag has been renamed and moved to `runtime.flag`. Differential revision: https://developer.blender.org/D10678
2021-03-24Cleanup: remove stdio.h header from MEM_guardedalloc.hCampbell Barton
This was included for `FILE *` which isn't used in the header. Ref D10799
2021-03-24Cleanup: use new BLI_assert_unreachable macroCampbell Barton
2021-03-18Fix missing view3d updates after recent NC_SPACE notifier filtersPhilipp Oeser
Since {rB46aa70cb486d}, using `NC_SPACE | ND_SPACE_VIEW3D` as notifier is restricted to space data as a reference. This was still used though for RNA updates in other places (namely `rna_camera`, `rna_scene`, `rna_animviz`), and passing NULL would automatically set the notifier reference to the owner id. Above commit would happily filter these out, leading to missing refreshes. Now use more specific notifiers (in case of animviz a new `ND_DRAW_ANIMVIZ` was added). This was reported for Camera background images btw. Fixes T86670. Maniphest Tasks: T86670 Differential Revision: https://developer.blender.org/D10758
2021-03-18Cleanup: spellingCampbell Barton
2021-03-17Nodes: Add support to mute node wiresCharlie Jolly
This patch adds the ability to mute individual wires in the node editor. This is invoked like the cut links operator but with a new shortcut. Mute = Ctrl + Alt Cut = Ctrl Dragging over wires will toggle the mute state for that wire. The muted wires are drawn in red with a bar across the center. Red is used in the nodes context to indicate invalid links, muted links and internal links. When a wire is muted it exposes the original node buttons which are normally hidden when a wire is connected. Downstream and upstream links connected using reroute nodes are also muted. Outside scope of patch: - Add support for pynodes e.g. Animation Nodes - Requires minor change to check for muted links using the `is_muted` link property or the `is_linked` socket property. Maniphest Tasks: T52659 Differential Revision: https://developer.blender.org/D2807
2021-03-17Bugfix: properly rename Null audio device to NoneJörg Müller
2021-03-17Audaspace: porting minor improvements from upstreamJörg Müller
- NullDevice is now called None - Automatic choice of best available device. - Minor formatting, documentation and cmake fixes.
2021-03-16Grease Pencil: Add LineArt modifierYimingWu
This adds the LineArt grease pencil modifier. It takes objects or collections as input and generates various grease pencil lines from these objects with the help of the active scene camera. For example it can generate contour lines, intersection lines and crease lines to name a few. This is really useful as artists can then use 3D meshes to automatically generate grease pencil lines for characters, enviroments or other visualization purposes. These lines can then be baked and edited as regular grease pencil lines. Reviewed By: Sebastian Parborg, Antonio Vazquez, Matias Mendiola Differential Revision: http://developer.blender.org/D8758
2021-03-15Fix regression with modal operator file load checkCampbell Barton
As of 2cc5af9c553cfc00b7d4616445ad954597a92d94, checking the window managers pointer for changes is no longer a valid way to check a file has been loaded.
2021-03-15WM: fallback to regular writing if auto-save can't access undo dataCampbell Barton
While this is very unlikely, always write the autosave file, even if the `memfile` undo data is unexpectedly NULL. Also use CLG for logging warnings.
2021-03-15Cleanup: refactor auto-save timer usageCampbell Barton
- Split out auto-save file writing from timer code. - Add wm_autosave_timer_begin so there are both begin & end functions. - Replace WM_event_add_timer/WM_event_remove_timer with begin/end calls.
2021-03-15Cleanup: remove unused auto-save read functionCampbell Barton
Also make wm_autosave_location a static function.
2021-03-15Cleanup: replace 'timer_ended' with 'timer_end'Campbell Barton
The previous naming made it seem as if the timer had already ended where as this function ends the timers.
2021-03-15Writefile: only include recovery info in auto-save & quit.blendCampbell Barton
Previously all blend files included the path they were saved, causing files distributed publicly to include users local paths. This also included developers home directories for startup & userprefs defaults & app-templates bundled with Blender. Now recovery information is only written for auto-save & quit.blend since this is the only time they're intended to be used.
2021-03-15Cleanup: rename G_FILE_RECOVER -> G_FILE_RECOVER_READCampbell Barton
No functional changes, make room for a write equivalent.
2021-03-15Cleanup: update comments, remove ifdef'd codeCampbell Barton
2021-03-14Cleanup: remove unused "Gizmo" & "Header" keymapsCampbell Barton
2021-03-14Cleanup: use explicit check for WM_KEYMAP_UPDATE_RECONFIGURECampbell Barton
A block of code ran when `wm_keymap_update_flag` was non-zero, replace this with explicit flag check since it wasn't immediately obvious which flag needed to be set.
2021-03-14WM: support loading keymaps in background modeCampbell Barton
While this still isn't done by default on startup, activating a key-config will load it as expected. Needed to perform key-map loading tests in background mode.
2021-03-12Cleanup: set the window manager to the updated context on loadCampbell Barton
While this happened to be corrected by code that runs afterwards, leaving this in an invalid state could cause problems in the future.
2021-03-11Fix missing UI updates, caused by own earlier commitJulian Eisel
Caused by 46aa70cb486d. RNA would send property update notifiers with the owner ID as `reference` data. Since above's commit we'd only send the notifiers to editors if the reference data address matches the space's address. So editors wouldn't get the notifiers at all. The owner ID for space properties is always the screen AFAIK. So allow notifiers with the screen as reference to be passed to editors as well, think this is reasonable to do either way. For example, steps to reproduce were: * Open Asset Browser * Mark some data-blocks of different types as assets (e.g. object & its material) * Switch between the categories in the Asset Browser. The asset list wouldn't be updated.
2021-03-11UI: Avoid unnecessary redraws of unrelated editors on space changesJulian Eisel
When adding a notifier, `reference` data can be passed. The notifier system uses this to filter out listeners, for example if data of a scene changes, windows showing a different scene won't get the notifiers sent to their listeners. For the `NC_SPACE` notifiers, a number of places also passed the space as `reference`, but that wasn't used at all. The notifier would still be sent to all listeners in all windows (and the listeners didn't use it either). Causing some unnecessary updates (e.g. see ed2c4825d3e2344). With this commit, passing a space will make sure the notifier is only sent to that exact space. Some code seems to already have expected that to be the case. However there were some cases that passed the space as `reference` without reason, which would break with this commit (meaning they wouldn't redraw or update correctly). Corrected these so they don't pass the space anymore.
2021-03-11Fix regression in 2cc5af9c553cfc00b7d4616445ad954597a92d94Campbell Barton
The check for undo-depth increment/decrement assumed a newly loaded window manager would have a different pointer. This broke bl_animation_fcurves test indirectly, the change to undo-depth caused the redo panel to attempt to popup in background mode - which isn't supported. Now the pointer is unchanged, the undo-depth is assumed to match the value used when calling the operator. The undo-depth is now properly maintained between file loads, which is an improvement on the original behavior which reset it.
2021-03-11Cleanup: spellingCampbell Barton
2021-03-11Fix T86431: Keep memory location of the window manager on file loadCampbell Barton
Keep the pointer location from the initial window-manager between file load operations. This is needed as the Python API may hold references to keymaps for e.g. which are transferred to the newly loaded window manager, without their `PointerRNA.owner_id` fields being updated. Since there is only ever one window manager, keep the memory at the same location so the Python ID pointers stay valid. Reviewed By: mont29 Ref D10690
2021-03-11WM: keep the current state when a blend fails to loadCampbell Barton
Previously many operations would run on file load, even if the file did not load. Pre/post load handlers were called, timers canceled, all undo data freed, editors exited ... etc. Now keep the blend file in it's current state. This simplifies updating this area of code as there is one less possible situation to account for.
2021-03-11Cleanup: split file read and setup into separate stepsCampbell Barton
Currently file loading performs almost all reloading logic even in the case loading the file fails, causing the file to be in a state that isn't well defined: undo is cleared, timers are canceled & scripts are re-registered.
2021-03-11Cleanup: file loading/recover checksCampbell Barton
- Don't set G.relbase_valid until the file is loaded. - Remove unnecessary string pointer comparison. - Remove unused filename being passed to 'setup_app_data'.
2021-03-11Cleanup: Typos in comments (window-manager files)Julian Eisel
Typos from a509e79a4c77. Looks like issues with an automated cleanup tool.