Commit Graph

3492 Commits

Author SHA1 Message Date
Lukas Tönne
5c57e24fea Cleanup: GPv3: Remove unused BKE functions from GPv2
Removes unused GPv2 functions in blenkernel.

Notes:
-  Functions for layer masks are still in use, but annotations never
  have layer masks in the first place. Would be good to remove the data
  structures so we can remove the functions too.
- Some multi-frame edit functions are also still nominally used, but
multi-frame editing is not an active feature for annotations. This
  should also be removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/128709
2024-10-09 10:27:45 +02:00
Campbell Barton
52ced621c7 Merge branch 'blender-v4.3-release' 2024-10-09 17:42:05 +11:00
nutti
e7747c0d93 PyAPI: add type of bpy.types.NodeSocket.links
Ref !128626
2024-10-09 17:41:09 +11:00
Laurynas Duburas
fc5f89a520 Curves: Support View3DOverlay.display_handle property
Support for View3DOverlay.display_handle property accessible in "Curves Edit Mode Overlays" panel.

Rel #105037

Pull Request: https://projects.blender.org/blender/blender/pulls/128142
2024-10-08 21:17:16 +02:00
Miguel Pozo
e0927c1f6e Merge branch 'blender-v4.3-release' 2024-10-08 19:34:59 +02:00
Pratik Borhade
79ae0f86da Fix: GPv3: Missing topbar layer panel in weight/vertex paint
Caused by 7b91f71ebf.

Pull Request: https://projects.blender.org/blender/blender/pulls/128603
2024-10-08 18:27:28 +02:00
Pablo Vazquez
cdccabbcf2 Merge branch 'blender-v4.3-release' 2024-10-08 18:26:06 +02:00
Jordan Henshaw
70a429bb18 UI: Fix missing hyphen in "Addon Tags" label
Add missing hyphen for consistency with rest of UI,
following the Human Interface Guidelines.

Pull Request: https://projects.blender.org/blender/blender/pulls/127822
2024-10-08 18:23:58 +02:00
Huw Pascoe
7d98a24e3e UI: Expose view rotation lock in the 3D Viewport
Expose view rotation lock in the View panel.

This is handy to prevent accidentally changing
the rotation of the viewport.

Pull Request: https://projects.blender.org/blender/blender/pulls/122185
2024-10-08 18:16:36 +02:00
Sybren A. Stüvel
411f399a7f Anim: disable 'New Slot' operator on linked Actions
The 'New Slot' operator now checks for editability of the Action.

Pull Request: https://projects.blender.org/blender/blender/pulls/128708
2024-10-08 15:20:55 +02:00
Falk David
da339407a9 Fix: Python: Empty list of drawing.strokes doesn't have length of 0
The API would return `None` if the number of strokes in the drawing was `0`.
Instead this should return a slice that has a length of 0 to be consistent.
2024-10-08 12:43:58 +02:00
Falk David
09ca5a4c5f Fix: Python: Empty list of drawing.strokes doesn't have length of 0
The API would return `None` if the number of strokes in the drawing was `0`.
Instead this should return a slice that has a length of 0 to be consistent.
2024-10-08 11:43:56 +02:00
Aaron Carlisle
0e8980c118 Fix: UI: Restore GP3 Join operator in menu
This was accidentally removed in https://projects.blender.org/blender/blender/commit/d70b10dcd4
2024-10-07 20:12:13 -04:00
Aaron Carlisle
dc652aeedb Fix: UI: Restore GP3 Join operator in menu
This was accidentally removed in https://projects.blender.org/blender/blender/commit/d70b10dcd4
2024-10-07 20:08:44 -04:00
Campbell Barton
3525b83c6b Cleanup: use specific exception types where appropriate 2024-10-08 09:41:53 +11:00
Campbell Barton
1a1e75c253 Cleanup: replace implicit BaseException with Exception
Exception is more appropriate as a general exception in these cases.
2024-10-08 09:41:51 +11:00
Sybren A. Stüvel
dba78ebb66 Cleanup: clarify 'disabled' message in anim.slot_new_for_id poll function
The old text seemed to suggest that an Action Slot can only be created at
the moment of assigning the Action to something. That is not the case.
The operator just works on the assigned Action, and if none is assigned,
there is nothing it can do.
2024-10-07 18:29:50 +02:00
Lukas Tönne
d7e3f55eea Merge branch 'blender-v4.3-release' 2024-10-07 18:22:17 +02:00
Lukas Tönne
a57206dd59 GPv3: Remove unused legacy editor functions for GPv2
Removes all unused functions in ED_gpencil_legacy.hh

Pull Request: https://projects.blender.org/blender/blender/pulls/128597
2024-10-07 18:21:28 +02:00
Falk David
68c665ffa1 Fix #128646: Wrong selection results using the high-level python API
The issue was that the API assumed that the `.selection` attribute
was always on either the point domain for points or the stroke domain
for strokes.
Internally the attribute domain depends on the current selection mode.

