Commit Graph

10627 Commits

Author SHA1 Message Date
Yuki Hashimoto
22bef356ae Cleanup: correct the comment in ghost
The same comments were written in clientToScreen and screenToClient in
GHOST. I corrected them.

Ref D11986
2021-07-21 23:14:03 +10:00
Campbell Barton
bbcc8330f7 Cleanup: spelling 2021-07-21 20:42:11 +10:00
Campbell Barton
265c3a4724 Cleanup: replace NB with NOTE in comments 2021-07-21 13:10:32 +10:00
Romain Toumi
14d5a45750 UI: Fix Cycles Materials menu Layout
Fix an incoherence between the Eevee Materials menu and the Cycles Materials menu :

Eevee :
{F10230448}

Cycles :
{F10230449}

Simply Fixed by replacing the Cycles UI code by the Eevee UI code.

Thanks to @Brainzman for helping me create this diff and translate

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D11979
2021-07-20 17:23:34 -04:00
Campbell Barton
77e927b58f Cleanup: reserve C++ comments for disabled code
Use C comments for plain text.
2021-07-20 15:01:05 +10:00
Campbell Barton
42017b006e Cleanup: sort struct declarations 2021-07-16 11:48:54 +10:00
Heinrich Schuchardt
468d59e496 Add support for RISC-V architecture
* On RISC-V GCC 10.3 does not define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n.
* Avoid a build error
  "Please add support for your platform in build_config.h"
  Cf: https://github.com/sergeyvfx/libNumaAPI/pull/3

Differential Revision: https://developer.blender.org/D11910
2021-07-15 14:22:35 +02:00
Christian Rauch
4e65b1ef6c GHOST/wayland: create mmap-ed file manually if memfd_create is unavailable 2021-07-14 23:15:00 +01:00
Brecht Van Lommel
765406cb51 Fix T88088: Cycles and Eevee Vector Rotate node inconsistent with zero axis
Pass along the unmodified vector in this case.
2021-07-14 13:54:52 +02:00
Campbell Barton
d31abfef2c Fix x/y mismatch in retract region tracker
Correct X/Y mismatch in RetrackRegionTracker.

NOTE: This isn't used at the moment.

Reviewed By: sergey

Ref D11895
2021-07-13 21:58:45 +10:00
Jesse Yurkovich
5098678308 Cleanup: Use correct _WIN32/64 defines for MSVC
Docs: https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros

Differential Revision: https://developer.blender.org/D11460
2021-07-12 21:01:18 -07:00
Jesse Yurkovich
dc679f6247 Cleanup: Use C99 format string for the SIZET_FORMAT macro
All platforms support the proper format string and it's already used in
various other places.

Differential Revision: https://developer.blender.org/D11460
2021-07-12 20:32:37 -07:00
Christian Rauch
7b954ba7a1 GHOST/wayland: remove unused 'input-event-codes.h' header
This was accidentally committed by rBecbf838feefc.
2021-07-12 20:20:08 +01:00
Brecht Van Lommel
5e1702e7a5 Fix T87844: Cycles losing 1 bit of precision when loading packed byte images
This could lead to colors that are supposed to be exactly white to be slightly
darker.
2021-07-12 19:19:04 +02:00
Brecht Van Lommel
f709f12d93 Fix T89736: Cycles error with persistent data, displacement and motion blur 2021-07-12 15:56:31 +02:00
Brecht Van Lommel
45a47142fc Fix T89396: Cycles missing passes with multiple view layers and persistent data 2021-07-12 15:40:45 +02:00
Campbell Barton
2289e26fa3 Cleanup: correct spelling in comments, remove profanity 2021-07-11 15:31:36 +10:00
Sergey Sharybin
16099c00d0 Fix cycles crash when changing viewport display pass
It was possible that render buffers and scene kernel data will be out
of sync because reset and scene update happens in different locks.

This is similar issue we've fixed in the Cycles X branch, so backported
relevant changes from there.

This change removes what seems to be unused feature kernel.

