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
This commit is contained in:
Dalai Felinto
2025-02-18 00:28:14 +01:00
parent 9057e528c7
commit ec6383de96
11 changed files with 127 additions and 0 deletions

View File

@@ -5812,6 +5812,8 @@ def km_edit_point_cloud(params):
("point_cloud.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True}, None),
*_template_items_select_actions(params, "point_cloud.select_all"),
("point_cloud.delete", {"type": 'X', "value": 'PRESS'}, None),
("point_cloud.delete", {"type": 'DEL', "value": 'PRESS'}, None),
("transform.transform", {"type": 'S', "value": 'PRESS', "alt": True},
{"properties": [("mode", 'CURVE_SHRINKFATTEN')]}),
])

View File

@@ -3434,6 +3434,8 @@ def km_point_cloud(params):
"ctrl": True}, {"properties": [("action", 'DESELECT')]}),
("point_cloud.select_all", {"type": 'I', "value": 'PRESS',
"ctrl": True}, {"properties": [("action", 'INVERT')]}),
# Delete
("point_cloud.delete", {"type": 'DEL', "value": 'PRESS'}, None),
])
return keymap

View File

@@ -5904,6 +5904,7 @@ class VIEW3D_MT_edit_pointcloud(Menu):
layout.operator("point_cloud.duplicate_move")
layout.separator()
layout.operator("point_cloud.attribute_set")
layout.operator("point_cloud.delete")
layout.template_node_operator_asset_menu_items(catalog_path=self.bl_label)