Age | Commit message (Collapse) | Author |
|
|
|
|
|
The clipboard can change between checking it's length and
copying into the allocated buffer.
Move this from RNA to the C/Python API.
|
|
Makes it more clear that code using this is related to the RNA
integration of a type.
Part of T74432.
Also ran clang-format on affected files.
|
|
|
|
Both the MS headers and blender headers define the HKEY
which gives all kind of inclusion order issues.
This diff renames all *KEY constants to EVT_*KEY to resolve
this conflict.
Reviewed By: brecht , dfelinto
Differential Revision: http://developer.blender.org/D7164
|
|
|
|
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.
|
|
This is done with two-finger double tap on trackpads, and is usually used to
zoom into an element under the cursor.
It can now be used for toggling local view in the 3D viewport.
Differential Revision: https://developer.blender.org/D6588
|
|
Removing meaningless distinction between NULL pointer and EVT_TABLET_NONE,
and initialize pressure and tilt to 1.0 and 0.0 respectively when no tablet
is used.
|
|
This was already supported by GHOST on X11, WIN32.
macOS goes up to F20.
|
|
Support the application key on Linux & Windows.
|
|
The CANCELLED return value from an operator is intended for
signaling that the operator aborted execution without changing
anything, and an Undo stack entry should not be created.
When a Python operator crashes, it is not safe to assume that
it did nothing, so it should interpret it as FINISHED instead.
Otherwise, the undo system behavior after an operator failure
feels broken.
Differential Revision: https://developer.blender.org/D6241
|
|
Blender UI Layout API allows supplying parameters to operators via
button definitions. If an operator behavior strongly depends on its
parameters, it may be difficult to write a tooltip that covers all
of its operation modes. Thus it is useful to provide a way for the
operator to produce different descriptions based on the input info.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D5709
|
|
The old layout of `PointerRNA` was confusing for historic reasons:
```
typedef struct PointerRNA {
struct {
void *data;
} id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
This patch updates it to:
```
typedef struct PointerRNA {
struct ID *owner_id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
Throughout the code base `id.data` was replaced with `owner_id`.
Furthermore, many explicit pointer type casts were added which
were implicit before. Some type casts to `ID *` were removed.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D5558
|
|
Some statements were split across multiple lines because of their
trailing comments.
In most cases it's clearer to put the comments above.
|
|
|
|
The fix for T60777 caused this operator not to work from Python.
Add a repeat_last flag for operator execution.
|
|
|
|
|
|
Operator flags to wrap on a single axis.
D4865 by @Gvgeo with updates.
Resolves T64585
|
|
Track-pad & NDOF events were using KM_NOTHING which wasn't included in
the RNA enum, causing the value to be an empty string in exported key-map
(which then failed to load back).
Add back 'Nothing' value, keep it last since it's not used often.
|
|
After new dependency graph API this is no longer needed: all the access
to dependency graph is done explicitly.
Still leaving this flag for C, but that might also be gone in the future.
|
|
Most code uses ReportList argument last (or at least not first)
when an optional report list can be passed in.
|
|
The goal is to prevent assignment of temporary or evaluated meshes
to objects from the main database.
Majority of the change is actually related on passing reports around.
On a positive side there are more error prints which can become more
visible to scripters.
There are still possible further improvements in the related areas.
For example, disable user counting for evaluated ID datablocks when
assignment happens. But can also happen later on as a separate
improvement.
Reviewers: brecht, campbellbarton, mont29
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4884
|
|
Give WM context to the shortcut, since this is more specific meaning
than usual 'shifting' one...
Part of T43295.
|
|
Since these are temporary properties, changing them shouldn't cause
undo pushes. There already is a flag to disable that, but since each
operator inherits its own properties from the base, RNA define code
also had to be changed to allow inheriting the flag.
|
|
|
|
|
|
|
|
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
|
|
Mark specific properties as no-dependency-graph tag.
This is needed to avoid a centralized Copy-on-Write tag from RNA
pointer update.
|
|
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.
|
|
Needed for clan-format not to wrap onto one line.
|
|
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.
|
|
|
|
Use rna naming conventions for unit-settings callbacks.
|
|
Now its possibly to ask for only keyboard/mouse/ndof events
when finding key map items.
|
|
|
|
|
|
This is needed for keymaps to define their own options,
which can include left/right mouse select.
This can also help to us to provide popular keymap tweaks as options,
so users can easily fit blender to their workflow with well supported
adjustments which don't give the overhead of having to maintain
your own keymap, which become out-dated when operators change.
|
|
For Blender builtin configurations the option to choose the select mouse remains
and is now also in the splash screen. It works by changing the keymap dynamically
in the script, rather than using special events.
The system of automatic switching of events was not flexible enough to deal with
side effects that require further keymap changes, so it is now under more manual
control in the script.
This breaks compatibility for some scripts and exported key configurations.
These can be fixed by replacing SELECTMOUSE, ACTIONMOUSE, EVT_TWEAK_S and
EVT_TWEAK_A with appropriate LEFTMOUSE, RIGHTMOUSE, EVT_TWEAK_L and
EVT_TWEAK_R events.
Other than that, there should be no functional changes.
|
|
|
|
Without this bugs slip through that don't null check the descriptions
since many were set to empty strings.
|
|
Not sure why but MSVC is complaining for some of those.
In particular for the struct in BKE_subdiv_ccg.h. Those were the ones
crashing here..
|
|
|
|
|
|
For now, that flag is only used in redo code, since after undo step
depsgraph is totally empty... We *may* want to add at least an assert in
op calling code too, though?
|