Commit Graph

103861 Commits

Author SHA1 Message Date
Campbell Barton
ed2e42d62c Merge branch 'blender-v4.0-release' 2023-10-16 10:35:39 +11:00
Iliya Katueshenock
4d91c50b62 Fix #113429: Dirty evaluated curve
Tag curve topology as dirty after changing of types of handles.

Pull Request: https://projects.blender.org/blender/blender/pulls/113717
2023-10-15 20:59:21 +02:00
Jacques Lucke
d76263de96 Merge branch 'blender-v4.0-release' 2023-10-15 20:50:12 +02:00
Jacques Lucke
c584b6434f Fix #113691: crash when Interpolate Curves input has zero curves
The crash happened only when there was a `Curves` geometry, but
it was empty.
2023-10-15 20:49:48 +02:00
Hans Goudey
030932e8df Merge branch 'blender-v4.0-release' 2023-10-15 20:31:50 +02:00
Jacques Lucke
38813a7441 Nodes: unify static and dynamic declarations
This helps solving the problem encountered in #113553. The problem is that we
currently can't support link-drag-search for nodes which have a dynamic declaration.

With this patch, there is only a single `declare` function per node type, instead of
the separate `declare` and `declare_dynamic` functions. The new `declare` function
has access to the node and tree. However, both are allowed to be null. The final
node declaration has a flag for whether it depends on the node context or not.

Nodes that previously had a dynamic declaration should now create as much of
the declaration as possible that does not depend on the node. This allows code
like for link-drag-search to take those sockets into account even if the other
sockets are dynamic.

For node declarations that have dynamic types (e.g. Switch node), we can also
add extra information to the static node declaration, like the identifier of the socket
with the dynamic type. This is not part of this patch though.

I can think of two main alternatives to the approach implemented here:
* Define two separate functions for dynamic nodes. One that creates the "static
  declaration" without node context, and on that creates the actual declaration with
  node context.
* Have a single declare function that generates "build instructions" for the actual
  node declaration. So instead of building the final declaration directly, one can for
  example add a socket whose type depends on a specific rna path in the node.
  The actual node declaration is then automatically generated based on the build
  instructions. This becomes quite a bit more tricky with dynamic amounts of sockets
  and introduces another indirection between declarations and what sockets the node
  actually has.

