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-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-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: 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.
2021-03-08readfile: add id_tag_extra argumentCampbell Barton
This allows adding ID tags when linking/loading data. This is needed to implement loading non 'G.main' ID data-blocks, see D10612.
2021-03-08Fix T86384: Click detection fails in some cases with modifiersCampbell Barton
Regression in b5d154f400e46ba322f0e08a231bb2557bf51a1e
2021-03-08Fix T86106: bpy.types.SpaceView3D.draw_handler_remove(...) causes Blender to ↵Germano Cavalcante
crash The handle of a drawing callback can be removed within the drawing function itself. This causes `var = (type)(((Link *)(var))->next` to read an invalid memory value in C.
2021-03-06Cleanup: rename wm_get_cursor_positionCampbell Barton
Match naming of other wm_cursor_position_* functions.
2021-03-06Cleanup: commentsCampbell Barton
2021-03-05Cleanup: remove redundant NULL window checks handling eventsCampbell Barton
2021-03-05Cleanup: Use boolean in WM_cursor_waitAntonio Vazquez
2021-03-05Cleanup: move check_drag & check_click out of wmEventCampbell Barton
These variables track the wmWindow.event_queue state, however they were used in a way that wasn't correct. - check_drag & check_click from wmWindow.eventstate were used to track the click/drag status of events handled in wmWindow.event_queue. - Event's in the queue read from wmEvent.check_drag. - Once a drag action was detected, wmWindow.eventstate.check_drag was disabled. Disabling drag in the event state would not change the drag state for values already in the event queue. Simplify logic by moving these values into the window, so there is one place these variables are tracked.
2021-03-05Cleanup: disambiguate 'queue' struct membersCampbell Barton
The term queue isn't very descruptive on it's own, use: - wmWindow.event_queue - wmWindowManager.notifier_queue
2021-03-05Cleanup: rename event to event_typeCampbell Barton
Reserve `event` for wmEvent.
2021-03-05Cleanup: rename variables in wm_event_add_ghosteventCampbell Barton
Using both evt and event together was confusing. Renamed: - event_state <- evt - event_state_other <- oevt - event_other <- oevent - win_other <- owin
2021-03-04Cleanup: Main `foreach ID` code: Remove `MAX_LIBARRAY` and improve comments.Bastien Montagne
The `MAX_LIBARRAY` define was an annoying doublon to the `INDEX_ID_MAX` enum value now defined in `DNA_ID.h`, and it is no more useful. And comments were somewhat outdated. Also added an explanation about chosen order for the `INDEX_ID_<IDTYPE>` order.
2021-03-04Fix Saving startup file changing paths of the current fileCampbell Barton
Saving the startup file now uses "Save Copy", so paths are preserved.
2021-03-04Fix T86231: Saving startup file always remaps relativeCampbell Barton
2021-03-04Cleanup: number literalsCampbell Barton
2021-03-02UI: Clean up labels and descriptions: "Draw" to "Display"William Reynish
In Blender, we used to use the term 'draw' to refer to information displayed to the user. For version 2.80, it was decided to change these instances to 'display' instead. This was to avoid the ambiguity between end-user drawing tools and display options. From the Oxford English Dictionary: - Draw: produce (a picture or diagram) by making lines and marks on paper with a pencil, pen, etc. - Display: show (data or an image) on a computer, television, or other screen. Therefore, we should use draw when referring to drawing tools for making marks, but use display when referring to information shown/displayed to the user. From a user POV, the computer displays certain information, whereas the user draws a mark. Apparently this change was not implemented consistently, so this patch changes all remaining relevant instances of "draw". Differential Revision: https://developer.blender.org/D10551
2021-03-02Fix click-drag regression in fix for T86116Campbell Barton
1638af109e46522a1a24645289016922bb9ca977 & bfc70a6a958b9c35bde765ea8a02e8b1fd36db8b caused a regression with click-drag (not tweak which has it's own logic). Restore some changes from these commits with added comments. Minor changes from previous functionality from 39919e35326c732141bfd2d740b19000b6bc1d51. - `prevval` & `prevtype` are now set for all kinds of new events in the queue previously this was not done for some kinds of events (mouse wheel, ndof - for example). - Set `prevval` & `prevtype` for other windows for mouse buttons.
2021-03-02WM: log errors when wmWindow.eventstate values are invalidCampbell Barton
Ensure they're working as documented (only for debug builds).
2021-03-02WM: window.event_simulate now sets previous values properlyCampbell Barton
Match wm_event_add_ghostevent behavior for setting previous values.
2021-03-02WM: use wmEvent.is_repeat instead of previous event checksCampbell Barton
This check was added before is_repeat was supported, use this variable instead since it's more a more reliable way of detecting held keys. Also remove outdated comment.
2021-03-01Cleanup: Use LISTBASE_FOREACH and LISTBASE_FOREACH_MUTABLE macroGermano Cavalcante
2021-03-01Fix T86116: Failure to detect click events with modifier heldCampbell Barton
Click detection logic relied on the event queue not accumulating events as newly added events at the end of the queue adjusted `wm->eventstate->prev{val/type}` which was then compared with events at the front of the queue. This made Ctrl-Click fail to detect the click as releasing Ctrl set the previous value before the previous event was handled. In practice this only happened in heavy scenes, updating 10 fps or lower. It also made automated tests fail that accumulate events before handling them.
2021-03-01WM: set previous values for events in the event queueCampbell Barton
This makes event's prevval and prevtype usable for events in the queue. Previously they were unused, except as a hack for modal keymap handling. This is needed to fix T86116, where the `wm->eventstate->prev{val/type}` are set to values from events that have not been processed.
2021-03-01WM: prevent model keymap handling overwriting previous event valuesCampbell Barton
`wmEvent.prevtype` & `wmEvent.prevval` were overwritten when used in modal keymaps. Now they are restored to their original values.
2021-03-01Cleanup: move logic to copy the previous event state to a functionCampbell Barton
2021-03-01Cleanup: minor change to click detection checksCampbell Barton
Change order of checks for more convenient click-detection debugging.
2021-03-01WM: don't set event prevval/prevtype on cursor motionCampbell Barton
Currently the intended behavior regarding prevval/prevtype isn't handled consistently. However, including cursor motion causes events in `wm->queue` and `wm->eventstate` to behave differently, where `wm->eventstate` ignores motion (necessary for click detection). This makes checks from `wm->eventstate` to events in the queue fail. This reverts 39919e35326c732141bfd2d740b19000b6bc1d51, using the `event.type` instead of it's previous type. This works as it includes mouse button release events.