Commit Graph

125523 Commits

Author SHA1 Message Date
Campbell Barton
3c6239969e Cleanup: add size suffix to IMA_MAX_RENDER_TEXT
This read like a flag, when it's a string buffer size.
2023-06-27 14:51:03 +10:00
Campbell Barton
9c105065ee Cleanup: remove unused flags 2023-06-27 14:48:46 +10:00
Campbell Barton
0222876a34 Cleanup: replace defines with enum in DNA
- Group ambiguous flags Object::flag & Base::legacy_flag.
- Replace ambiguous hints (e.g. `paf->flag` with doxygen types).
- Remove unused flag PAF_MAXMULT.
2023-06-27 14:45:00 +10:00
Campbell Barton
863d93fe46 License headers: add SPDX-FileCopyrightText 2023-06-27 13:00:06 +10:00
Campbell Barton
562aca75d3 Cleanup: split anim/sequence loading into two functions
Also simplify image sequence reading loop.
2023-06-27 10:42:18 +10:00
Campbell Barton
c761f5b6fb PlayAnim: scale the font by the window DPI 2023-06-27 10:08:17 +10:00
Campbell Barton
4bbbf9007b Refactor: split out buffer loading for the animation player
- Simplify freeing resources on error.
- Correct check for failure to access the file size.
- Print the `errno` on failure.
- Use logging.
2023-06-27 10:06:34 +10:00
Iliya Katueshenock
3957a1ad03 Geometry Nodes: Mix Rotations
Add support a new Rotation socket/data type to a Mix node.

Rotation socket avala ible only in Geometry Nodes right now,
list of supported types for node depend on own node tree type.

Mixing kind is slerp (interpolation) of a quaternion. As initial
phase this is enough. In a future, other modes of interpolation
can be added (Euler for XY+Z, YZ+X, ZX+Y, ...). Clamping for
factor work the same as for all other data types.

Drag and drop should take care avoiding create links between
Rotation sockets and all other socket types, this requires chages
is mix node callback for drag & drop system.

See: https://projects.blender.org/blender/blender/issues/92967

Pull Request: https://projects.blender.org/blender/blender/pulls/109084
2023-06-27 00:50:53 +02:00
Hans Goudey
bef20cd3f1 Curves: Share positions array for single point profile at origin
This is the same as 48fad9cd0c9693e4dbb3 but applied to the positions
array instead of other generic attributes. For test case with 90k poly
curves, this reduced the conversion time from 1.7 to 1.3 ms, and reduced
memory usage from 67 to 59 MiB (as reported by Blender).
2023-06-26 15:45:41 -04:00
Iliya Katueshenock
6bccea2ceb Cleanup: Remove unused variable in a add node search function
Pull Request: https://projects.blender.org/blender/blender/pulls/109385
2023-06-26 19:59:42 +02:00
Hans Goudey
49977c3aee Cleanup: Remove unused variable in curve to mesh conversion 2023-06-26 13:56:26 -04:00
Hans Goudey
48fad9cd0c Curves: Optimize curve to mesh with single point profile
When the profile is a single point, and all the curves are poly curves,
the mesh has the same number of points as the curves, and attributes
can be shared, reducing memory usage and time spend copying. This
doesn't apply to positions yet though. With 8 attributes, the
time for the conversion in a test went from 55 to 14 ms.

When profile is a single point but the curves aren't poly curves,
we can evaluate main point attributes directly into the mesh attribute
arrays rather than using a temporary buffer. In a test with 8
attributes, the time went from 3.7 to 1.6 ms.
2023-06-26 13:52:52 -04:00
Hans Goudey
6e9f54cbda Curves: Avoid calculations in curve to mesh single point case
When the profile is the default (or manually set to a single point at
the origin), avoid computing tangents and normals, and avoid evaluating
the radius attribute. That data is only used to build the transforms of
the new points. In a simple test case, this changed the total time from
34.4 to 14.7 ms (removing the cost 4.7, 8.4, and 2.1 ms) cost of
calculating tangents, normals, and radii.
2023-06-26 13:52:52 -04:00
Thomas Dinges
588975739a Merge branch 'blender-v3.6-release' 2023-06-26 19:45:08 +02:00
Thomas Dinges
91ca4f581b Release: Update license file for OpenSSL 3.0.9. 2023-06-26 19:44:09 +02:00
Xavier Hallade
4038cabc6d EEVEE: Remove unneeded GPU_finish
A GPU_finish for each EEVEE_render_draw was initially added by
3f0873fa1e48e277f85801ca03c344bed4a77320 but it introduces
important GPU execution gaps during rendering.

Removing it gives a ~10% improvement on Intel Arc / Windows from
our testing with Red Autumn Forest scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/109382
2023-06-26 19:36:09 +02:00
Germano Cavalcante
7d54a756b9 Snap: Optimization: Create BVHTree from loose vertices only
Since snapping to endpoints is already done when you snap to edges
together, there is no need to create a bvhtree with all the vertices.

