Age | Commit message (Collapse) | Author |
|
|
|
When dragging with a large threshold (using a tablet for example),
it's possible to press another key before the drag threshold is reached.
So tweaking then pressing X would show the delete popup instead of
transforming along the X-axis.
Now key presses while dragging cause the drag event to be evaluated
before the key press.
Note that to properly base the mouse-move event on the previous
state the last handled event is now stored in the window.
Without this the inserted mouse-move event may contain invalid values
from the next event (it's modifier state or other `prev_*` values).
Requested by @JulienKaspar.
|
|
|
|
|
|
This feature was never exposed to users.
|
|
Supporting two kinds of dragging is redundant, remove tweak events as
they only supported 3 mouse buttons and added complexity from using the
'value' to store directions.
Support only click-drag events (KM_CLICK_DRAG) which can be used with
any keyboard or mouse button.
Details:
- A "direction" member has been added to keymap items and events which
can be used when the event value is set to KM_CLICK_DRAG.
- Keymap items are version patched.
- Loading older key-maps are also updated.
- Currently the key-maps stored in ./release/scripts/presets/keyconfig/
still reference tweak events & need updating. For now they are updated
on load.
Note that in general this wont impact add-ons as modal operators don't
receive tweak events.
Reviewed By: brecht
Ref D14214
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
Differentiate doc-strings from title/section text.
Also use explicit doxygen references to struct members
so it's not ambiguous which member is being referenced.
Note that these changes aren't complete (some files weren't touched).
|
|
Also justify rounding up font width.
|
|
|
|
|
|
Blender did not support to input East Asian characters (Chinese, Japanese,
Korean) on macOS. This patch adds support for Japanese input, by implementing
the appropriate processing for the NSTextInputClient protocol.
Technical notes:
* The conversion candidate window is drawn by the input method program calling
`firstRectForCharacterRange`.
* The string before confirmation (called `composite` in blender) is handled in
the `setMarkedText` method called by the input method program.
* The string after confirmation (called `result` in the blender) is processed
in the `insertText` method called by the input method program.
Ref T51283
Differential Revision: https://developer.blender.org/D11695
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
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.
|
|
Keymap UI and import/export could depend on the current
context for dynamic enum's.
Use STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID for OperatorProperties.
|
|
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.
|
|
Also use doxygen comments for sculpt functions.
|
|
|
|
Before committing D10224, bundled preset names that are lowercase need
updating to title case for display in the UI. This changes several of
the preset file names to title case, and fixes a couple of other naming
issues in the preset names. A few strings in the code are also changed
to reflect the new filename of the Blender keymap.
|
|
Remove DNA headers, using forward declarations where possible.
Also removed duplicate header, header including it's self
and unnecessary inclusion of libc system headers from BKE header.
|
|
Some DNA headers already did this, most did not. Even though many of them would
be included in C++ files and thus compiled as C++. This would be confusing and
developers may think they have to add `extern "C"` too a whole lot of
(indirect) includes to be able to use a C header in C++.
However, this is a misconception.
`extern "C"` does not cause code to be compiled with C rather than C++! It only
causes the linker to not use C++ function name mangling. See
https://stackoverflow.com/a/1041880.
Because extern DNA headers don't have function declarations, using `extern "C"`
actually should not have any effect. On the other hand, adding it causes no
harm and avoids confusion. So let's just have it consistently in C header
files.
Differential Revision: https://developer.blender.org/D9578
Reviewed by: Bastien Montagne, Sybren Stüvel
|
|
Also add docs to event and keymap item flag.
|
|
|
|
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
|
|
|
|
|
|
NOTE: While most of the milestone 1 goals are there, a few smaller features and
improvements are still to be done.
Big picture of this milestone: Initial, OpenXR-based virtual reality support
for users and foundation for advanced use cases.
Maniphest Task: https://developer.blender.org/T71347
The tasks contains more information about this milestone.
To be clear: This is not a feature rich VR implementation, it's focused on the
initial scene inspection use case. We intentionally focused on that, further
features like controller support are part of the next milestone.
- How to use?
Instructions on how to use this are here:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test
These will be updated and moved to a more official place (likely the manual) soon.
Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC
headsets don't support the OpenXR standard yet and hence, do not work with this
implementation.
---------------
This is the C-side implementation of the features added for initial VR
support as per milestone 1. A "VR Scene Inspection" Add-on will be
committed separately, to expose the VR functionality in the UI. It also
adds some further features for milestone 1, namely a landmarking system
(stored view locations in the VR space)
Main additions/features:
* Support for rendering viewports to an HMD, with good performance.
* Option to sync the VR view perspective with a fully interactive,
regular 3D View (VR-Mirror).
* Option to disable positional tracking. Keeps the current position (calculated
based on the VR eye center pose) when enabled while a VR session is running.
* Some regular viewport settings for the VR view
* RNA/Python-API to query and set VR session state information.
* WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data
* wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU
context)
* DNA/RNA for management of VR session settings
* `--debug-xr` and `--debug-xr-time` commandline options
* Utility batch & config file for using the Oculus runtime on Windows.
* Most VR data is runtime only. The exception is user settings which are saved
to files (`XrSessionSettings`).
* VR support can be disabled through the `WITH_XR_OPENXR` compiler flag.
For architecture and code documentation, see
https://wiki.blender.org/wiki/Source/Interface/XR.
---------------
A few thank you's:
* A huge shoutout to Ray Molenkamp for his help during the project - it would
have not been that successful without him!
* Sebastian Koenig and Simeon Conzendorf for testing and feedback!
* The reviewers, especially Brecht Van Lommel!
* Dalai Felinto for pushing and managing me to get this done ;)
* The OpenXR working group for providing an open standard. I think we're the
first bigger application to adopt OpenXR. Congratulations to them and
ourselves :)
This project started as a Google Summer of Code 2019 project - "Core Support of
Virtual Reality Headsets through OpenXR" (see
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).
Some further information, including ideas for further improvements can be found
in the final GSoC report:
https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report
Differential Revisions: D6193, D7098
Reviewed by: Brecht Van Lommel, Jeroen Bakker
|
|
- Keymap items now have 'repeat' boolean which can be set
to make keymap items respond to key repeat events or not.
- Support for X11 & WIN32 (not macOS currently).
This allows for the possibility to perform actions while a key is held
and finish the action upon release.
Thanks to @Severin for review and WIN32 support.
|
|
|
|
Avoids having to check the current area is NULL.
|
|
|
|
|
|
Adds a toggle to the filter menu for outliner synced selection. Enabled
by default, this ensures selection is synced between objects, bones, and
sequences. An active outliner element theme color is added to indicate
which element is active.
Synced selection is controlled on the operator level. Each operator
that modifies selection for objects, bones, sequences, or outliner
elements needs to call the respective ED_outliner_select_sync_from..
function to tag outliners to be synced.
Syncing is done lazily on outliner draw.
|
|
|
|
|
|
The fix for T60777 caused this operator not to work from Python.
Add a repeat_last flag for operator execution.
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
Ref T63164, there was a hidden bug like this on Windows 32 bit.
|
|
|
|
Avoids mixing these in with regular variables in code-completion.
Use char for pad members except for 'void *', to make size clearer.
Removed/shrink a few redundant padding vars which were >= 8 bytes.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
|