Commit Graph

104058 Commits

Author SHA1 Message Date
Campbell Barton
aa2da44b82 Cleanup: use doxy sections 2021-02-19 02:19:53 +11:00
Campbell Barton
e79916eb47 Cleanup: order shape_len after shape argument
This matches nearly all other argument ordering in Blender,
including Python mathutils API.
2021-02-19 02:19:53 +11:00
Campbell Barton
10a54bbd06 Cleanup: spelling, correct doc-string arguments 2021-02-19 02:19:53 +11:00
Antonio Vazquez
bcb9e8e1a7 Fix T85769: Grease Pencil Fill option when drawing no longer works
The fill unclamped thickness value was not properly initialized for using with the new antialiasing.

The error was introduced in commit 09f7c93858
2021-02-18 16:16:02 +01:00
Ray Molenkamp
74383a332b Cleanup: Fix unused variable warning
exception was not used and can be safely removed
2021-02-18 08:09:08 -07:00
Antonio Vazquez
f521aa445d Merge branch 'blender-v2.92-release' 2021-02-18 15:36:32 +01:00
Antonio Vazquez
f1f8074b8d GPencil: Fix unreported broken use only lines in multiframe
This option was broken since the draw engine refactor and it was impossible to display only edit lines for multiframe mode.
2021-02-18 15:34:52 +01:00
Jacques Lucke
0fe5be3525 Cleanup: return const reference instead of copy
There isn't really a reason for why this has to return a copy of
the data instead of a reference.
2021-02-18 12:40:27 +01:00
Jacques Lucke
e1fe1fcc79 Cleanup: rename AttributeInfo to AttributeKind
"Kind" is a bit less generic than "Info" for me. Especially, it implies
that the struct does not contain the name of a specific attribute
(for me anyway).
2021-02-18 12:32:40 +01:00
Philipp Oeser
b166429fc9 Merge branch 'blender-v2.92-release' 2021-02-18 11:11:00 +01:00
Philipp Oeser
75580fa6a6 Fix flashing eevee render passes in viewport
Caused by rB85fe12071ad7.

When looking at a render pass in viewport and move the camera, there's a
"flash" effect in this AOVs test file:

{F9753476}

{F9753473}

The cause seems to be that taa_current_sample when rendering
(DRW_state_is_image_render()) is ok because it has been incremented in
EEVEE_temporal_sampling_draw but taa_current_sample is wrong when we are
not rendering.

D10375 by Ulysse Martin (youle) with clang format changes.

Reviewed By: jbakker, lichtwerk, also blessing from fclem

Differential Revision: https://developer.blender.org/D10375
2021-02-18 11:05:39 +01:00
Jacques Lucke
72e2b5060d Geometry Nodes: support adapting point to corner domain
This allows accessing per-point attributes on the corner domain,
which can be useful e.g. when adding per-point displacement
to per-corner uv coordinates.

Also it is required to make an upcoming patch work well, that
makes the Point Distribute node use density weights per corner
instead of per point, giving the user more precise control over
the distribution.
2021-02-18 11:03:38 +01:00
Jacques Lucke
e3f0b6d5cb Geometry Nodes: support accessing vertex colors
This makes vertex colors available in geometry nodes similar to
how uvs are available. They can be used using the attribute system.
Vertex colors are stored per corner (as are uvs, but not like vertex weights).

Ref T84297.

Differential Revision: https://developer.blender.org/D10454
2021-02-18 10:24:02 +01:00
Jacques Lucke
999abee874 Geometry Nodes: convert point cloud to mesh vertices for modifiers
Previously, when a Geometry Nodes modifier outputs a point cloud
(e.g. generated using the Point Distribute node), other modifiers
could not use that data. Now, the point cloud data is converted to
mesh vertices for such modifiers.

Ref T85281.