Also use the appropriate endpoint definition for snap to armatures.
2023-06-26 14:04:03 -03:00
Germano Cavalcante
fcb2b99f2b Cleanup: Rename variables used in snap code
Many variables have been renamed to make their usage clearer in the
snap code.

- `color_line` -> `source_color`;
- `color_point` -> `target_color`;
- `loc_prev` -> `source_loc`;
- `loc_curr` -> `target_loc`;
- `normal` -> `target_normal`;
- `snap_elem_type` -> `target_type`;
- `snapElem` -> `target_type`;
- `Nearest2dUserData` -> `SnapData`;
- `SCE_SNAP_TO_VERTEX` -> `SCE_SNAP_TO_POINT` or `SCE_SNAP_TO_EDGE_ENDPOINT`;
- `SnapData_EditMesh` -> `SnapCache_EditMesh`;
- `sod` -> `em_cache`;

Also: make-format
2023-06-26 13:47:06 -03:00
Richard Antalik
438ff8fd04 VSE: Ensure retiming handle at strip right handle
When strip is split it is hard to add new retiming handle to it's end.
Ensuring this handle exists greatly improves workflow.
2023-06-26 18:26:58 +02:00
Falk David
b61316c7ad GPv3: Add operator to add new layer group 2023-06-26 18:23:08 +02:00
Falk David
8a39f438c3 Fix compiler warning 2023-06-26 18:22:33 +02:00
Falk David
34d65eff1b Fix: Memory leak in grease_pencil.layer_reorder 2023-06-26 18:14:05 +02:00
Falk David
3d4cdd6b88 Fix: Typo in grease_pencil.layer_add description 2023-06-26 18:14:05 +02:00
Germano Cavalcante
9b1e56f013 Transform: Show Snap Base when adding multiple snap points
This is part of what was implemented in #109062

When adding multiple snap points (`A` key), the 'Snap Base' location no longer corresponds to the snap target point, so it becomes invisible.

Therefore, show the resulting `Snap Base` during this operation.

Pull Request: https://projects.blender.org/blender/blender/pulls/109379
2023-06-26 17:41:15 +02:00
Thomas Dinges
dac8ef53a3 Merge branch 'blender-v3.6-release' 2023-06-26 17:15:48 +02:00
Thomas Dinges
08ffb77279 Release: Updates for freedesktop file. 2023-06-26 17:14:40 +02:00
Falk David
b69bba25ad GPv3: Add python endpoint to get/set active layer 2023-06-26 17:04:15 +02:00
Falk David
9f05936212 GPv3: Change name_plural to "grease_pencils_v3"
This is more consistent with the rest of the RNA names used.
2023-06-26 17:04:15 +02:00
Almaz Shinbay
4094cd207a Outliner: Remove isExpandValid() from AbstractTreeElement and its sub-classes
No user visible changes expected.

Part of #96713, continuation of work started in 249e4df110 and 2e221de4ce.
Refer to these for a motivation and design overview.

Removes `isExpandValid()` from `AbstractTreeElement` and its sub-classes as all ID elements are ported to new tree-element code design. It was meant to be temporary for this transition phase.

Pull Request: https://projects.blender.org/blender/blender/pulls/109380
2023-06-26 16:59:44 +02:00
Julian Eisel
adb370e6ba UI: Use new C++ button apply function
No user visible changes expected.

This function was added in 86b2cf4574 as a more type safe and more
convenient way of setting button callbacks. So use it for simple cases.
2023-06-26 16:56:05 +02:00
Julian Eisel
0b19ab2cde UI: Add type-safe C++ button apply function object
No user visible changes expected.

Rather than relying on a C-style function pointer with void pointer
arguments, allow storing a `std::function` object, which can hold
arbitrary data in a type safe way. This can be conveniently used with
lambdas for example.

This is not used yet, but will be with #104831 merged. Replacing the
existing C-style callback uses with this can be done separately.

Pull Request: https://projects.blender.org/blender/blender/pulls/109016
2023-06-26 16:39:51 +02:00
Germano Cavalcante
c856d29e9f Fix assert in recent commit
It was supposed to be `!=` instead of `==`.
2023-06-26 11:20:41 -03:00
Almaz Shinbay
89f61015d1 Outliner: Port remaining ID elements to new tree-element code design
No user visible changes expected.

Part of #96713, continuation of work started in 249e4df110 and 2e221de4ce.
Refer to these for a motivation and design overview.