To fix the issue, the API now checks for the domain of the attribute
and handles it accordingly.

If the selection attribute is on the `'POINT'` domain:
* Reading the `stroke.select` property will check if *any* of the points of
the stroke are selected and return `True` or `False`.
* Writing to the `stroke.select` property will write `True` or `False` to *all* the
points in the stroke.

Also resolves #128645.

Pull Request: https://projects.blender.org/blender/blender/pulls/128687
2024-10-07 18:17:45 +02:00
Nathan Vegdahl
3cd0e0ab5e Anim: make creating slotted-action pose assets assign the slot
Previously, when creating pose assets with the experimental baklava flag
enabled, although the asset would be created correctly as a slotted action,
and the resulting action would be assigned to the ID, the slot itself was
not assigned.

This commit updates the code to select the slot as well when the asset
is created as a slotted action.

Note that *applying* pose assets that were created this way is still
not functioning correctly, which will be addressed in a forthcoming PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/128594
2024-10-07 15:52:09 +02:00
Campbell Barton
5776a0b67c Merge branch 'blender-v4.3-release' 2024-10-05 17:54:01 +10:00
Campbell Barton
ea2d27cf84 Fix #128567: file selector automatically creates paths & warns
Regression in [0] which didn't account for entering paths in the
file selector which would create paths without confirming,
warning that the "confirm" property was missing.

Entering `*.*` would create `_._` for e.g in the users CWD for example.

Ref !128568

[0]: 6dd0f6627e.
2024-10-05 16:58:21 +10:00
Aaron Carlisle
1dc8468f74 Merge branch 'blender-v4.3-release' 2024-10-05 00:51:59 -04:00
Aaron Carlisle
522a21c58b Docs: Update RNA to user manual URL mapping 2024-10-05 00:51:36 -04:00
Falk David
3364cb34ee Merge branch 'blender-v4.3-release' 2024-10-04 19:28:16 +02:00
Falk David
5f5b1b83d0 GPv3: Rename mode enum names and python identifiers
This renames the mode identifiers to be consistent with e.g. the context mode identifiers and other names used for the new Grease Pencil.

For `object.mode`:
* `PAINT_GPENCIL` -> `PAINT_GREASE_PENCIL`
* `SCULPT_GPENCIL` -> `SCULPT_GREASE_PENCIL`
* `VERTEX_GPENCIL` -> `VERTEX_GREASE_PENCIL`
* `WEIGHT_GPENCIL` -> `WEIGHT_GREASE_PENCIL`

For the internal `ob->mode` flag:
* `OB_MODE_PAINT_GPENCIL_LEGACY` -> `OB_MODE_PAINT_GREASE_PENCIL`
* `OB_MODE_SCULPT_GPENCIL_LEGACY` -> `OB_MODE_SCULPT_GREASE_PENCIL`
* `OB_MODE_VERTEX_GPENCIL_LEGACY` -> `OB_MODE_VERTEX_GREASE_PENCIL`
* `OB_MODE_WEIGHT_GPENCIL_LEGACY` -> `OB_MODE_WEIGHT_GREASE_PENCIL`

Resolves #127374.

Pull Request: https://projects.blender.org/blender/blender/pulls/128604
2024-10-04 19:20:00 +02:00
Lukas Tönne
7b9d4d7503 Merge branch 'blender-v4.3-release' 2024-10-04 16:17:15 +02:00
Lukas Tönne
9e70c6de4e Cleanup: Delete accidentally committed .orig file
This was a sloppy addition during #128521.

Pull Request: https://projects.blender.org/blender/blender/pulls/128596
2024-10-04 16:16:29 +02:00
Falk David
5783c0e8c0 Merge branch 'blender-v4.3-release' 2024-10-04 16:07:37 +02:00
Falk David
12eecb1504 Cleanup: GPv3: Don't show snap increment menu in topbar
In addc0ecb13, this also enabled
the `VIEW3D_PT_sculpt_snapping` menu which is not used
in Grease Pencil weight painting.
2024-10-04 16:03:59 +02:00
Philipp Oeser
98472ee510 Merge branch 'blender-v4.3-release' 2024-10-04 15:57:23 +02:00
Philipp Oeser
addc0ecb13 GPv3: Add vertex group selector to topbar
Allows for switching the vertex group to be painted in weight paint mode
without having to have the Properties Editor open (same as for meshes).

Pull Request: https://projects.blender.org/blender/blender/pulls/128590
2024-10-04 15:55:07 +02:00
Falk David
ff03857aa3 Merge branch 'blender-v4.3-release' 2024-10-04 14:52:08 +02:00
Falk David
e848bcdbbe Fix: GPv3: Flip primary and secondary toggle and shortcut missing
The `paint.brush_colors_flip` option was not exposed in the vertex color
panel.

