Age | Commit message (Collapse) | Author |
|
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
|
|
|
|
- NullDevice is now called None
- Automatic choice of best available device.
- Minor formatting, documentation and cmake fixes.
|
|
As of 2cc5af9c553cfc00b7d4616445ad954597a92d94, checking the window
managers pointer for changes is no longer a valid way
to check a file has been loaded.
|
|
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.
|
|
- 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.
|
|
Also make wm_autosave_location a static function.
|
|
The previous naming made it seem as if the timer had already ended
where as this function ends the timers.
|
|
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.
|
|
No functional changes, make room for a write equivalent.
|
|
|
|
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.
|
|
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.
|
|
While this happened to be corrected by code that runs afterwards,
leaving this in an invalid state could cause problems in the future.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
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
|
|
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.
|
|
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.
|
|
- 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'.
|
|
Typos from a509e79a4c77. Looks like issues with an automated cleanup tool.
|
|
This allows adding ID tags when linking/loading data.
This is needed to implement loading non 'G.main' ID data-blocks,
see D10612.
|
|
Regression in b5d154f400e46ba322f0e08a231bb2557bf51a1e
|
|
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.
|
|
Match naming of other wm_cursor_position_* functions.
|
|
|
|
|
|
|
|
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.
|
|
The term queue isn't very descruptive on it's own, use:
- wmWindow.event_queue
- wmWindowManager.notifier_queue
|
|
Reserve `event` for wmEvent.
|
|
Using both evt and event together was confusing.
Renamed:
- event_state <- evt
- event_state_other <- oevt
- event_other <- oevent
- win_other <- owin
|
|
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.
|
|
Saving the startup file now uses "Save Copy", so paths are preserved.
|
|
|
|
|
|
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
|
|
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.
|
|
Ensure they're working as documented (only for debug builds).
|
|
Match wm_event_add_ghostevent behavior for setting previous values.
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
`wmEvent.prevtype` & `wmEvent.prevval` were overwritten
when used in modal keymaps.
Now they are restored to their original values.
|
|
|
|
Change order of checks for more convenient click-detection debugging.
|
|
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.
|