Differential Revision: https://developer.blender.org/D11828
2021-07-09 10:43:47 +02:00
Campbell Barton
c3cb565250 CMake: add missing headers, sort file lists 2021-07-08 13:21:22 +10:00
Julian Eisel
2b41b2f05b Cleanup: Code-style correction in Ghost (Clang-format) 2021-07-07 19:26:47 +02:00
Christian Rauch
ecbf838fee Cleanup: comment on source of button event codes 2021-07-07 13:21:57 +01:00
Campbell Barton
5bbbc98471 Cleanup: spelling in comments 2021-07-07 13:42:46 +10:00
Christian Rauch
933eddc9a1 cmake: use harvested 'wayland-protocols' if system version is insufficient 2021-07-06 18:17:27 +01:00
Christian Rauch
a069fffcc4 GHOST/wayland: define BTN event codes manually 2021-07-06 18:17:21 +01:00
Campbell Barton
36584bbc2d Cleanup: quiet discarded-qualifiers warning 2021-07-06 12:05:25 +10:00
Nicholas Rishel
4eeec6e9b5 Fix macOS builds after removing Ghost integral types. 2021-07-05 15:24:39 -07:00
Nicholas Rishel
f3ec0d8e58 Replace Ghost integrals with stdint fixed width integers.
Also replace integer with bool in Ghost API when only used as boolean,
and uint8* with char* in Ghost API when variable is a string.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D11617

Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
2021-07-05 11:00:45 -07:00
Yuki Hashimoto
0ef794b553 macOS: support Chinese and Korean input for text buttons
This patch extends D11695 to provide full support for Chinese and Korean
input on macOS.

Chinese input notes:

