Commit Graph

112862 Commits

Author SHA1 Message Date
Campbell Barton
b45a3e8747 Cleanup: remove dead code in vfont_to_curve
Also replaces numbers with character literals for tab/space.
2022-02-24 13:14:33 +11:00
Kévin Dietrich
24450fa142 Merge remote-tracking branch 'origin/blender-v3.1-release' 2022-02-24 03:01:44 +01:00
Campbell Barton
d59f45fb15 Cleanup: remove dead code from text wrapping logic
Error from original commit in 2005,
97df61a7e5391e302d1a5f9069cf0b388f85e0c8.
2022-02-24 12:53:11 +11:00
Campbell Barton
e83e7d49b6 Cleanup: use continue instead of goto for 3D text wrapping logic 2022-02-24 12:53:09 +11:00
Kévin Dietrich
ba274d20b4 Fix T95959: crash when exporting subdivision to Alembic
When exporting generated coordinates, the subdivision export code was
using the schema for the non-subdivision case, which is invalid as
non-initialized. This typo existed since the initial commit for the
feature (rBf9567f6c63e75feaf701fa7b78669b9a436f13dd).
2022-02-24 02:46:33 +01:00
Campbell Barton
affed12bb9 Merge branch 'blender-v3.1-release' 2022-02-24 12:19:17 +11:00
Campbell Barton
c9582b2752 Fix T95116: Scale to fit fails with a single word & non-zero Y-size
The scale-to-fit option did nothing for single words when
the text box had a height. This happened because it was expected that
text would be wrapped however single words never wrap.

Now the same behavior for zero-height text boxes is used when text
can't be wrapped onto multiple lines.
2022-02-24 12:18:39 +11:00
Hans Goudey
f8fe0e831e Curves: Use simpler "set" behavior for handle position attributes
The handle position attributes `handle_left` and `handle_right` had
rather complex behavior to get expected behavior when aligned or auto/
vector handles were used. In order to simplify the attribtue API and
make the transition to the new curves data structure simpler, this
commit moves that behavior from the attribute to the "Set Handle
Positions" node. When that node is used, the behavior should be the
same as before. However, if the modifier's output attributes were used
to set handle positions, the behavior may be different. That situation
is expected to be very rare though.
2022-02-23 15:44:55 -05:00
Johnny Matthews
756f7fb23e Geometry Nodes: Face is Planar Node
This adds a node with a boolean field output which returns true if all of the
points of the evaluated face are on the same plane. A float field input allows
for the threshold of the face/point comparison to be adjusted on a per face basis.

One clear use case is to only triangulate faces that are not planar.

Differential Revision: https://developer.blender.org/D13906
2022-02-23 14:19:54 -06:00
Aaron Carlisle
86fc63c4ca Cleanup: Simplify manual url version handling
Recently we changed the build pipeline to always create a version
number in the url and point 'dev' to the latest version rather than creating the version number url once we release.

This makes the check to `bpy.app.version_cycle` unnecessary.
2022-02-23 15:00:16 -05:00
Ray Molenkamp
6ca85a8cf1 Fix: Build issue on windows
tbb/enumerable_thread_specific.h drags in windows.h
which will define min/max macro's unless you politely
ask it not to.

it's bit of an eyesore, but it is what it is
2022-02-23 12:27:02 -07:00
Aaron Carlisle
88712453f6 Fix error with SPDX-License-Identifier 2022-02-23 14:16:46 -05:00
Aaron Carlisle
572acba5d1 Merge branch 'blender-v3.1-release' 2022-02-23 14:12:48 -05:00
Aaron Carlisle
80be63e2a5 Update RNA to user manual mapping file 2022-02-23 14:10:52 -05:00
Johnny Matthews
b93d4faba8 Fix for last commit: Define for Node numbering 2022-02-23 13:04:46 -06:00
Hans Goudey
81e89a444e Merge branch 'blender-v3.1-release' 2022-02-23 14:01:20 -05:00
Brecht Van Lommel
99a6392fb5 Fix OSL trace() not being fully updated for ray offsetting removal
This was the last place still using the ray_offset() function.
2022-02-23 20:01:03 +01:00
Hans Goudey
dbef66c32f Fix T95952: Uninitialized value used in Bezier Segment node
0fd72a98ac1377a385b6 called functions to set bezier handle positions
that used uninitialized memory. The fix is to define the handle positions
explicitly, like before.
2022-02-23 13:57:04 -05:00
Hans Goudey
7518adc5bb Fix: Attempt to fix build error on windows
`index_mask.cc` ends up including this header, but not much else,
the `<algorithm>` include is necessary on Windows for `std::max`.
2022-02-23 13:02:06 -05:00
Jacques Lucke
226f0c4fef Curves: initial brush implementations for curves sculpt mode
The main goal here is to add the boilerplate code to make it possible
to add the actual sculpt tools more easily. Both brush implementations
added by this patch are meant to be prototypes which will be removed
or refined in the coming weeks.