This adds the toggle in the panel and also adds the keymap `X` to flip
the colors.
2024-10-04 14:48:09 +02:00
Falk David
9433ffe80a Fix: GPv3: Tint color property and panel
The tint color and panel was not used consistently.
In Vertex Paint mode we're using the unified paint settings,
but in Draw mode, we only use the brush color for tinting.

This fixes the issue by using the unified paint settings
for all the uses of the vertex color.
2024-10-04 14:41:45 +02:00
Lukas Tönne
c1634dbe4b Merge branch 'blender-v4.3-release' 2024-10-04 13:06:44 +02:00
Lukas Tönne
3d6a142162 GPv3: Remove unused GPv2 operators
Removes many of the operators, panels, and menus used exclusively by Grease Pencil v2 that are no longer needed in v3.
No functional changes are expected.

Some operators are still used by the annotations system and have to be kept around. These may be renamed in future.

Pull Request: https://projects.blender.org/blender/blender/pulls/128521
2024-10-04 13:05:09 +02:00
Falk David
f1ea86bd04 Merge branch 'blender-v4.3-release' 2024-10-04 12:38:08 +02:00
Julian Eisel
7191608a98 Sculpt/Paint: Hide asset shelf by default in a few modes
Hides the brush asset shelf by default in weight paint, grease pencil
weight paint and grease pencil vertex paint mode. These only have one
bundled brush per tool available.

After bringing back some tools for brushes in certain modes
(3798852071), we want to hide the asset shelf in modes where there's
only one brush bundled per tool. While having these tools support
brushes can be useful, we don't expect to bundle more brushes soon. So
avoid a mostly empty asset shelf for a single brush by hiding it by
default and keeping it hidden until the user expands it (bf52f6f723 made
it possible to remember the visibility per mode).

Part of #128066 and #116337.
2024-10-04 12:27:04 +02:00
Richard Antalik
77a5478c0f VSE: Add text alignment feature
Previously, alignment did exist, but it only changed whole text block
position in relation to a fixed point. This was later renamed to "Anchor".
Now it correctly aligns each line of text. Alignment works with newline
character and word wrapping.
Currently newline characters can't be entered directly, but this should
be resolved soon.

To keep existing anchoring feature, new DNA fields are added and
values from old alignment are copied there.

This PR is part of bigger change [1], and originally I expected to
implement this feature at later stage. But the design called for drawing
text character by character, which would mean, that I would have to
rewrite text alignment anyway.

To render the text, a struct is built, where position and width of each
character is stored. In addition, width of each line is stored. This allows
to implement proper text alignment feature, instead of existing
anchoring. Text is then drawn character by character in a loop.

There are some small differences in text rendering, since this is only
approximation of how BLF library draws glyphs, but it is very close.
For text bounbox, `BLF_boundbox()` is used on per line basis,
because some fonts do not use their full height and this information
is not available on VSE side.

[1] https://projects.blender.org/blender/blender/issues/126547

Pull Request: https://projects.blender.org/blender/blender/pulls/126660
2024-10-04 12:20:33 +02:00
Jeroen Bakker
b0241d720f Merge branch 'blender-v4.3-release' 2024-10-04 12:13:09 +02:00
Pratik Borhade
bd4f7acce5 GPv3: Display layers when properties tab is pinned
Layer panel (also mask/ transform etc.) and other operators are gone
when properties tab is pinned and gpv3 object is non-active.
To fix this, get grease pencil pointer from `button_context()`
(done in `grease_pencil_context()`).

Continuation of cd476226d8

Pull Request: https://projects.blender.org/blender/blender/pulls/128475
2024-10-04 11:58:12 +02:00
Falk David
62510c57ef Merge branch 'blender-v4.3-release' 2024-10-04 10:40:17 +02:00
Falk David
effa8fbb7a GPv3: Material Isolate Operator
This ports the `gpencil.material_isolate` operator to GPv3.

Pull Request: https://projects.blender.org/blender/blender/pulls/128549
2024-10-04 10:38:04 +02:00
Campbell Barton
223ec5980c Cleanup: quiet unused variable warning
Unintentional/harmless change from !128493, keep the change
as named variables are clearer. Prefix to suppress warnings.
2024-10-04 15:52:09 +10:00
Jason C. Wenger
51eb5e2803 Edit Mesh: add an operator to select by pole count
Adds a new "Select by Trait" option to select all 3-poles, 5-poles, etc.
Given the impacts of 3 & 5-poles in topology, operator default is to
select all poles which do not have 4 edges to allow easy inspection.

Select connected vertices/edges/faces based on the mode.

Ref: !128493
2024-10-04 15:47:03 +10:00
Jesse Yurkovich
26c25305f5 Merge branch 'blender-v4.3-release' 2024-10-03 13:10:11 -07:00
Jesse Yurkovich
cd74a279cc Cleanup: make format 2024-10-03 22:09:02 +02:00
Julian Eisel
13ef1256a2 Merge branch 'blender-v4.3-release' 2024-10-03 19:19:48 +02:00