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
2022-02-23XR: Use #ifdef for Vive Focus 3 extensionPeter Kim
Helps with building against different OpenXR SDK versions (i.e. for downstream builds that require specific versions), as the extension was only defined since OpenXR 1.0.22.
2022-02-18XR: Enable Vive Focus 3 controller extensionPeter Kim
Allows controller-specific action bindings for the HTC Vive Focus 3 controller. Currently not supported by any OpenXR runtimes (save for the dedicated Focus 3 runtime in developer early-access: https://forum.vive.com/topic/11354-openxr-support-for-focus-3-early-access-application-form), but useful to have for the future.
2022-02-17Merge branch 'blender-v3.1-release'Peter Kim
2022-02-17Fix T76082: VR Scene Inspection: It shows me only a pink screenPeter Kim
This fixes VR pink screen issues when using the DirectX backend, caused by `wglDXRegisterObjectNV()` failing to register the shared OpenGL-DirectX render buffer. The issue is mainly present on AMD graphics, however, there have been reports on NVIDIA as well. A limited workaround for the SteamVR runtime (AMD only) was provided in rB82ab2c167844, however this patch provides a more complete solution that should apply to all OpenXR runtimes. For example, with this patch, the Windows Mixed Reality runtime that exclusively uses DirectX can now be used with AMD graphics cards. Implementation-wise, a `GL_TEXTURE_2D` render target is used as a fallback for the shared OpenGL-DirectX resource in the case that registering a render buffer (`GL_RENDERBUFFER`) fails. While using a texture render target may be less optimal than a render buffer, it enables proper display in VR using the OpenGL/DirectX interop (tested on AMD Vega 64). Reviewed By: Severin Differential Revision: https://developer.blender.org/D14100
2022-02-11Merge branch 'blender-v3.1-release'Peter Kim
2022-02-11Fix incompatible swapchain format for Quest 2Peter Kim
When using a RGBA16 (`GL_RGBA16`, `DXGI_FORMAT_R16G16B16A16_UNORM`) swapchain format with Quest 2, no image is presented to the headset. This can occur when using the SteamVR runtime with an AMD graphics card (ex. T95374). Workaround is to move this format after the Quest 2-compatible RGBA16F formats in the candidates list so that the RGBA16F formats are chosen instead. Reviewed By: Severin Differential Revision: https://developer.blender.org/D14024
2022-02-11Fix T94268: Closing SteamVR and restarting VR Session crashes BlenderPeter Kim
Crash was caused since the function pointers `s_xrGetOpenGLGraphicsRequirementsKHR_fn`/ `s_xrGetD3D11GraphicsRequirementsKHR_fn` were static and were not updated with the correct proc address after being set the first time. As stated in the OpenXR spec: "function pointers returned by xrGetInstanceProcAddr using one XrInstance may not be valid when used with objects related to a different XrInstance". Although it would seem reasonable that the proc address would not change if the instance was the same (hence the `static XrInstance s_instance;`), in testing, repeated calls to `xrGetInstanceProcAddress()` with the same instance still can result in changes (at least for the SteamVR runtime) so the workaround is to simply set the function pointers every time, essentially trivializing their `static` designations. Reviewed By: Severin Maniphest Tasks: T94268 Differential Revision: https://developer.blender.org/D14023
2022-02-11File headers: use SPDX license for CMake filesCampbell Barton
2022-02-11File headers: SPDX License migrationCampbell Barton
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
2022-02-10Cleanup: remove overly detailed contact info, correct md5 copyrightCampbell Barton
Also remove copyright text with no assignment.
2022-02-09Cleanup: make file headers more consistentCampbell Barton
Also some descriptive text into doc-strings.
2022-02-09Cleanup: move file descriptions into doxygen file sectionCampbell Barton
Continuation of 19100aa57d847699d17527b76c2fab1f4ab88885.
2022-02-09Cleanup: move file descriptions into doxygen file sectionCampbell Barton
Also other minor corrections & reformat particle system copyright.
2022-02-09Cleanup: remove "The Original Code is: ..." from code commentsCampbell Barton
This is almost always meaningless as most code has changed since the comment was added. Besides this, version control can be used to check if/when a file was modified. Some cases of this were kept when they contain details about the original copyright holder.
2022-02-09Cleanup: GHOST_ISystem::toggleConsole APIShrey Aggarwal
GHOST_ISystem::toggleConsole had a somewhat misleading name it could be fed 4 different values, so it was not as much a toggle as a set console window state. This change renames `toggleConsole` to a more appropriately named `setConsoleWindowState` and replaces the integer it had to an enum so it's easy to tell what is being asked of it at the call site. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D14020
2022-02-07Fix T90868: Console window flash when exitingShrey Aggarwal
If the console was hidden on windows, it would be made visible during shutdown in an effort not hide a potentially active interactive console session. This however did not take in account if blender was actually launched from an interactive console causing the console window to briefly flash during shutdown even when launched from the new launcher, the brief flash concerned some users. This change adjusts the behaviour to restore the console only when blender was started from the console. Reviewed By: LazyDodo Differential Revision: https://developer.blender.org/D14016
2022-01-31XR: Print OpenXR SDK version in --debug-xr modePeter Kim
Helps with version validation when updating the OpenXR dependency.
2022-01-31Cleanup: use our own conventions for tags in commentsCampbell Barton
2022-01-29Fix T62651: Win32 Multiple Adapters WarningHarley Acheson
Show a more instructive error message for users who have plugged multiple monitors into multiple display adapters. And do not exit if unable to open a child window when in this state. See D13885 for more details Differential Revision: https://developer.blender.org/D13885 Reviewed by Ray Molenkamp
2022-01-29Fix T93626: Win IME Chinese Numpad DecimalHarley Acheson
Allow Windows IME Pinyin, when in Chinese mode, to use numpad decimal key to enter decimal point. See D13902 for more details. Differential Revision: https://developer.blender.org/D13902 Reviewed by Brecht Van Lommel
2022-01-28Win32: Initialize GHOST_WindowWin32 MembersHarley Acheson
Initialize m_Bar, m_dropTarget, & m_hWnd members of GHOST_WindowWin32 in constructor's member initializer list. This ensures they are are set or NULL in destructor if constructor does not complete. See D13886 for more details. Differential Revision: https://developer.blender.org/D13886 Reviewed by Jesse Yurkovich
2022-01-28Cleanup: indentation for CMake filesCampbell Barton
Also minor white-space & case changes.
2022-01-26Revert "CMake: include BROTLI_LIBRARIES in FREETYPE_LIBRARIES on UNIX"Campbell Barton
This reverts commit 086f1911698154edd4cc19dc966e966bb0060917. There was apparently a problem using APPEND which wasn't referenced in the commit log. Added comment noting the reason for the discrepancy.
2022-01-26CMake: include BROTLI_LIBRARIES in FREETYPE_LIBRARIES on UNIXCampbell Barton
This was already done for APPLE & WIN32, which would reference these libraries twice. Now append BROTLI_LIBRARIES to FREETYPE_LIBRARIES when they're required for linking. No functional changes as all references to FREETYPE_LIBRARIES also used BROTLI_LIBRARIES.
2022-01-25CMake/Linux: find Brotli library the proper waySybren A. Stüvel
Use a `FindBrotli.cmake` module instead of manually appending library paths. This is just for Linux; Windows and macOS will be reviewed separately.
2022-01-21Cmake/Deps: Freetype 2.11.0 / brotli 1.0.9Ray Molenkamp
The UI team requested adding woff2 support to freetype. this required a new dependency brotli. This changes adds brotili to the builder and bumps freetype to version 2.11.0 As freetype now depends on other libraries, for consistency all use of ${FREETYPE_LIBRARY} in cmake has been updated to use ${FREETYPE_LIBRARIES} adjustments have been made in the windows platform file, all other platforms use cmake's FindFreeType.cmake which already sets this variable. reviewed by: brecht Differential Revision: https://developer.blender.org/D13448
2022-01-20Cleanup: spelling in commentsCampbell Barton
2022-01-18Cleanup: remove HWND from GHOST_Wintab constructor.Nicholas Rishel
No change in behavior.
2022-01-12Revert "BLI: Refactor vector types & functions to use templates"Clément Foucault
Includes unwanted changes This reverts commit 46e049d0ce2bce2f53ddc41a0dbbea2969d00a5d.
2022-01-12BLI: Refactor vector types & functions to use templatesClment Foucault
This patch implements the vector types (i.e:`float2`) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the `blender::math` namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. ####Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the `BLI_(float|double|mpq)(2|3|4).hh` is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: `float3::reflect()`). ####Upsides: - Still support `.x, .y, .z, .w` for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. ####Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call `len_squared_v3v3` in `math::length_squared()` and call it a day. - Type cast does not work with the template version of the `math::` vector functions. Meaning you need to manually cast `float *` and `(float *)[3]` to `float3` for the function calls. i.e: `math::distance_squared(float3(nearest.co), positions[i]);` - Some parts might loose in readability: `float3::dot(v1.normalized(), v2.normalized())` becoming `math::dot(math::normalize(v1), math::normalize(v2))` But I propose, when appropriate, to use `using namespace blender::math;` on function local or file scope to increase readability. `dot(normalize(v1), normalize(v2))` ####Consideration: - Include back `.length()` method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches `delaunay_2d.cc` and the intersection code. I would like to know @howardt opinion on the matter. - The `noexcept` on the copy constructor of `mpq(2|3)` is being removed. But according to @JacquesLucke it is not a real problem for now. I would like to give a huge thanks to @JacquesLucke who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: https://developer.blender.org/D13791
2022-01-12Revert "BLI: Refactor vector types & functions to use templates"Clément Foucault
Reverted because the commit removes a lot of commits. This reverts commit a2c1c368af48644fa8995ecbe7138cc0d7900c30.
2022-01-12BLI: Refactor vector types & functions to use templatesClément Foucault
This patch implements the vector types (i.e:float2) by making heavy usage of templating. All vector functions are now outside of the vector classes (inside the blender::math namespace) and are not vector size dependent for the most part. In the ongoing effort to make shaders less GL centric, we are aiming to share more code between GLSL and C++ to avoid code duplication. Motivations: - We are aiming to share UBO and SSBO structures between GLSL and C++. This means we will use many of the existing vector types and others we currently don't have (uintX, intX). All these variations were asking for many more code duplication. - Deduplicate existing code which is duplicated for each vector size. - We also want to share small functions. Which means that vector functions should be static and not in the class namespace. - Reduce friction to use these types in new projects due to their incompleteness. - The current state of the BLI_(float|double|mpq)(2|3|4).hh is a bit of a let down. Most clases are incomplete, out of sync with each others with different codestyles, and some functions that should be static are not (i.e: float3::reflect()). Upsides: - Still support .x, .y, .z, .w for readability. - Compact, readable and easilly extendable. - All of the vector functions are available for all the vectors types and can be restricted to certain types. Also template specialization let us define exception for special class (like mpq). - With optimization ON, the compiler unroll the loops and performance is the same. Downsides: - Might impact debugability. Though I would arge that the bugs are rarelly caused by the vector class itself (since the operations are quite trivial) but by the type conversions. - Might impact compile time. I did not saw a significant impact since the usage is not really widespread. - Functions needs to be rewritten to support arbitrary vector length. For instance, one can't call len_squared_v3v3 in math::length_squared() and call it a day. - Type cast does not work with the template version of the math:: vector functions. Meaning you need to manually cast float * and (float *)[3] to float3 for the function calls. i.e: math::distance_squared(float3(nearest.co), positions[i]); - Some parts might loose in readability: float3::dot(v1.normalized(), v2.normalized()) becoming math::dot(math::normalize(v1), math::normalize(v2)) But I propose, when appropriate, to use using namespace blender::math; on function local or file scope to increase readability. dot(normalize(v1), normalize(v2)) Consideration: - Include back .length() method. It is quite handy and is more C++ oriented. - I considered the GLM library as a candidate for replacement. It felt like too much for what we need and would be difficult to extend / modify to our needs. - I used Macros to reduce code in operators declaration and potential copy paste bugs. This could reduce debugability and could be reverted. - This touches delaunay_2d.cc and the intersection code. I would like to know @Howard Trickey (howardt) opinion on the matter. - The noexcept on the copy constructor of mpq(2|3) is being removed. But according to @Jacques Lucke (JacquesLucke) it is not a real problem for now. I would like to give a huge thanks to @Jacques Lucke (JacquesLucke) who helped during this and pushed me to reduce the duplication further. Reviewed By: brecht, sergey, JacquesLucke Differential Revision: http://developer.blender.org/D13791
2022-01-11IME Cleanup: Unused GHOST_TEventImeData MemberHarley Acheson
Removal of unused tmp member of GHOST_TEventImeData. Not used now, nor was it used by the commit that added it to begin with. Differential Revision: https://developer.blender.org/D11799 Reviewed by Ray Molenkamp
2022-01-10Fix T94434: Windows IME Pinyin Forward SlashTakahiro Shizuki
Treat "/" as a key that should be evaluated by the Win IME system when the input language is Chinese. This fixes a duplication of the input character and results in the expected output of a Chinese wide comma. See D13771 for more details. Differential Revision: https://developer.blender.org/D13771 Reviewed by Brecht Van Lommel
2022-01-10Cleanup: Wintab input processing.Nicholas Rishel
Switched populating GHOST_WintabInfoWin32 vector from resizing and assigning to reserving and pushing. Removed unnecessary state tracking for multiple button presses in a single packet. Paired initialization with definition, and added default initialization for GHOST_WintabInfoWin32.
2022-01-06Cleanup: spelling in commentsCampbell Barton
2022-01-05Cleanup: fix typos in source code in intern/Brecht Van Lommel
Contributed by luzpaz. Differential Revision: https://developer.blender.org/D13532
2021-12-14Cleanup: resolve parameter mis-matches in doc-stringsCampbell Barton
Renamed or removed parameters which no longer exist.
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-11Cleanup: const, autoreleasepool, remove unneeded cast.Ankit Meel
Early return in some places also. De-duplicate getSystemDir and getUserDir also. Reviewed By: #platform_macos, brecht Differential Revision: https://developer.blender.org/D13211
2021-12-08Cleanup: Missing braces in array declarationAaron Carlisle
2021-12-06cmake: fix linking with WITH_X11_XF86VMODE and bfdAurelien Jarno
Fix typos in the variables of the Xxf86vm libray to fix link failure with bfd. These variables are defined in platform_unix.cmake. Reviewed By: zeddb Differential Revision: https://developer.blender.org/D12911
2021-12-01Fix some shortcut keys not working on macOS with Japanese inputYuki Hashimoto
Differential Revision: https://developer.blender.org/D13414
2021-11-30Cleanup: capitalize NOTE tagCampbell Barton
2021-11-24Merge branch 'blender-v3.0-release'Nicholas Rishel
2021-11-24Add tablet data to Wintab fallback cursor movement.Nicholas Rishel
2021-11-22IME: Fix Multi-Window Duplicated First CharacterTakahiro Shizuki
Fix problem with duplicated initial character when initiating or switching to new windows. This is done by updating our copies of state and modes from the new window when it receives WM_IME_SETCONTEXT message. This problem and fix are only for the Windows platform.
2021-11-22IME: Fix Multi-Window Duplicated First CharacterTakahiro Shizuki
Fix problem with duplicated initial character when initiating or switching to new windows. This is done by updating our copies of state and modes from the new window when it receives WM_IME_SETCONTEXT message. This problem and fix are only for the Windows platform.
2021-11-13Cleanup: spelling in comments, comment block formattingCampbell Barton
2021-11-12Cleanup: Remove `GHOST_isUpsideDownContext`.Jeroen Bakker
GHOST API only has a header definition. No implementation or usage.