You can input symbolic characters (such as '! , '$') during Chinese input.

The difference from Japanese input is that multiple `insertText` may be
called with a single key down (`keyDown` method). This happens when you input
a symbolic character (such as '! , '$') during conversion.

The conversion is confirmed (`insertText`) and the symbolic character is
entered (`insertText`). To solve this problem, I have `result_text` to
concatenate the strings and store them in `result`.

Korean input notes:

Korean does not display a conversion suggestion window.

Like Chinese, Korean input may call multiple `insertText` methods. Also,
in Korean, the previous confirmation (`setMarkedText` and `insertText`) and
the next conversion is processed (`setMarkedText`) may be called
simultaneously with a single key down (`keyDown` method).

For example:
1. press g ㅎ (`setMarkedText`)
2. press k 하 (`setMarkedText`)
3. press t 앗 (`setMarkedText`)
4. press k 하세 (`setMarkedText`, `insertText`, `setMarkedText`)

Fixed so that the `insertText` and the last `setMarkedText` are processed.

Also, if a control character (such as Arrow, Enter) is input during Korean
input, the conversion will be confirmed (`setMarkedText`, `insertText`) and
the original control character will be processed.

In other words, if you press the left arrow key while typing in Korean, the
cursor will move to the left after the character is confirmed. Therefore, I
modified the `keyDown` method so that the `handleKeyEvent` is called again
after the `insertText` is processed in the `interpretKeyEvents` method.

Differential Revision: https://developer.blender.org/D11699
2021-07-05 17:24:34 +02:00
Yuki Hashimoto
83e2f8c993 macOS: support Japanese input for text buttons
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
2021-07-05 17:24:27 +02:00
Campbell Barton
bd0de99b52 Cleanup: spelling, punctuation 2021-07-05 22:27:03 +10:00
Brecht Van Lommel
aad8b8405c Fix T89655: tweak Cycles transparent bounces UI for clarity
Transparent bounces are independent of other bounces, so don't group
them together.
2021-07-05 13:42:54 +02:00
Yuki Hashimoto
2c6c1b6cc0 Cleanup: replace NSTextInput with NSTextInputClient
This revision replaces the deprecated protocol NSTextInput with
NSTextInputClient in Cocoa Text View. No functional changes.

For more information of the methods, please see:
https://developer.apple.com/documentation/appkit/nstextinputclient

Differential Revision: https://developer.blender.org/D11407
2021-07-05 13:10:08 +02:00
Yuki Hashimoto
c1ba68dd04 Cleanup: use arrayWithObject to reduce the code
Similar code is found in Apple's code samples.

Differential Revision: https://developer.blender.org/D11434
2021-07-05 13:10:08 +02:00
Brecht Van Lommel
bb971bead9 Fix T89523: Cycles OpenCL compile error after shadow terminator changes 2021-07-05 11:26:40 +02:00
Jacques Lucke
9075f63e8f Cleanup: unused variable 2021-07-05 10:29:21 +02:00
Campbell Barton
5b2d2b2319 Cleanup: remove temporary header 2021-07-05 15:54:57 +10:00
Campbell Barton
f0f7282d9d Cleanup: spelling in comments 2021-07-05 15:54:57 +10:00
Campbell Barton
9b89de2571 Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
2021-07-04 00:43:40 +10:00
Brecht Van Lommel
82466ca2e5 Fix T89581: Cycles crash rendering some OpenVDB files with inactive voxels
Print an error message instead.
2021-07-02 19:01:53 +02:00
Brecht Van Lommel
0c84939117 Cleanup: use template utility function to handle OpenVDB grid types in Cycles 2021-07-02 19:01:53 +02:00
Campbell Barton
addb1a5c9a Cleanup: spelling in comments 2021-07-02 12:15:29 +10:00
Harley Acheson
b39d66adde Fix T88909: Win32 getTitle() UTF8 Support
In the Win32 platform our setTitle() can properly assign a Unicode
utf-8 window title. Unfortunately our getTitle() will only read regular
8-bit character strings. This means that we can never compare what we
set to what we get. This patch updates getTitle() to use Unicode-aware
GetWindowTextLengthW and GetWindowTextW.

see T88909 for an example of this affecting user experience.

Differential Revision: https://developer.blender.org/D11782

Reviewed by Ray Molenkamp
2021-07-01 18:08:29 -07:00
Campbell Barton
753806c731 Cleanup: spelling 2021-07-01 10:25:49 +10:00
Campbell Barton
df9597cfba Cleanup: use const for datatoc declarations 2021-06-30 16:42:19 +10:00
Brecht Van Lommel
516a060bb3 Fix T89523: Cycles OpenCL compile error after recent changes
Also correctly used inverse transposed matrix for normal transform.
2021-06-29 19:47:11 +02:00
Harley Acheson
999f1f7504 Win32: Window Placement DPI and Scale Adjustment
When using multiple monitors that differ in scale and/or dpi, the
varying sizes of the window titles and borders can cause the placement
of those windows to be out by a small amount. This patch adjusts for
those differences on Windows 10 and newer.

see D10863 for details and examples.

Differential Revision: https://developer.blender.org/D10863

Reviewed by Ray Molenkamp
2021-06-29 09:29:40 -07:00
Harley Acheson
63aa6dd845 Cleanup: Win32 Window Creation
This is just some cleanup of the Win32 window creation code. After
CreateWindowExW() this patch uses some early exits to replace some
potentially confusing if blocks. No functional changes.

Differential Revision: https://developer.blender.org/D11446

Reviewed by Ray Molenkamp
2021-06-29 08:51:51 -07:00
Brecht Van Lommel
ae636994cd Fix Cycles hair render error on GPU after recent changes
Volumes primitive needs to be part of traceable primitives.
2021-06-29 16:35:06 +02:00
Kévin Dietrich
e7fc15e2ef Fix T70615: Cycles ignores BSDF inputs when nodes are optimized
When compiling BSDF nodes, we only assing stack space to the normal and
tangent inputs if they are linked. However, it could be that the
ConstantFolder removed the link, so checking if there is a link fails
to take this into account.

To fix this, added a flag to ShaderInput to keep track of whether a
constant was folded into the input, and use it as well to verify that
the socket is linked when assigning stack space.

Reviewed By: brecht

Maniphest Tasks: T70615

Differential Revision: https://developer.blender.org/D11731
2021-06-29 16:24:21 +02:00
Campbell Barton
855f7fee63 Cleanup: clang-format 2021-06-29 20:13:24 +10:00