I found the approach implemented in this patch to lead to the least amount of
boilerplate (doesn't require a seperate "build instructions" data structure) and code
duplication (socket properties are still only defined in one place). At the same time,
it offers more flexibility to how nodes can be dynamic.

Pull Request: https://projects.blender.org/blender/blender/pulls/113742
2023-10-15 20:28:23 +02:00
Hans Goudey
601fba20a6 Fix #113619: Incorrect nested group assets in compositor add menu
The menu structure currently needs to be duplicated in the code to avoid
adding assets to more than one menu. This was done for geometry nodes
in b49c84276c but was missed for the compositor and shader
nodes. Also remove an unnecessary separator.
2023-10-15 19:52:38 +02:00
Hans Goudey
e083be6a9c Fix #113737: Missing UI text for geometry nodes handle type properties 2023-10-15 19:19:42 +02:00
Harley Acheson
d578170131 Cleanup: Make format
Format changes resulting from Make Format
2023-10-15 09:09:30 -07:00
Harley Acheson
03655189d7 Fix #113735: Space Characters in UI Text Entry #113749
With #113707 text cursor position is set using the character's visible
bounds, so special care is needed for those without bounds like space.
Forgot this also applies to 4.0.
2023-10-15 09:06:44 -07:00
Harley Acheson
b6131cc338 Cleanup: Make format
Formatting changes resulting from Make Format
2023-10-15 08:45:11 -07:00
Harley Acheson
c6c86b555d Fix #113735: Space Characters in UI Text Entry
With #113707 text cursor position is set using the character's visible
bounds, so special care is needed for those without bounds like space.

Pull Request: https://projects.blender.org/blender/blender/pulls/113749
2023-10-15 17:42:28 +02:00
Harley Acheson
1423ece1eb Cleanup: Compilation Error in wm_playanim.cc
If compiling without WITH_AUDASPACE a structure contains too many
initializers. Caused by 4454561a5f
2023-10-15 07:56:11 -07:00
Clément Foucault
ba89723abc Cleanup: EEVEE-Next: Volume AABB
Make interface a bit more lined up with the
rest of the BLI API. Also use more of the
vector API.
2023-10-15 15:07:44 +02:00
Jacques Lucke
14fa963910 Cleanup: move node declaration code out of header 2023-10-15 12:43:02 +02:00
Campbell Barton
46dedaf960 Cleanup: use C++ style casts in for the animation player 2023-10-15 15:04:35 +11:00
Campbell Barton
a3243cf5c3 PlayAnim: errors loading images are now shown in the UI
It's unlikely most users will see these messages in the stdout,
show them after the filepath as well as logging them.
2023-10-15 15:04:32 +11:00
Campbell Barton
63cb5ec1b2 Cleanup: use full sentences for comments in playanim 2023-10-15 15:04:30 +11:00
Campbell Barton
4454561a5f Cleanup: move animation globals into a struct
Avoid having many top-level static variables, make these more clearly
global by moving them into a struct.

Also use less cryptic terms for members.
2023-10-15 15:04:28 +11:00
Campbell Barton
492653e52d Cleanup: move PlayAnimPict from a global into PlayState
Avoid having as many globals, preferring PlayState where possible.
2023-10-15 15:04:27 +11:00
Campbell Barton
e6b9465601 Cleanup: reduce indentation for the animation player argument parsing 2023-10-15 15:04:25 +11:00
Harley Acheson
13de143ba8 Merge branch 'blender-v4.0-release' 2023-10-14 12:00:08 -07:00
Harley Acheson
b772603843 Fix #113682: Improved Text Caret Position
For regular UI text entry, place the text caret exactly between
adjacent glyph bounds instead of just using partial text length to
position it.

Pull Request: https://projects.blender.org/blender/blender/pulls/113707
2023-10-14 20:58:50 +02:00
Harley Acheson
9ee5de05c0 Fix #101058: Allow Cryptomatte Picking Between Windows
Allow the source and target windows to differ when selecting
objects using Cryptomatte.

Pull Request: https://projects.blender.org/blender/blender/pulls/113636
2023-10-14 20:28:00 +02:00
Dalai Felinto
a93238a922 GPv3: Reverse Curve node
Part of #113602.
Ref !113702.
2023-10-14 12:50:02 +02:00
Iliya Katueshenock
690deeda18 Fix: Geometry Nodes: Create instance attribute of the right type
`attributes_to_propagate` is map of all attributes to propagate from different
components. For attribute propagation three different components is taken.
Each one can have named attribute with specific type. Current implementation
of propagation: Try to make implicit share attribute. Or create/copy.
This doesn't takes into account `attributes_to_propagate`' data type info.
So, this cause crash for case, there multiple component have same name attribute
with different type.
Fix: Try to make implicit share attribute with correct type. Or create, copy typed version.

Pull Request: https://projects.blender.org/blender/blender/pulls/110146
2023-10-14 10:54:32 +02:00
Leon Schittek
d9225ac121 Merge branch 'blender-v4.0-release' 2023-10-14 10:07:09 +02:00
Leon Schittek
b93dbaba1d Fix: Node Editor: Improve info panel drawing
Fix papercuts with the info panel:
1. Make the panel extend behind hidden nodes
2. Don't let it become smaller than the node itself, when resizing

Pull Request: https://projects.blender.org/blender/blender/pulls/113411
2023-10-14 09:37:03 +02:00
Campbell Barton
e6933e526c PlayAnim: place the indicator closest to the mouse cursor
The indicator placement was always rounded to the left.
2023-10-14 17:14:14 +11:00
Campbell Barton
f9b403c349 Cleanup: comments, reduce variable scope 2023-10-14 17:02:43 +11:00
Campbell Barton
286c893df7 PlayAnim: support dropping multiple files at once
Previously only a single file was supported (only the first file was
used), now all files are loaded.
2023-10-14 16:04:38 +11:00
Campbell Barton
b1cd144d7e PlayAnim: don't expand sequences when passing in multiple files
Only expand image sequences when a single file is passed in.
This allows shell globing to expand images without expanding each.

Prepare for support multiple file drag & drop where it also doesn't
make sense to expand sequences when dropping multiple files.
2023-10-14 16:00:56 +11:00
Campbell Barton
e23cb0c743 Cleanup: simplify animation player argument handling
The first argument was always ignored, this added a minor complication
to drag & drop as the new argument needed to have a dummy first argument.
2023-10-14 16:00:54 +11:00
Campbell Barton
2e0b844b36 Cleanup: spelling in comments 2023-10-14 13:53:00 +11:00
Harley Acheson
83705a87cb FontBLF: Store Sizes, Styles, and Other Metrics
When loading a font, gather metrics and other information that can help
use it more correctly. Default weight and slant, X-height, cap height,
locations for underline, strike-through, subscripts, etc. Family and
style flags, etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/113432
2023-10-14 02:43:48 +02:00
Harley Acheson
844b78786c Cleanup: Calm Warning in Interface_region_tooltip
Remove warning about unused variable `field_next`

Pull Request: https://projects.blender.org/blender/blender/pulls/113708
2023-10-14 02:14:22 +02:00
Harley Acheson
8919fb8bc7 UI: Fix Placeholder Bad String Comparison
Bad string comparison in ui_but_placeholder_get()

Pull Request: https://projects.blender.org/blender/blender/pulls/113706
2023-10-14 01:42:49 +02:00
Dalai Felinto
7a73f792ed GPv3: Fix Normal Field
Part of #113602.
Ref !113704.
2023-10-14 00:58:02 +02:00
Dalai Felinto
16b7977bb5 GPv3: Set Curve Normal
Part of #113602.
Ref !113704.
2023-10-14 00:58:02 +02:00
Germano Cavalcante
c634a15e85 Fix crash when canceling Vertex Crease with Mirror
Crash due to variables not initialized.
2023-10-13 19:14:42 -03:00
Harley Acheson
d94502b456 Merge branch 'blender-v4.0-release' 2023-10-13 14:52:26 -07:00
Harley Acheson
da2902120e UI: Remove Menu Search Console Warning
Menu Search is showing a console warning whenever it can't find a menu
to search. WM_menutype_find should be set to silent.

Pull Request: https://projects.blender.org/blender/blender/pulls/113701
2023-10-13 23:51:18 +02:00
Harley Acheson
0c064fab59 UI: Never Show Unknown Type Placeholder
Some but types of UI_BTYPE_SEARCH_MENU can have no ID code and also be
of UnknownType. Don't show placeholder in this case.

Pull Request: https://projects.blender.org/blender/blender/pulls/113700
2023-10-13 23:39:45 +02:00
Harley Acheson
cb9832f9b1 UI: Allow Tooltip Padding In Any Order
Allow padding anywhere within a tooltip, not just before the current
field, by adding a new field type of UI_TIP_STYLE_SPACER.

Pull Request: https://projects.blender.org/blender/blender/pulls/112487
2023-10-13 22:34:43 +02:00
Harley Acheson
2d5c762645 Merge branch 'blender-v4.0-release' 2023-10-13 13:32:28 -07:00
Harley Acheson
d625feadd8 Fix #113689: Improved BLF_width_to_strlen Measurement
BLF_width_to_strlen measures text with reduced accuracy with Hinting or
subpixel anti-aliasing enabled. blf_font_width_to_strlen_glyph_process
does not take into account these changes when iterating through glyphs.

Pull Request: https://projects.blender.org/blender/blender/pulls/113698
2023-10-13 22:31:08 +02:00
Hans Goudey
9b0188db03 Fix #112448: Leading deform modifiers skip adding original coordinates
Previously the first group of deform modifiers didn't need to access
original coordinates explicitly because the deformation wasn't included
in the mesh positions. After d20f992322 the mesh is deformed
directly though, so the original coordinates need to be added first.

In the case of this report, the particle system (which is a "deform"
modifier for reasons) didn't have original coordinates to work with, so
it created the child particles at the deformed positions from the shape
keys every time. Though for some reason it only did that for renders.

Pull Request: https://projects.blender.org/blender/blender/pulls/113679
2023-10-13 20:35:16 +02:00
Dalai Felinto
a92cfc2754 GPv3: Set Spline Resolution
Part of #113602.
2023-10-13 19:55:10 +02:00
Dalai Felinto
d3fea733a1 GPv3: Set Spline Cyclic
Part of #113602.
2023-10-13 19:48:22 +02:00
Dalai Felinto
493674435f GPv3: Set Curve Tilt
Part of #113602.
2023-10-13 19:48:22 +02:00