Ref T95773.

Differential Revision: https://developer.blender.org/D14180
2022-02-23 16:56:27 +01:00
Johnny Matthews
120f16fa1f Geometry Nodes: Duplicate Elements Node
This adds a node which copies part of a geometry a dynamic number
of times.

Different parts of the geometry can be copied differing amounts
of times, controlled by the amount input field. Geometry can also
be ignored by use of the selection input.

The output geometry contains only the copies created by the node.
if the amount input is set to zero, the output geometry will be
empty. The duplicate index output is an integer index with the copy
number of each duplicate.

Differential Revision: https://developer.blender.org/D13701
2022-02-23 09:08:16 -06:00
Hans Goudey
e32b676baf Merge branch 'blender-v3.1-release' 2022-02-23 09:58:41 -05:00
Hans Goudey
398538b914 Fix T95987: Data transfer modifier custom normals crash
59343ee1627f4c369e missed one case of normals being
retrieved from polygon custom data instead of the normals API.
The fix is simple.
2022-02-23 09:49:25 -05:00
Hans Goudey
1361c6e604 Curves: Add methods to retrieve range for points or curves 2022-02-23 08:54:35 -05:00
Richard Antalik
b9ce036d6b Merge branch 'blender-v3.1-release' 2022-02-23 14:33:53 +01:00
Richard Antalik
867e50b886 Fix T95183: Cage gizmo axis unreliable
`orient_matrix` was not initialized.

Reviewed By: lichtwerk

Differential Revision: https://developer.blender.org/D14167
2022-02-23 14:25:00 +01:00
Campbell Barton
391c3848b1 NDOF: make camera view/pan behavior optional
User request since adding this option in:
51975b89edfcc02131f1f8248e1b3442ea2778fa

When disabled, use the previous behavior when orbiting a camera view.
2022-02-23 21:25:46 +11:00
Jacques Lucke
3429444905 BLI: add index mask utilities
Sometimes it is useful to get the index ranges that are in an index mask.
That is because some algorithms can process index ranges more efficiently
than generic index masks.

Extracting ranges from an index mask is relatively efficient, because it is
cheap to check if a span of indices contains a contiguous range.
2022-02-23 11:14:07 +01:00
Campbell Barton
66c0fe5b23 Cleanup: correction to repeated word removal & correct spelling 2022-02-23 20:47:14 +11:00
Campbell Barton
7393cc1db7 Cleanup: Remove repeated word in comments 2022-02-23 18:24:37 +11:00
Alaska
165b030b19 Cleanup: Remove repeated word in comment
Differential Revision: https://developer.blender.org/D14178
2022-02-23 11:07:04 +05:30
Campbell Barton
3c0fd287cb Merge branch 'blender-v3.1-release' 2022-02-23 16:29:51 +11:00
Campbell Barton
74611e3555 Fix T93331: Gizmo tool options reset when switching tools
Drag Action was constantly resetting itself to "move".

Solve this by storing the tool settings per tool and no longer clear
gizmo properties when activating a new tool.
2022-02-23 16:27:26 +11:00
Hans Goudey
06bc20f61a Fix: Errors in previous cleanup commit
f3ef0763b41155e623 introduced a file by mistake, and didn't add
a new enum type to many switch cases. Sorry for the noise.
2022-02-22 22:15:03 -05:00
Hans Goudey
f3ef0763b4 Cleanup: Use new curves type enum for CurveEval
Though this is less aesthetically pleasing, it makes the transition to the
new curves type (T95941) a bit simpler, and it has to be done anyway.
2022-02-22 21:52:48 -05:00
Campbell Barton
c6df7266c7 CMake: move cmake_consistency_check.py into source/tools/ repo
This isn't needed for building Blender so move this along side
other source checking scripts.
2022-02-23 12:31:46 +11:00
Campbell Barton
e1c33698e6 GNUmakefile: prefer "check_" prefix instead of "test_"
- Reserve "test" for tests & testing frameworks.
- Add "check_mypy" to "make help" text.
- Output to the standard output instead of redirecting to log-files,
  leave redirecting output log-files to the user running the command.