Adds a default expansion for `TreeElementID`, removing the need for `outliner_add_id_contents()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/109256
2023-06-26 16:11:30 +02:00
Germano Cavalcante
c02333f37e Fix snap to perpendicular acting on default Snap Base
Snap to Edge Perpendicular has been disabled in Set Snap Base.
2023-06-26 11:03:47 -03:00
Germano Cavalcante
bfe4fb92f9 Fix #109346: Strange snapping behaviour
The problem was caused because the `Nearest2dUserData::obmat_` member
was deallocated in derived classes even before the main class
destructor was called.

This is strange behavior and only seen in Mac or Linux Release builds.

The solution is to not rely on the destructor to register snap values.

So create a separate function.
2023-06-26 10:52:50 -03:00
Falk David
2418252ea7 Refactor: Move stroke_cache to gpencil runtime
This moves the `stroke_cache` that was previously stored on every
drawing to the `GreasePencilRuntime` struct.

Since this cache is only used for when a user is drawing a stroke, there
can only ever be one. It makes more sense to have this cache on the
data-block runtime data, rather than every drawings runtime data.
2023-06-26 15:49:18 +02:00
Falk David
5dd29c9a05 Fix: Uses of foreach_editable_drawing callbacks
Some of the uses of the API have not been updated properly.
2023-06-26 15:19:12 +02:00
Miguel Pozo
97d6b5ad72 Fix GCC warnings 2023-06-26 15:11:11 +02:00
Damien Picard
44d012ce1d I18n: disambiguate a few messages
- "Front"/"Back": 'put something at the front/back' or 'the front/back
  face of something'. (e. g. the Empty Image options, Depth and Side
  option, both use the same strings as enum, which should be avoided
  in some languages).
- "Flip": invert, as in normals, or mirror, as in an image.
- "Path": a path to a resource, in general a file but sometimes a
  datablock, as opposed to a trajectory in space.
- "Join": disambiguate for the Grease Pencil operator, which may use a
  different word as that for meshes.
- "Wave": an ondulating motion, as opposed to a fluid dynamics motion.
- "Step": can mean the distance between two things, or a number of
  times to do something. In this case it is better to use the plural.
- "Edge": generally the edges of a mesh, but can also mean edge
  detection. Additionally, it was used for the option to enable
  Freestyle. This was changed to "Use Freestyle".
- "Boundary": the limit of a grease pencil drawing for filling
  purposes, as opposed to the external limit of a (non-manifold) mesh.
- "Rotations": can be translated to something like "Turns", in the
  context of a spiral.

Pull Request: https://projects.blender.org/blender/blender/pulls/108213
2023-06-26 15:07:06 +02:00
Falk David
0a693165c8 Refactor: Move GreasePencilDrawing functionality
Moves the functions from `GreasePencilDrawing` to a C++ wrapper class.
2023-06-26 14:58:42 +02:00
Jacques Lucke
af476f6a62 Nodes: fix zone detection for some special cases
This fixes crashes in the cases when:
* Two zones have a cyclic parent relationship.
* A node has more than one direct parent zone.
2023-06-26 14:33:37 +02:00
Jeroen Bakker
60a3dbaba9 Cleanup make format 2023-06-26 14:20:31 +02:00
Jeroen Bakker
29ad8750a5 Merge branch 'blender-v3.6-release' 2023-06-26 14:16:22 +02:00
Stephen Luce
659c7f6050 Cycles: remove redundant bounds checks in CPU image sampling
For repeat / extend / mirror mode, both wrap and read_clip functions did
the bounds check. Removing it improves performance between 0.5% and 1.5%
in the classroom scene in one test. Clip mode is unchanged.

Pull Request: https://projects.blender.org/blender/blender/pulls/109304
2023-06-26 14:13:02 +02:00
Jeroen Bakker
f7d46d0644 Fix 107322: MacOS/ATI Crash When Starting Eevee
When using ATI GPU on MacOS/Metal compilation of Eevee shaders crashed due to an infinitive
loop in the compiler backend. This change fixes this by using a more reliable loop that
ensures that the loop will be finite.

Thanks for the Apple developers working on finding the root cause and Michael Parking White
for the initial fix.

Fixes #107322
Fixes #107451

Pull Request: https://projects.blender.org/blender/blender/pulls/109358
2023-06-26 14:12:45 +02:00
Iliya Katueshenock
0f36f44db8 Fix #109295: Adding simulation item inconsistent with group interface
Use not only index of active slot, but also name and socket type.

Pull Request: https://projects.blender.org/blender/blender/pulls/109303
2023-06-26 14:07:26 +02:00
Falk David
497f9a6941 GPv3: Add operator to reorder the active layer
This operator will reorder the active layer (if there is one) to be above or below the target layer (specified by name).

Pull Request: https://projects.blender.org/blender/blender/pulls/109369
2023-06-26 14:03:28 +02:00
Iliya Katueshenock
d392a8f111 Fix (unreported): Memory leak when adding strip in VSE
Using unsupported movie file when adding movie strip causes memory leak.

Pull Request: https://projects.blender.org/blender/blender/pulls/109078
2023-06-26 13:57:33 +02:00
Damien Picard
9d5ab0a88f I18n: fix translation of undo history
The Undo History menu displays each undo step's name. These are either
operators or property names. Operators are translated upon display,
and they use the operator name. Currently, many of them are not
translated because they do not use the proper translation
context.

This commit changes the translation context to
BLT_I18NCONTEXT_OPERATOR_DEFAULT ("Operator").

Pull Request: https://projects.blender.org/blender/blender/pulls/108872
2023-06-26 12:55:52 +02:00
Bastien Montagne
21f5c7c45f Merge branch 'blender-v3.6-release' 2023-06-26 12:37:11 +02:00