Commit Graph

3167 Commits

Author SHA1 Message Date
Campbell Barton
37a030f275 Merge branch 'blender-v4.4-release' 2025-02-20 16:33:33 +11:00
Campbell Barton
42cc42e197 Fix exception in poll function when the brush is None 2025-02-20 16:28:45 +11:00
Sean Kim
875f9abe9d Merge branch 'blender-v4.4-release' 2025-02-19 13:04:40 -08:00
Sean Kim
f1fca48a4f Fix #134292: Clone brush cannot access local blendfile images
With the brush assets project, brushes were moved from being local to
the working blendfile to being linked from asset libraries. This breaks
the Image Paint 'Clone' brush, as it has a brush property that links to
other Image datablocks.

To support this functionality, this commit adds the corresponding
properties into the `ImagePaintSettings` struct so that it is stored
locally with the images that will be used by the tool, inside the main
blendfile.

The source image property is shared with the 3D version of the 'Clone'
brush instead of adding a separate field to preserve old behavior.

Notably, this has the following limitations:
* If clone brush assets have been made and shared with external packs,
  they would not work out of the box with linked image assets.
* Despite these settings being stored on the scene, they are populated
  inside the tool window under "Brush Settings" which is potentially
  misleading. However, this is already the case for the 3D version of
  the brush, so further UI refinement will happen outside of this PR.
* Users will be unable to use separate images simultaneously for the
  Image editor and the 3D viewport, unlike in pre-4.3 versions. This
  can be adjusted in the future if it is a critical workflow.

Because the intended design and functionality of this tool is currently
questionable, this commit opts to make these changes instead of doing
further design to support both accessing data on the brush and on the
scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/134474
2025-02-19 22:00:39 +01:00
IREXTIA
24d9eedc15 UI: Rename 'Inverse' to 'Invert' in File/Asset Browser
Rename 'Inverse' to 'Invert' for consistency with other select menus.

Pull Request: https://projects.blender.org/blender/blender/pulls/134514
2025-02-19 21:51:55 +01:00
Dalai Felinto
9d06f32761 Point Cloud: Select Random
Move the mask_random function to BLI_index_mask.hh, so it can be shared between curves, grease pencil and point cloud.

Copied/inspired by the curves select code.

Pull Request: https://projects.blender.org/blender/blender/pulls/134624
2025-02-19 17:23:37 +01:00
Dalai Felinto
1584cd9aa5 Cleanup: Rename point cloud to pointcloud / POINT_CLOUD to POINTCLOUD
Though "Point Cloud" written as two words is technically correct and should be used in the UI, as one word it's typically easier to write and parse when reading. We had a mix of both before this patch, so better to unify this as well.

This commit also renames the editor/intern/ files to remove pointcloud_ prefix.
point_cloud was only preserved on the user facing strings:

* is_type_point_cloud
* use_new_point_cloud_type

Pull Request: https://projects.blender.org/blender/blender/pulls/134803
2025-02-19 17:11:08 +01:00
Philipp Oeser
7847df4686 Pointcloud: Integration with transverts (cursor snapping)
This adds:
- support for snapping for the pointcloud object (selection to cursor/
grid, cursor to selection)
- as usual, "Warp" an "Randomize" operators come along "for free" with
this

Pull Request: https://projects.blender.org/blender/blender/pulls/134799
2025-02-19 15:06:06 +01:00
Campbell Barton
e1a4269ee1 Merge branch 'blender-v4.4-release' 2025-02-19 11:14:13 +11:00
Campbell Barton
9e0c8a41cd Object Mode: conversion no longer depends on the active object
Conversion was only possible if the active object was editable &
selected, this complicated overriding the operator from Python
since it wasn't enough to override the selection & active-object.

Now it's possible to use bpy.ops.object.convert() from Python
overriding the selected_editable_objects only.

For users the difference isn't so significant:

- Having an active object is no longer required.

- It's possible there are no objects to operate on,
  as previously the active object was used to check at least one
  object could be converted, although this check wasn't fool-proof
  as it didn't check the objects data-type.

Resolves #100664.

Ref !134728.
2025-02-19 11:06:31 +11:00
Hans Goudey
a99f9496a0 Curves: Separate to object operator
Use the existing "remove_points_and_split" utility added
for grease pencil to implement the operator for the curves
object type. The whole structure is similar to the recently
added point cloud separate operator (4cd3540579).

