From ee6d6838095ee940a03230f77aaeafffa29624f2 Mon Sep 17 00:00:00 2001 From: Falk David Date: Fri, 18 Apr 2025 18:20:33 +0200 Subject: [PATCH] =?UTF-8?q?Grease=20Pencil:=20Python=20API:=20Expose=20b?= =?UTF-8?q?=C3=A9zier=20handle=20selection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds two new python properties to `GreasePencilStrokePoint` * `select_handle_left`: The selection of the left handle of this point * `select_handle_right`: The selection of the right handle of this point These could already be written to using `drawing.attributes[".selection_handle_left"]` and `drawing.attributes[".selection_handle_right"]`, but this makes it easier to work on individual points from the higher-level python API. Resolves #137639. Pull Request: https://projects.blender.org/blender/blender/pulls/137730 --- scripts/modules/_bpy_internal/grease_pencil/stroke.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/modules/_bpy_internal/grease_pencil/stroke.py b/scripts/modules/_bpy_internal/grease_pencil/stroke.py index a86d2192e62..f9bb963db98 100644 --- a/scripts/modules/_bpy_internal/grease_pencil/stroke.py +++ b/scripts/modules/_bpy_internal/grease_pencil/stroke.py @@ -135,6 +135,8 @@ def DefAttributeGetterSetters(attributes_list): "The rotation for this point. Used to rotate textures."), ("delta_time", "delta_time", 'FLOAT', 0.0, "The time delta in seconds since the start of the stroke."), + ("select_handle_left", ".selection_handle_left", 'BOOLEAN', True, "The selection state of the left bézier handle."), + ("select_handle_right", ".selection_handle_right", 'BOOLEAN', True, "The selection state of the right bézier handle."), ]) class GreasePencilStrokePoint(AttributeGetterSetter): """