GPv3: Reverse Curve node #113702

Manually merged
Dalai Felinto merged 55 commits from dfelinto/blender:grease-nodes-reverted-node into main 2023-10-16 11:54:19 +02:00

55 Commits

Author SHA1 Message Date
Dalai Felinto 9c22af32a9 Cleanup: Remove unecesary includes 2023-10-16 11:30:22 +02:00
Dalai Felinto 47cfeb45d8 GPv3: Delete Geometry node
Incorporated the cleanup and tweaks from Hans Goudey to return CurvesGeometry directly.

Part of #113602.

Co-authored-by: Hans Goudey <hans@blender.org>
Ref !113721
2023-10-16 11:29:07 +02:00
Omar Emara 9f1538b586 Cleanup: Move compositor headers to c++
buildbot/vdev-code-daily-coordinator Build done. Details
Pull Request: #113758
2023-10-16 10:45:54 +02:00
Jeroen Bakker 6a34dc2853 Cleanup: Make format
buildbot/vdev-code-daily-coordinator Build done. Details
2023-10-16 08:12:10 +02:00
Jesse Yurkovich 51846d8173 Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
2023-10-15 19:01:10 -07:00
Jesse Yurkovich 49e4923384 Fix #113697: Fix timer leak from panel drag/animate processing
buildbot/v400-code-daily-coordinator Build done. Details
When clicking or dragging a Panel's drag handle, a PANEL_STATE_DRAG
state transition is followed immediately by a PANEL_STATE_ANIMATE
transition.  Both transitions start a timer.

Unfortunately, a subtle change introduced in
f3ab698951 meant the first timer would no
longer be destroyed before starting the second one.

The fix is to just reuse the timer if it's already present so that a
second one is not created in the first place.