Differential Revision: https://developer.blender.org/D10451
2021-02-18 10:13:56 +01:00
Jeroen Bakker
1bcc8f8410 Cleanup: Python: naming mismatch in bvh.ray_cast. 2021-02-18 09:09:31 +01:00
Hans Goudey
450ea1b755 Cleanup: Decrease variable scope 2021-02-17 16:59:50 -06:00
Hans Goudey
5fef212e31 Cleanup: Use const argument, decrease variable scope 2021-02-17 16:42:20 -06:00
Hans Goudey
fd75f7c135 Cleanup: Use Vector instead of of raw array 2021-02-17 16:19:50 -06:00
Brecht Van Lommel
78116a1edc macOS: support building with command line tools without full Xcode
Latest Xcode takes up 15GB, command line tools are only 1.2GB.
2021-02-17 21:05:09 +01:00
Hans Goudey
eeeb85baf8 Cleanup: Comment formatting in node_draw.cc 2021-02-17 13:34:49 -06:00
Ray Molenkamp
af824b09c7 MSVC: Suppress C4251 in OpenVDB/Mantaflow
All headers in the svn libraries should be
building with /W0 however MSVC 16.8/16.9
has broken this functionality making OpenVDB
emit lots of warnings.

The breakage was reported [1] in august to MS
but they still have not gotten around to
addressing the issue.

This change explicitly suppresses C4251 in the
module that emitted these warnings. As the warning
is useful in other parts of blender a localized
approach is taken rather than a global suppression.

[1] https://developercommunity.visualstudio.com/content/problem/1167590/bug.html
2021-02-17 12:23:01 -07:00
Hans Goudey
f29a1d87e8 Fix: Attribute randomize node broken for integer attributes
The integer mode still needs a random value in a 0 to 1 range, just like
floats. So slightly refactor to let the integer randomization use the
float implementation and then round to an int afterwards.
2021-02-17 12:21:31 -06:00
Dalai Felinto
c8b064f032 Merge remote-tracking branch 'origin/blender-v2.92-release'
Making sure the rc tag doesn't get carried over to master.
2021-02-17 19:08:29 +01:00
Dalai Felinto
3bb58e2a7c Blender 2.92 bcon4 - change release cycle to release candidate
This is still a rolling release candidate with new builds every day
as a preparation to the final release.
2021-02-17 18:55:20 +01:00
Ray Molenkamp
8095aad47e Cycles: Fix build error on windows
Function __bsf was in util/util_simd.h twice

problem located by @EAW on chat.
2021-02-17 10:21:00 -07:00
Brecht Van Lommel
4d28a1d75f Fix OpenColorIO 2.0 GPU shader error in uniform assignment
And fix a (harmless) compiler warning.
2021-02-17 18:03:52 +01:00
Germano Cavalcante
a7750f95b9 GPU Python: Rename 'uniform_buffer' to 'uniform_block'
From the the opengl wiki:
> Buffer objects are associated with a program's uniform block similarly to the way that texture objects are associated with sampler uniforms.
2021-02-17 13:23:35 -03:00
Jeroen Bakker
0da10b279a Cleanup: Use static struct for work scheduler. 2021-02-17 16:49:27 +01:00
Jeroen Bakker
3a4b7e2bc6 Cleanup: Use struct for WorkScheduler. 2021-02-17 16:49:27 +01:00
Jeroen Bakker
b452438d0a Cleanup: Use snake case for method names. 2021-02-17 16:49:27 +01:00
Jeroen Bakker
cc45dfa07f Cleanup: Remove definition in header without implementation. 2021-02-17 16:49:27 +01:00
Germano Cavalcante
89c79c3ed8 Cleanup: Abbreviate enums with 'UNSIGNED_' in the name 2021-02-17 12:38:21 -03:00
Germano Cavalcante
4430e8a008 Python: gpu module: add new submodules and types
This commit extends the gpu python API with:
```
gpu.types.Buffer         #"__init__", "to_list"
gpu.types.GPUTexture     #"__init__", "clear", "read", "format"
gpu.types.GPUFrameBuffer #"__init__", "bind", "clear", "is_bound", "viewport", ("__enter__",  "__exit__" with "GPUFrameBufferStackContext")
gpu.types.GPUUniformBuf  #"__init__", "update"
gpu.state                #"blend_set",  "blend_get",  "depth_test_set",  "depth_test_get",  "depth_mask_set",  "depth_mask_get",  "viewport_set",  "viewport_get",  "line_width_set",  "line_width_get",  "point_size_set",  "color_mask_set",  "face_culling_set", "front_facing_set",  "program_point_size_set"
```

