99762 Commits

Author SHA1 Message Date
Clément Foucault
dd04cba943 GLSamplers: Add debug object label
This makes it easier to see what each sampler is supposed to be.
2020-09-08 19:55:53 +02:00
Clément Foucault
f27d5e4f76 Fix T79538 Grease Pencil: Fill texture doesn't tile anymore
This was caused by rBe749643793809248dfc6ffd078be04aec3eeab82 which
removed the texture repeat from Image texture.
2020-09-08 19:54:30 +02:00
Clément Foucault
637a5c964a BKE: Fix compiling with clang-tidy and readability-non-const-parameter 2020-09-08 18:29:00 +02:00
Aaron Carlisle
f14d24729f RNA Manual Mapping: Update Mappings 2020-09-08 11:58:09 -04:00
Aaron Carlisle
e9e208d995 UI: Tooltip grammar fix 2020-09-08 11:58:09 -04:00
Aaron Carlisle
637699e78a UI: 3D View: Move Live Unwrap to toolbar
The menus should be for operators, tool settings belong in the toolbar
2020-09-08 11:58:09 -04:00
Pablo Dobarro
7ca42545d1 Hide tools with missing icons under experimental
This removes from the UI all tools with missing icons and hides them
under a "Tools with missing icons" experimental option.

We agree on not making available by default tools in master without icons.
Having this experimental flag will allow to commit new tools as soon as the
technical design and implementation is finished so development can
continue, without adding broken icons to the UI.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D8831
2020-09-08 17:43:56 +02:00
Jacques Lucke
4e104ce5b0 Cleanup: reduce variable scopes in node_draw.c 2020-09-08 17:20:16 +02:00
Sybren A. Stüvel
b3759cc0d6 Alembic Export: support instanced object data
Add support for object data instancing. This is used when the objects
are instances, for example when duplicated by a particle system, or
instanced by the duplication system (collection-duplicating empties,
vertex/face duplis, etc.)

Since Alembic already deduplicates data, this doesn't make the resulting
Alembic files any smaller. They will be faster to write, though, when
there is a lot of instanced geometry, as the deduplication system won't
have to do any comparisons.

This instancing support is still limited, in the sense that only object
data is instanced and all transforms are still written explicitly. A
future improvement could be to support instancing entire collection
hierarchies.

Blender's Alembic importer has no understanding of these Alembic
instances yet, and will thus happily duplicate the data on import.

The USD Alembic plugin seems to have problems understanding the
instancing. There might also be other software with similar issues.
Because of this, instancing can be turned off in the exporter (it's on
by default).
2020-09-08 16:41:59 +02:00
Pablo Vazquez
8f4f9275ce UI: Aesthetic tweaks to Select All by Type operator
* Match menu items with Add Menu (order and naming e.g. Font -> Text)
* Use Icons
* Remove ellipsis from the name (policy is to use `...` only when triggering a window/popup)

No functional changes.

Thanks @HooglyBoogly for the help!
2020-09-08 16:30:29 +02:00
Sybren A. Stüvel
9421d66a1b Cleanup: Alembic export, split ABCHierarchyIterator::get_alembic_parent()
Split `ABCHierarchyIterator::get_alembic_parent()` into two functions:
- For a given export path, find the Alembic object
- Ensure that that object is usable as parent object (Alembic uses a
  specific 'top' object as parent to indicate "no parent").

The new function is `public` as it will be used in an upcoming feature,
and is required to be public then.

No functional changes.
2020-09-08 16:19:54 +02:00
Sybren A. Stüvel
c0b4a93fae Cleanup: Alembic export, split function into two
Split the `ABCHierarchyIterator::create_data_writer()` function into two
functions. This is to prepare for the creation of writers not just by
object type, but also by goal, for example writers that reference other
Alembic data instead of writing their own (i.e. instancing).

No functional changes.
2020-09-08 16:19:54 +02:00
Clément
ab758c30d2 GLBackend: Fix gl error inside the mip rendering workaround detection
This was caused by an incorrect mipmap size.
Also add debug checks for good mesure.
2020-09-08 16:05:36 +02:00
Clément
0fb9f22d8b GLContext: Fix clang warning about using override 2020-09-08 16:04:31 +02:00
Clément
acdea4e98b GLFrameBuffer: Fix mass renaming issue
The context might be partialy freed, so use gpu::Context instead of
GLcontext.
2020-09-08 15:49:16 +02:00
Jacques Lucke
2af70acc3a Cleanup: reduce variable scopes in drawnode.c 2020-09-08 15:20:07 +02:00
Jeroen Bakker
ab6f59ff3b GPU: Extract GPU Base Test case
The draw manager test case initialized ghost, gpu and draw manager. This
change splits the base test case to GPU specific and draw manager
specific test case.

The GPU test base test case will be used for low level GPU tests.
2020-09-08 13:23:10 +02:00
Jeroen Bakker
0d68f55789 DrawManager: Fixed memory leak in test cases
Memory leak is introduced as test cases reinitializes the GPU stack.
Added a call to GPU_backend_exit to fix this.