Pull Request: #113711
2023-10-16 04:00:15 +02:00
Campbell Barton 89efeedd5b Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
2023-10-16 10:35:45 +11:00
Campbell Barton db36c9f204 Merge branch 'blender-v4.0-release' 2023-10-16 10:35:42 +11:00
Campbell Barton ed2e42d62c Merge branch 'blender-v4.0-release' 2023-10-16 10:35:39 +11:00
Campbell Barton f95ee3e871 Fix incorrect window decoration size with Wayland & libdecor on startup
buildbot/v400-code-daily-coordinator Build done. Details
When fractional scaling was used with libdecor the window decorations
would not match the window size on startup, drawing small and on top
of Blender's window.
While there are still glitches with fractional-scaling & libdecor
(which doesn't support fractional scaling),
see #109194 this at least resolves one of the worst issues.
2023-10-16 10:01:00 +11:00
Campbell Barton e8f2c3e45f GHOST/Wayland: don't preempt new windows buffer fractional scale
When a new window is created the final buffer scale isn't known
so setting the buffer scale assuming the final state was just a guess
and only had the minor advantage of preventing rounding the window size
on startup.

Removing this to resolve a bug with LIBDECOR & fractional scaling
relating to #109194 (will commit separately).
2023-10-16 09:50:44 +11:00
Iliya Katushenock 4d91c50b62 Fix #113429: Dirty evaluated curve
buildbot/v400-code-daily-coordinator Build done. Details
Tag curve topology as dirty after changing of types of handles.

Pull Request: #113717
2023-10-15 20:59:21 +02:00
Jacques Lucke d76263de96 Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
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
Damien Picard fa5bb53f5c Fix: Python node_utils.connect_sockets broken after API change
After the recent introduction of node panels, the utility that
allowed scripters to connect sockets to or from a virtual socket was
broken. This happens when creating an interface before connecting
sockets. Sockets can have a subtype, while interfaces cannot.

For instance, the `NodeSocketFloatFactor` type cannot be used
directly, it has to be converted to `NodeSocketFloat`.

This commit chooses an appropriate type for the new interface before
creating it, based on the socket's `type` property.

Pull Request: #113630
2023-10-15 20:38:43 +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: #113742
2023-10-15 20:28:23 +02:00
Hans Goudey 601fba20a6 Fix #113619: Incorrect nested group assets in compositor add menu
buildbot/v400-code-daily-coordinator Build done. Details
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 d3151df74a Fix #113736: Add modifier menu broken for surface objects
This object type doesn't support geometry nodes currently.
2023-10-15 19:22:21 +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
buildbot/v400-code-daily-coordinator Build done. Details
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
buildbot/vdev-code-daily-coordinator Build done. Details
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: #113749
2023-10-15 17:42:28 +02:00
Harley Acheson 1423ece1eb Cleanup: Compilation Error in wm_playanim.cc
buildbot/vdev-code-daily-coordinator Build done. Details
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
buildbot/vdev-code-daily-coordinator Build done. Details
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
buildbot/vdev-code-daily-coordinator Build done. Details
2023-10-15 12:43:02 +02:00
Campbell Barton 46dedaf960 Cleanup: use C++ style casts in for the animation player
buildbot/vdev-code-daily-coordinator Build done. Details
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'
buildbot/vdev-code-daily-coordinator Build done. Details
2023-10-14 12:00:08 -07:00
Harley Acheson b772603843 Fix #113682: Improved Text Caret Position
buildbot/v400-code-daily-coordinator Build done. Details
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: #113707
2023-10-14 20:58:50 +02:00
Harley Acheson 9ee5de05c0 Fix #101058: Allow Cryptomatte Picking Between Windows
buildbot/vdev-code-daily-coordinator Build done. Details
Allow the source and target windows to differ when selecting
objects using Cryptomatte.

Pull Request: #113636
2023-10-14 20:28:00 +02:00
Dalai Felinto a93238a922 GPv3: Reverse Curve node
buildbot/vdev-code-daily-coordinator Build done. Details
Part of #113602.
Ref !113702.
2023-10-14 12:50:02 +02:00
Iliya Katushenock 690deeda18 Fix: Geometry Nodes: Create instance attribute of the right type
buildbot/v400-code-daily-coordinator Build done. Details
`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: #110146
2023-10-14 10:54:32 +02:00
Leon Schittek d9225ac121 Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
2023-10-14 10:07:09 +02:00
Leon Schittek b93dbaba1d Fix: Node Editor: Improve info panel drawing
buildbot/v400-code-daily-coordinator Build done. Details
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: #113411
2023-10-14 09:37:03 +02:00
Campbell Barton e6933e526c PlayAnim: place the indicator closest to the mouse cursor
buildbot/vdev-code-daily-coordinator Build done. Details
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
buildbot/vdev-code-daily-coordinator Build done. Details
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
buildbot/vdev-code-daily-coordinator Build done. Details
2023-10-14 13:53:00 +11:00
Harley Acheson 83705a87cb FontBLF: Store Sizes, Styles, and Other Metrics
buildbot/vdev-code-daily-coordinator Build done. Details
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: #113432
2023-10-14 02:43:48 +02:00
Harley Acheson 844b78786c Cleanup: Calm Warning in Interface_region_tooltip
buildbot/vdev-code-daily-coordinator Build done. Details
Remove warning about unused variable `field_next`

Pull Request: #113708
2023-10-14 02:14:22 +02:00
Harley Acheson 8919fb8bc7 UI: Fix Placeholder Bad String Comparison
buildbot/vdev-code-daily-coordinator Build done. Details
Bad string comparison in ui_but_placeholder_get()

Pull Request: #113706
2023-10-14 01:42:49 +02:00
Dalai Felinto 7a73f792ed GPv3: Fix Normal Field
buildbot/vdev-code-daily-coordinator Build done. Details
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
buildbot/v400-code-daily-coordinator Build done. Details
Crash due to variables not initialized.
2023-10-13 19:14:42 -03:00
Harley Acheson d94502b456 Merge branch 'blender-v4.0-release'
buildbot/vdev-code-daily-coordinator Build done. Details
2023-10-13 14:52:26 -07:00
Harley Acheson da2902120e UI: Remove Menu Search Console Warning
buildbot/v400-code-daily-coordinator Build done. Details
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: #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: #113700
2023-10-13 23:39:45 +02:00