2022-02-23 12:31:46 +11:00
Campbell Barton
4c423ccbd6 CMake: include missing files
Also use SRC_ prefix for source variables so cmake_consistency_check.py
detects these files as being known to CMake.
2022-02-23 12:31:46 +11:00
Campbell Barton
4addc1f31e Tests: temporarily add back tests/check_deprecated.py
The build-bot directly referenced this file and doesn't
have publically available configuration.

Add an empty file until this can be removed by the build scripts.
2022-02-23 12:30:54 +11:00
Hans Goudey
5b4732f81c Cleanup: Use new enum for CurveEval handle types
This will make the transition to the new curves data structure
a bit simple, since the handle types can be copied directly between
the two. The change to CurveEval is simple because it is runtime-only.
2022-02-22 17:37:58 -05:00
Peter Kim
0b9cc6725c XR: Use #ifdef for Vive Focus 3 extension
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-23 06:56:08 +09:00
Aaron Carlisle
d228f05814 Merge branch 'blender-v3.1-release' 2022-02-22 14:40:20 -05:00
Aaron Carlisle
2746238dde Python API Docs: Hide version swtich
This still needs some fixes to be ready for release.
2022-02-22 14:39:51 -05:00
Antonio Vazquez
529f891878 GPencil: Make Fill Dilate expand outside stroke
To keep consistency with the new contract option, the dilate now expand the shape beyond the internal closed area.
2022-02-22 20:03:34 +01:00
Hans Goudey
ad3ee84f4e Cleanup: Remove unused mesh dirty flags
These were only set in two places. One was related to "tessellated loop
normal", and the other derived corner normals. The values were never
checked though, after 59343ee1627f4c369. The handling of dirty face
corner normals is clearly problematic, but in the future it should be
handled like the normal layers on the other domains instead.

Ref D14154, T95839
2022-02-22 13:13:13 -05:00
Hans Goudey
c7a9f76149 Merge branch 'blender-v3.1-release' 2022-02-22 12:47:05 -05:00
Hans Goudey
59343ee162 Fix T95839: Data race when lazily creating mesh normal layers
Currently, when normals are calculated for a const mesh, a custom data
layer might be added if it doesn't already exist. Adding a custom data
layer to a mesh is not thread-safe, so this can be a problem in some
situations.

This commit moves derived mesh normals for polygons and
vertices out of `CustomData` to `Mesh_Runtime`. Most of the
hard work for this was already done by rBcfa53e0fbeed7178.
Some changes to logic elsewhere are necessary/helpful:
- No need to call both `BKE_mesh_runtime_clear_cache` and
  `BKE_mesh_normals_tag_dirty`, since the former also does the latter.
- Cleanup/simplify mesh conversion and copying since normals are
  handled with other runtime data.

Storing these normals like other runtime data clarifies their status
as derived data, meaning custom data moves more towards storing
original/editable data. This means normals won't automatically benefit
from the planned copy-on-write refactor (T95845), so it will have to be
added manually like for the other runtime data.

Differential Revision: https://developer.blender.org/D14154
2022-02-22 12:44:15 -05:00
Bastien Montagne
f3d97498c3 Merge branch 'blender-v3.1-release' 2022-02-22 18:03:27 +01:00
Bastien Montagne
ee9949a85f Fix (unreported) LibOverride: missing copying flag member. 2022-02-22 18:01:52 +01:00
Harley Acheson
29696fb725 UI: ActionZone Swap Areas Between Windows
Allow SCREEN_OT_area_swap to operate between different Blender
windows, and other minor feedback improvements.

See D14135 for more details and demonstrations.

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

Reviewed by Campbell Barton
2022-02-22 08:58:42 -08:00