Commit Graph

112606 Commits

Author SHA1 Message Date
Jacques Lucke 07032dd218 Curves: add initial sculpt mode
This adds a new sculpt mode to the experimental new curves object.
Currently, this mode can only be entered and exited, nothing else.
The main initial purpose of this node will be to use it for hair grooming.

The patch also adds the `editors/curves/` directory for the new curves
object, which will be necessary for many other things as well.

I added a completely new mode (`OB_MODE_SCULPT_CURVES`), because
`OB_MODE_SCULPT` seems to be rather specific to meshes, and reusing
it doesn't seem worth the trouble. The tools/brushes used in mesh vs.
curves sculpt mode are quite distinct as well.

I had to add DNA_userdef_enums.h to make the patch compile with C++
(forward declaration of enums isn't allowed). This follows the same
pattern that we use for other enums in dna.

Differential Revision: https://developer.blender.org/D14107
2022-02-15 12:32:15 +01:00
Campbell Barton 07ed869b94 RNA: add RNA_collection_is_empty & RNA_property_collection_is_empty
Some collections needed to be iterated over to count their length.
Provide a function to check if the collection is empty to avoid this.
2022-02-15 20:13:00 +11:00
Campbell Barton 4637e83990 Merge branch 'blender-v3.1-release' 2022-02-15 19:51:43 +11:00
Campbell Barton 597edd299f Merge branch 'blender-v3.1-release' 2022-02-15 19:51:40 +11:00
Jeroen Bakker 92a3732ff1 Fix T95791: Unable to switch between multiviews.
Root cause is copy pasting buggy code.
2022-02-15 19:51:30 +11:00
Campbell Barton 7083ea36e2 Fix T94085: Crash with empty stroke list 2022-02-15 19:49:02 +11:00
Jeroen Bakker d1c7a252eb Fix T95791: Unable to switch between multiviews.
Root cause is copy pasting buggy code.
2022-02-15 09:41:10 +01:00
Campbell Barton 14dd207b75 License headers: use SPDX for remaining files in Cycles 2022-02-15 17:52:38 +11:00
Campbell Barton 88b6e5571e License headers: use SPDX for remaining CMake find modules & gtests 2022-02-15 17:45:39 +11:00
Campbell Barton fcac0b6fea Fix playing image-sequences with frames containing 9 or more numbers
The path calculation method for animation players: frame-cycler, rv &
mplayer would fail when the number of digits exceeded the range of a
32bit int causing RenderData.frame_path() to raise a ValueError.

Use a simpler method of extracting the range that uses the sign to
detect the beginning of the number.
2022-02-15 17:21:21 +11:00
Campbell Barton fa7bd4c069 Cleanup: move utility to create a frame path into a static method
Add PlayRenderedAnim._frame_path_with_number_char since mixing
this logic inline made the code harder to follow.
2022-02-15 17:16:26 +11:00
Ankit Meel c146d75808 readme.html: replace IRC with blender.chat, fix typo
- Replace IRC links and channels with blender.chat ones.
- Fix mismatch in text vs link of "GIT and Bug Tracker".
- http -> https for blender links
2022-02-15 11:09:40 +05:30
Ankit Meel 14d98d0388 CMake: create readme.html with configure_file
Since the output file stays unmodified for most developer builds,
install step installed it redundantly.

Create readme.html using `configure_file`:
- Now it's modified only if final output changes (handled by CMake).
- If input file (from git) or blender version changes,
  it //will// be modified.

Also don't re-implement what CMake can do.

Reviewed By: campbellbarton, LazyDodo
Differential Revision: https://developer.blender.org/D13863
2022-02-15 10:14:35 +05:30
Campbell Barton 9d01358a68 Cleanup: unused argument warnings 2022-02-15 13:04:31 +11:00
Campbell Barton e3a18a890d Cleanup: minor changes to Python argument parsing loop
- Increment the argument index at the end of the loop.
  Otherwise using the index after incrementing required subtracting 1.
- Move error prefix creation into a function: `pyrna_func_error_prefix`
  so it's possible to create an error prefix without duplicate code.

This simplifies further changes for argument parsing from D14047.
2022-02-15 12:57:59 +11:00
Brecht Van Lommel a9a05d5597 Merge branch 'blender-v3.1-release' 2022-02-15 01:05:47 +01:00
Brecht Van Lommel facd9d8268 Cleanup: clang-format 2022-02-15 01:05:25 +01:00
Hans Goudey 3d1e978257 Merge branch 'blender-v3.1-release' 2022-02-14 18:01:52 -06:00
Hans Goudey 1f7f7ca14e Fix T95720: Spreadsheet missing volume grid info
The cell drawing code in 474adc6f88 was missing an
implementation for virtual arrays of strings.
2022-02-14 18:00:45 -06:00
Clément Foucault d7d827789b GLShaderInterface: Fix undefined behavior when attributes are optimized away.
Optimized out attributes returns an invalid location `-1` resulting in
an undefined behavior shift.
2022-02-15 00:48:18 +01:00
Clément Foucault 89b47c1214 Merge branch 'blender-v3.1-release' 2022-02-15 00:11:23 +01:00
Clément Foucault 302c74e596 GLCompute: Apply state before dispatch 2022-02-15 00:10:50 +01:00
Clément Foucault b744081f83 GLDebug: Fix severity check
The check was reversed, leading to less errors being reported.
2022-02-15 00:02:31 +01:00
Clément Foucault 19b21563d6 GPUTexture: Fix missing enum cases in `to_component_len()`
This might have caused undersized buffer if using the wrong formats with
`GPU_texture_read()`.
2022-02-15 00:01:04 +01:00
Hans Goudey ad1f8a50b0 Cleanup: Use C++ math functions
Use functions from the `math` and `std` namespaces instead
of from `BLI_math_vector.h`.
2022-02-14 15:48:46 -06:00
Hans Goudey 761274fc19 Merge branch 'blender-v3.1-release' 2022-02-14 12:35:33 -06:00
Hans Goudey 33d5ecd5b5 Fix T95252: Move duplicate node doesn't do edge-panning
Set "view2d_edge_pan" to true for the NODE_OT_translate_attach operator,
which is used by the duplication operator. This is done in the keymap so
that it's not hard-coded.

Differential Revision: https://developer.blender.org/D13934
2022-02-14 12:34:54 -06:00
Hans Goudey 7773393d35 Cleanup: Pass const Scene to mesh evaluation 2022-02-14 12:05:54 -06:00
Sergey Sharybin e26194e80d Merge branch 'blender-v3.1-release' 2022-02-14 18:31:19 +01:00
Sergey Sharybin 6ae08da5c8 Fix T95756: Crash inserting geometry node after linking modifier
The root issue was caused by a mistake in modifier copy data which was
wrongly re-generating source modifier data identifier.

The c8cca88851 simply exposed a bug in code which always was there
since the modifiers session UUID was introduced.

Shows an importance of const qualifier :)
2022-02-14 18:19:13 +01:00
Thomas Dinges 19403fc852 Merge branch 'blender-v3.1-release' 2022-02-14 17:48:52 +01:00
Thomas Dinges a5edff4b73 Fix T95778, the macOS minimum versions have been increased for Metal. 2022-02-14 17:47:35 +01:00
Antonio Vazquez d8e2f612ec Cleaunp: Modify comment 2022-02-14 16:39:06 +01:00
Kévin Dietrich 56407432a6 Fix T94479: GPU Subdivision surface modifier does not apply to Cycles renders
Since now we delegate the evaluation of the last subsurf modifier in the stack
to the draw code, Cycles does not get a subdivided mesh anymore. This is because
the subdivision wrapper for generating a CPU side subdivision is never created
as it is only ever created via `BKE_object_get_evaluated_mesh` which Cycles does
not call (rather, it accesses the Mesh either via `object.data()`, or via
`object.to_mesh()`).