Pull Request: https://projects.blender.org/blender/blender/pulls/134763
2025-02-18 19:31:30 +01:00
Pratik Borhade
a03dd37dfe Merge branch 'blender-v4.4-release' 2025-02-18 15:18:23 +05:30
Pratik Borhade
73a9a024f9 Fix #134380: Error adding a torus after hiding a collection
This reverts 06a2617107.
Commit has introduced few errors from user perspective (#134277) and
python side (#134380). Best to revert it now then handle the bug fixes later.

The error in #134380 was due to `context.layer_collection` and
`active_layer_collection` returning excluded collection.

Pull Request: https://projects.blender.org/blender/blender/pulls/134546
2025-02-18 10:05:59 +01:00
Hans Goudey
4cd3540579 Point Cloud: Implement separate operator
Similar to existing operators, moves the selected
geometry to a new object.
2025-02-17 21:21:14 -05:00
Dalai Felinto
ec6383de96 Point Cloud: Delete operator
Note: The point cloud bounding box is not being updated once the points are deleted.

This is a known issue with BKE_pointcloud_nomain_to_pointcloud and Hans is looking into it.

Code inspired/built based on the Delete Geometry node.

Pull Request: https://projects.blender.org/blender/blender/pulls/134622
2025-02-18 00:28:14 +01:00
Harley Acheson
d111b46b7a Merge branch 'blender-v4.4-release' 2025-02-17 09:47:59 -08:00
Maxime-Cots
b6617ae946 Fix #134451: SVG: Reuse material data on SVG Import
Reuse SVG Material and prevent creation of duplicate material
multiple times. Issue occurred because the check for a duplicate
material was placed too early.

Co-authored-by: Nig3l <nig3lpro@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/134529
2025-02-17 18:31:53 +01:00
Hans Goudey
45094542ff Point Cloud: Implement duplicate operator 2025-02-17 12:11:07 -05:00
Hans Goudey
9714946fca Point Cloud: Add transform operations to keymap 2025-02-17 12:11:06 -05:00
Dalai Felinto
645242dcc4 Fix: Point cloud keymap not working
Pull Request: https://projects.blender.org/blender/blender/pulls/134638
2025-02-17 08:44:05 +01:00
Hans Goudey
cd04584412 Point Cloud: Implement transform operator
This ends up being very simple because point cloud has
no connectivity information and each element is just one
position.

Also implement the 3D transform gizmo.

The geometry deformation system isn't implemented in this
commit. That can be tacked later.
2025-02-16 23:36:04 -05:00
Hans Goudey
62b568d393 Point Cloud: Implement box, circle, lasso select tools
Signficantly simplified versions of the similar curves code.
These require #134623 to function.
2025-02-16 22:48:35 -05:00
Hans Goudey
75be98a4dc Point Cloud: Implement "Set Attribute" operator
Similar to the mesh and curves operators of the same name.
2025-02-16 21:28:53 -05:00
Campbell Barton
f43e7b2b09 Fix error in grease_pencil.relative_layer_mask_add poll
Resolve exception during menu search by checking the object type is
grease pencil.
2025-02-16 20:49:52 +11:00
Campbell Barton
5087246f39 Cleanup: strip trailing space, sort file lists 2025-02-16 20:42:16 +11:00
Dalai Felinto
1e87818808 Point Cloud: Select All/None/Invert
Select All operator and boiler plate for future point cloud operators.

The selection code is basically copied/inspired by the curves selection
code. A lot of it could probably be moved to shared attribute selection
functions.

Note, while this patch is working well, there are some caveats
to test it:

* Shortcuts are being defined (you can see them in the Preferences). Yet
  they are not working for whatever reason.

* There is no way to visualize the selection. I've been testing it by
  using a Nodes tool that changes the material based on selection.

Pull Request: https://projects.blender.org/blender/blender/pulls/134450
2025-02-15 12:36:39 +01:00
Bastien Montagne
f3969bd1d2 Merge branch 'blender-v4.4-release' 2025-02-13 13:02:08 +01:00
Janne Nylander
f702eba53f Grease Pencil: Add python operator for masking with above/below layer
Adds a new python operator to Grease Pencil for adding the layer
above or below  as a masking layers to the active layer.

Creates a new file for Grease Pencil python operators in
`scripts/startup/bl_operators/grease_pencil.py`.

Pull Request: https://projects.blender.org/blender/blender/pulls/134401
2025-02-13 12:24:06 +01:00
Pratik Borhade
6d749db0c2 Fix #134468: Grease Pencil: Primtive tools considering mouse drag threshold
This is due to the click_drag event assigned for primitives. Event types
that are not "PRESS" are forwarded to drag_queue then waits until
`WM_event_drag_test_with_delta/WM_event_drag_test` is true i.e. mouse
threshold value.

Pull Request: https://projects.blender.org/blender/blender/pulls/134480
2025-02-13 11:53:03 +01:00
Campbell Barton
61b2bf4953 Merge branch 'blender-v4.4-release' 2025-02-13 11:23:45 +11:00
Campbell Barton
d2e2cec94e Cleanup: don't sub-class other registered classes
This complicates registration logic, ideally this would raise an
exception however detecting this at run-time is quite expensive.
2025-02-13 11:11:01 +11:00
Campbell Barton
c7804568e7 Cleanup: reference imported types in class definitions 2025-02-13 10:15:19 +11:00
Dalai Felinto
96d84d1832 Point Cloud: Expose 3D Cursor, annotation and ruler tools
<img width="298" alt="image.png" src="attachments/9336d17d-7dd5-445b-892c-ad7e91bb98d6">

---

The Selection tools are not working, so I did not add them to the toolbar.

Pull Request: https://projects.blender.org/blender/blender/pulls/134453
2025-02-12 22:05:07 +01:00
Harley Acheson
5956752eb7 UI: Themeable RedAlert, Error, Warning, Info Colors
The "Red Alert" color is currently hard-coded, which causes problems in
themes.  It also has an Enum value of 0, which precludes using this
value as "unset". We also use Error, Warning, and Info colors that are
part of the Info Editor.  This PR moves these out of the Info Editor
and into the "State" part of the theme. And then makes TH_REDALERT use
the TH_ERROR color.

Pull Request: https://projects.blender.org/blender/blender/pulls/131127
2025-02-12 20:59:47 +01:00
Aaron Carlisle
01763ea34b Merge branch 'blender-v4.4-release' 2025-02-11 21:32:11 -05:00
Aaron Carlisle
f8cb37a322 Docs: Update RNA to user manual URL mapping 2025-02-11 21:29:05 -05:00
Campbell Barton
e96acd433d Docs: add code-comments to clarify bad-level include & developer only UI 2025-02-12 13:21:07 +11:00
Campbell Barton
07340e1093 Docs: add code-comments to clarify bad-level include & developer only UI 2025-02-12 10:59:16 +11:00
Campbell Barton
968909d57c Cleanup: rename RNA parameter to clarify its meaning
This flag is only used when classes are registered,
avoid confusion by renaming to `PARM_PYFUNC_REGISTER_OPTIONAL`.
2025-02-11 16:31:42 +11:00
Campbell Barton
60ef321e6d Merge branch 'blender-v4.4-release' 2025-02-11 12:12:37 +11:00
Campbell Barton
dab47b83a8 Cleanup: de-duplicate numbered key definition with loop 2025-02-11 12:09:19 +11:00
Devashish Lal
1a62fdc82a Geometry Nodes: CSV import node
This commit implements a node to import CSV files as a point cloud.
The interface is minimal, with just a file path input. The type of each
column is chosen by whether the first value is an integer or a float
(those are currently the only supported types).

The goal of the node is to make it easier to get arbitrary data into
geometry nodes for visualization purposes, for example.

https://devtalk.blender.org/t/gsoc-2024-geometry-nodes-file-import-nodes/34482

Pull Request: https://projects.blender.org/blender/blender/pulls/126308
2025-02-10 16:56:52 +01:00
Aras Pranckevicius
4f0fd32d6f VSE: Over Drop effect was not doing anything useful, map it to Alpha Over
Behavior of it was exactly the same as Alpha Over for the last 18 years (since
327d413eb3 in 2006 March), so just remap it to regular alpha over on file read.

Pull Request: https://projects.blender.org/blender/blender/pulls/134342
2025-02-10 16:10:01 +01:00
Sebastian Parborg
7a0f2ce8b1 Merge branch 'blender-v4.4-release' 2025-02-07 19:01:22 +01:00
Pasang Bomjan
5884c61b4c UI: Sort transform properties for custom bone shape
Sort the order of custom bone shape transform properties consistently
with other areas.

Pull Request: https://projects.blender.org/blender/blender/pulls/134173
2025-02-07 18:06:11 +01:00
Falk David
971f3e0699 Fix #132826: Grease Pencil: Missing "Paste by Layer" option
The Grease Pencil `Clipboard` only stored a single `CurvesGeometry`. This meant
that the `Paste by Layer` operation (from 4.2 LTS) couldn't be implemented.

This PR adds an `Array` of `ClipboardLayer`s to the  `Clipboard`. Each layer stores
the name of the Grease Pencil layer that it was copied from and the `CurvesGeometry`.

The `grease_pencil.paste` operator has a new property `type` (`ACTIVE` or `LAYER`)
that decides how to paste the strokes.

Using the `ACTIVE` type, the strokes of all the `ClipboardLayer`s get merged and then
pasted to the active layer.
Using the `LAYER` type, we first try to find layers to paste the `ClipboardLayer`s into.
We just look for matching layer names. If no matching layer is found, the strokes are
pasted into the active layer instead.

This should be consistent with how Grease Pencil used to behave in 4.2. LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/134168
2025-02-07 16:17:16 +01:00
Falk David
b00c8bd391 Merge branch 'blender-v4.4-release' 2025-02-07 15:01:35 +01:00
Pratik Borhade
2d18046bbc Fix: Grease Pencil: Missing operator to delete breakdown keyframes
Operation to delete keys generated from interpolate sequence.

Resolves #134081

Pull Request: https://projects.blender.org/blender/blender/pulls/134091
2025-02-07 13:36:38 +01:00
Campbell Barton
b1bd70b89e Merge branch 'blender-v4.4-release' 2025-02-07 23:11:04 +11:00
Campbell Barton
e9dd4853f6 Fix #131947: Error closing prefs while installing extensions on WIN32
Using `signal.SIGINT` to send a signal to a sub-process isn't supported
on WIN32, replace with `signal.CTRL_BREAK_EVENT`.
2025-02-07 23:07:30 +11:00