Add these methods to existing objects:
```
gpu.types.GPUShader  #"uniform_sample", "uniform_buffer"
```

Maniphest Tasks: T80481

Differential Revision: https://developer.blender.org/D8826
2021-02-17 12:27:19 -03:00
Brecht Van Lommel
ec8c09f2aa Cleanup: fix compiler warnings 2021-02-17 16:26:24 +01:00
Brecht Van Lommel
351d8bfc41 Fix T85694: Cycles incorrect grayscale conversion with some OpenColorIO configs 2021-02-17 16:26:24 +01:00
Brecht Van Lommel
0e9497e886 Cycles: add support for Arm Neon instructions using sse2neon
Based on patch contributed by Apple and Stefan Werner.

Ref D8237, T78710
2021-02-17 16:26:24 +01:00
Brecht Van Lommel
68dd7617d7 Cycles: add utility functions for zero float2/float3/float4/transform
Ref D8237, T78710
2021-02-17 16:26:24 +01:00
Brecht Van Lommel
8119f0aad2 Cycles: refactor intrinsic functions implementation
* Add processor independent fallbacks
* Use uint32_t and uint64_t types
* Remove unused functions
* Better comments and less indentation

Ref D8237, T78710
2021-02-17 16:26:24 +01:00
Brecht Van Lommel
db28411fd9 BLI: use sse2neon to emulate SSE instructions with Arm Neon
* WITH_CPU_SSE was renamed to WITH_CPU_SIMD, and now covers both SSE and Neon.
* For macOS sse2neon.h is included as part of the precompiled libraries.
* For Linux it is enabled if the sse2neon.h header file is detected. However
  this library does not have official releases and is not shipped with any Linux
  distribution, so manual installation and configuration is required to get this
  working.

Ref D8237, T78710
2021-02-17 16:26:24 +01:00
Brecht Van Lommel
859118d8f6 BLI: add BLI_simd.h header to wrap SSE includes
In preparation of adding Neon support.

Ref D8237, T78710
2021-02-17 16:26:24 +01:00
Nathan Craddock
ac680c569e Merge branch 'blender-v2.92-release' 2021-02-17 08:13:42 -07:00
Nathan Craddock
e3dad81164 Cleanup: Missing word in rna description
One of the sentences changed recently in rBc63df3b33f01 was missing
a word. No functional changes.
2021-02-17 08:12:51 -07:00
Philipp Oeser
56f4397a3b Merge branch 'blender-v2.92-release' 2021-02-17 16:05:33 +01:00
Philipp Oeser
6247b8cc77 Fix T85722: missing updates adding modifiers via python
Was reported for Geometry Nodes Editor "New" button, but was true for
any modifier added via modifiers.new().

Now just add appropriate nofifier.

Maniphest Tasks: T85722

Differential Revision: https://developer.blender.org/D10450
2021-02-17 15:57:29 +01:00
Brecht Van Lommel
5b6a3a57fb Merge branch 'blender-v2.92-release' 2021-02-17 15:56:24 +01:00
Jeroen Bakker
0cbbb9edd7 Cleanup: Split COM_compositor into multiple functions. 2021-02-17 15:41:03 +01:00
Hans Goudey
53bf04f284 Geometry Nodes: Expose material index attribute
The `material_index` attribute can adjust which material in the list
will be applied to each face of the mesh. There are two new things
about this attribute that haven't been exposed by the attribute API yet.
Each comes with limitations:
 1. Integer data type: Most attribute nodes are currently written to use
    float data types. This means that they can't write to this attribute
    because they can't change the type of a built-in attribute.
 2. Polygon domain: This is our first attribute using the polygon domain,
    meaning until some of the interpolations are implemented, some
    operations may not work as expected.

Currently the two nodes that work with this attribute are Attribute Fill
and Attribute Randomize.

Differential Revision: https://developer.blender.org/D10444
2021-02-17 08:30:15 -06:00
Jeroen Bakker
37de612104 Cleanup: make local vars const. 2021-02-17 15:25:24 +01:00
Jeroen Bakker
4329a01d37 Cleanup: Bundle static globals in struct 2021-02-17 15:25:24 +01:00
Jeroen Bakker
52b2cb6ea3 Cleanup: Comment style 2021-02-17 15:25:24 +01:00