This ensures that a subdivision wrapper is created when accessing the object data
or converting an Object to a Mesh via the RNA/Python API.

Reviewed by: brecht

Differential Revision: https://developer.blender.org/D14048
2022-02-14 16:36:32 +01:00
Antonio Vazquez 3b14224881 GPencil: Fill Dilate using negative values contract the fill area
This is requested by artist for some animation styles where is necessary to fill the area, but create a gap between fill and stroke.

Also some code cleanup and fix a bug in dilate for top area.

Reviewed By: pepeland, mendio

Differential Revision: https://developer.blender.org/D14082
2022-02-14 16:30:09 +01:00
Kévin Dietrich 0999a01b03 Fix T95320: CacheFile templates crash when used through Python
The crash is caused as we did not check that the RNA pointer is null
before trying to use it. This moves the existing checks from the
modifier panels into the template functions so the logic is a bit
centralized.
2022-02-14 16:13:25 +01:00
Brecht Van Lommel 65d4c58060 Fix Cycles assert in debug mode after recent changes
We sometimes call start() on already started renders, just do nothing then.

Ref D14086
2022-02-14 15:45:11 +01:00
Kévin Dietrich 15141ec19a Merge remote-tracking branch 'origin/blender-v3.1-release' 2022-02-14 14:49:11 +01:00
Kévin Dietrich 993839ce85 Fix T95177: GPU subdiv crashes mirror modifier in edit-mode
The issue has two causes: on one hand origin indices were not handled
properly, on the other hand the extraction type (Mesh, BMesh, or mapped)
was not detected correctly.