In GPU_backend_exit the GPU backend was destroyed but the pointer wasn't
reset for reuse. This patch also clears the pointer to be reused.
2020-09-08 13:23:04 +02:00
Jeroen Bakker
489aeabb9e DrawManager: Move tests in namespace
Using blender::draw::tests as namespaces.
2020-09-08 13:23:04 +02:00
Sybren A. Stüvel
5becbf9719 Cleanup: Refactor USD Exporter, make parameter const
Follow-up of 63dc72c3521, make parameter `const`.

No functional changes.
2020-09-08 11:45:31 +02:00
Sybren A. Stüvel
63dc72c352 Cleanup: USD export, refactor mesh instancing
Extract the mesh instancing code from the mesh writing function into a
generic 'mark as instance' function on the abstract USD writer. This will
help in supporting non-mesh instances.

No functional changes.
2020-09-08 11:33:35 +02:00
Sybren A. Stüvel
b8d4a2aff8 Cleanup: Refactor ED_object_parent_set
Refactor `ED_object_parent_set`:
- Mark parameters `ob` and `par` as `const` so that it's clear the
  function doesn't assign any other value to them.
- Rename `pararm` to `is_armature_parent`; I mis-read it as `param` all
  the time, and it was very confusing.
- Replace repeated `if-else` statements with `switch` statements.
- Reorder preconditions to have some simple checks first.
- Flip condition on a huge `if`-statement to return early and unindent
  the remainder of the function.

This function still requires splitting up into smaller functions, but at
least this is a step forward.

No functional changes.
2020-09-08 11:33:34 +02:00
Campbell Barton
c2419cdc5e Fix T80238: Crash adding properties to material node-trees
The localized node-tree was freeing the materials ID properties twice.

This matches how animation data behaves, setting to NULL after freeing.
2020-09-08 18:09:22 +10:00
Campbell Barton
1896c2c0e8 Docs: comment values for DispList.type 2020-09-08 17:16:35 +10:00
Campbell Barton
59653a450e Cleanup: rename group to collection for internal instancing flag
Also update old comment.
2020-09-08 16:49:17 +10:00
Campbell Barton
d20b08281e Cleanup: naming for library link enum
Use 'e' prefix, update comments.
2020-09-08 16:41:55 +10:00
Campbell Barton
748deced1c Link/Append: support instancing object data
This patch supports instantiating object data on append/link,
reported as a bug T58304.

This is an option, available when linking/appending,
similar to the existing "Instance Collections" option.

Reviewed by @sybren

Ref D8792
2020-09-08 16:14:39 +10:00
Campbell Barton
e467c54d58 Refactor: move library linking arguments into a parameter struct
Move arguments to BLO_library_link_{begin/named_part/end} into
a single parameter struct, to ensure arguments always match.

This allows is to skip tagging ID's LIB_TAG_DOIT when it's not needed,
previously it was always cleared just in case it was needed.

This also makes it possible to remove BLO_library_link_named_part_ex
which was only used when tagging was needed.
2020-09-08 16:14:33 +10:00
Clément Foucault
48690d967a GPUContext: Move GPUContext to gpu::Context for more consistency
This makes the GPUContext follow the same naming convention as the rest
of the module.

Also add a static getter for extra bonus style (no need for casts):
- Context::get()
- GLContext::get()
2020-09-08 04:15:50 +02:00
Clément Foucault
d2e9de93b8 GPU: Cleanup implementation casts
- Use the syntactic wrap/unwrap method to make code more readable.
- Update comment about hidden struct behind opaque types.
- Cleanup GPUDrawList type.
2020-09-08 04:15:50 +02:00
Clément Foucault
33b25b6a9e GPUTexture: Remove unused functions and avoid GPU_texture_opengl_bindcode
This is a cleanup.
2020-09-08 04:15:50 +02:00
Clément Foucault
a30ad3634d Cleanup: DRW: Replace 0 by NULL in GPU_context_create calls
This was left from a previous refactor.
2020-09-08 04:15:50 +02:00
Clément Foucault
ccc512cc61 GPUImmediate: Make activation / deactivation implicit
This avoids unecessary complexity.

Also makes the GPUImmediate threadsafe by using a threadlocal imm variable.
2020-09-08 04:15:50 +02:00
Clément Foucault
ca8ffc523e fix flush 2020-09-08 04:15:50 +02:00
Clément Foucault
28ea459a61 GPUState: Encapsulate glPixelStorei inside the GLStateManager
Part of the Vulkan task T68990

Isolate the last remaining gl functions.
2020-09-08 04:15:50 +02:00
Clément Foucault
77f60a0931 GPUState: Encapsulate glFlush and glFinish inside the GLContext
Part of the Vulkan task T68990