For the second case reuse the MeshRenderData creation from the coarse
code path so that we make the same decisions. Loose geometry extraction
had to be updated to properly handle the BMesh cases.

For the origin indices, in some cases (for edges and faces), the arrays
used by the subdivision code already have the origin indices baked into
them, so mapping them a second time through the origin index layer is
wrong, and could cause out of bounds accesses.

For vertices especially, we would use two arrays: one for mapping
subdivision vertices to coarse vertices, and another one to map coarse
vertices to subdivision loops used for the selection index buffer. The
second one is now removed (which saves a bit of memory) as it is did not
have the proper data setup for use with the origin indices and we can
easily compute it using the first array anyway.
2022-02-14 14:48:44 +01:00
Bastien Montagne 06a492cfdc Fix (studio reported) crash in new resync code.
We do not always resync/replace the root ID of a hierarchy now that we
do partial resync.
2022-02-14 13:26:42 +01:00
Bastien Montagne c32d3a175d Merge branch 'blender-v3.1-release' 2022-02-14 12:07:59 +01:00
Bastien Montagne 3a9a37d6dc Fix T95601: Missing handling of keyingsets ID pointers in lib_query/foreach_id code.
This will have to be backported to 2.93 and possibly 2.83 if possible.
2022-02-14 12:05:11 +01:00
Sybren A. Stüvel 777953f36b Merge remote-tracking branch 'origin/blender-v3.1-release' 2022-02-14 11:09:34 +01:00
Sybren A. Stüvel e0fd31f083 Fix segfault calling `id_properties_ui("prop").update()`
Fix segfault when calling `some_id.id_properties_ui("propname").update()`,
i.e. call the `update()` function without any keyword arguments. In such
a case, Python passes `kwargs = NULL`, but `PyDict_Contains()` is not
`NULL`-safe.
2022-02-14 11:08:53 +01:00
Jeroen Bakker 48e2bf3638 Merge branch 'blender-v3.1-release' 2022-02-14 11:00:30 +01:00
Jeroen Bakker 1236d2aea8 Cleanup use c style comments. 2022-02-14 10:58:45 +01:00
Jeroen Bakker d23cf42ba7 Fix T95725: Changing render slot doesn't update displayed image.
Fixed by checking the requested pass, layer and view against the
previous used one.
2022-02-14 10:54:21 +01:00
Jeroen Bakker ab71d833c7 Phase out IMA_GPU_REFRESH.
IMA_GPU_REFRESH is replaced by
BKE_image_partial_update_mark_full_update and should not be used
anymore.
2022-02-14 10:33:56 +01:00
Jeroen Bakker efac4db166 Merge branch 'blender-v3.1-release' 2022-02-14 09:42:03 +01:00
Jeroen Bakker f0e32ef4ff Fix T95699: Compostior backdrop not updated.
The Viewer marked the gpu texture to be out of date. But it should have used
the mark_full_update as the gpu textures
are only used by the render/draw engines.

The image/node editor uses the image engine that have its own GPU textures.
2022-02-14 09:21:05 +01:00