Isolate the few remaining gl functions.
2020-09-08 04:15:50 +02:00
Campbell Barton
f23400490e Cleanup: doxygen syntax for idtype.c 2020-09-08 10:41:12 +10:00
Campbell Barton
80d134b6d1 Cleanup: remove unused source file
FX_shader_light.c was added by accident in 66da2f537ae80ce2.
2020-09-08 09:30:47 +10:00
Campbell Barton
38b1450848 Cleanup: tabs to spaces 2020-09-08 09:26:35 +10:00
Campbell Barton
bedc68a838 Cleanup: consistent syntax for doxygen parameters
Also use back-slash instead of '@'.
2020-09-08 09:18:59 +10:00
Clément Foucault
5c2ac8520e GPUQuery: GL Backend isolation
This is part of the Vulkan task T68990.

This introduce a new GLQueryPool for managing queries in an
implementation agnostic manner.

This modify the GPU selection query to use this new object.
This also make use of blender::Vector for better code quality.

No real functionnal change.
2020-09-08 00:02:04 +02:00
Clément Foucault
d4fd363d05 GPU: Select Pick: Remove last GL call
This is part of the Vulkan task T68990
This is just a cleanup.
2020-09-08 00:02:04 +02:00
Clément Foucault
b7a28b315a GPUFramebuffer: Make GPU_framebuffer_read_depth more flexible
This is to make use of it in selection code.
2020-09-08 00:02:04 +02:00
Hans Goudey
97c6c4e478 Decimate Modifier: Restore vertex group factor property in UI
This property was inadvertently removed from the modifier's panel and
it wasn't caught in time for the release of 2.90. Thanks to the user
"VermossomreV" for bringing this to my attention.

Differential Revision: https://developer.blender.org/D8790
2020-09-07 15:34:32 -05:00
Hans Goudey
36aeb0ec1e UI: Add temperature units
Based on the original patch by Vaishnav S (@padthai), this adds
support for temperature units. Initially supported units are Celsius,
Kelvin, and Fahrenheit.

The units aren't used anywhere with this commit. Those changes should
happen in separate patches by adding PROP_TEMPERATURE to RNA property
definitions. But it should be ensured that the various solvers and
simulations actually properly use real units.

The complexity of some of the changes comes from the fact that these
units have offsets from each other as well as coefficients. This also
makes the implementation in the current unit system troublesome.
For example, entering 0C evaluates correctly to 273K, but 0C + 0C
doubles that result, because each unit value is evaluated separately.
This is quite hard to solve in the general case with Blender's current
unit system, though, so it is not handled in this commit.

Differential Revision: https://developer.blender.org/D4401
2020-09-07 14:59:07 -05:00
Hans Goudey
d4cca7b7b0 UI: Changes to timeline playback popover
The current playback popover has some issues:
 - Using labels instead of headers is inconsistent with
   the rest of the interface
 - Incomplete context and description for some properties
 - Ugly large spacing

This commit fixes these problems by using headers.

Differential Revision: https://developer.blender.org/D8434
2020-09-07 14:22:29 -05:00
Ankit
5eb5978043 Generate Xcode scheme files during configuration.
Every time CMake is re-run, Xcode shows a popup asking if
user wants to manage schemes automatically or manually.
Building Blender wiki page recommends managing schemes automatically.

This change sets the default behavior to "automatically" and generates
the .xcscheme files while CMake is running, instead of hogging Xcode
later on. With tests enabled, the number of schemes is 203.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8820
2020-09-08 00:26:27 +05:30
Ankit
6aaa6c96a1 Tests: set build directory using build type
Similar to {rB0a5f7061369d53b4eac55362ad2}
but also for Xcode and Ninja multi-config.

This silences 44 pairs of warnings like:

/bin/rm -f build_full/bin/tests/BLI_ghash_performance_test
"build_full/CMakeScripts/XCODE_DEPEND_HELPER.make:42: warning:
ignoring old commands for target
`build_full/bin/tests/BLI_ghash_performance_test'"

/bin/rm -f build_full/bin/tests/BLI_ghash_performance_test
"build_full/CMakeScripts/XCODE_DEPEND_HELPER.make:3523: warning:
overriding commands for target
`build_full/bin/tests/BLI_ghash_performance_test'"

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8815
2020-09-08 00:23:48 +05:30
Ankit
40dcf686f0 Support ASan library on macOS for all generators.
This change allows macOS developers to use
`WITH_COMPILER_ASAN` with every generator.

`CMAKE_C_IMPLICIT_LINK_DIRECTORIES` on macOS points to
`Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib`
which is not where the Sanitizer libraries are.

To link the library, rpath could be used but that seems complex,
so linker flags are passed as the documentation says. [1]

If users have `ASAN_OPTIONS=detect_leaks=1` in their environment
variables, it should be removed to avoid a feature-unsupported error
while compiling.

[1]: http://clang.llvm.org/docs/AddressSanitizer.html#usage

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8817
2020-09-08 00:19:07 +05:30
Howard Trickey
de21ab418d Add a Self option to the Exact boolean modifier. Fixes T52425.
With this option, self-intersections in either or both operands
will be handled properly (if both sides are piecewise winding
number constant, and maybe some other cases too).
In the Boolean tool, this flag was there already but the code
forced a unary operation in that case; this commit corrects it
to make a binary operation. This flag makes the code slower, which
is why it is an option and not an always-on thing.
2020-09-07 14:29:12 -04:00