Tom Martin fd433a0a5c Python API: Grease Pencil: Add function set_vertex_weights on GreasePencilDrawing
This adds a new function `set_vertex_weights` to the `GreasePencilDrawing`.

Given an existing vertex group, this function writes the given weights to the
provided point indices.

Example code  for GP Stroke:
```Py
import bpy

ob = bpy.context.active_object

# Add a vertex group
ob.vertex_groups.new(name="Group")

# Get the drawing
frame = ob.data.layers.active.current_frame()
drawing = frame.drawing

# Set the vertex weights of points at index 0, 5, 10, and 15
drawing.set_vertex_weights("Group", [0, 5, 10, 15], [0.1, 0.2, 0.5, 1.0], assign_mode='ADD')
```

Pull Request: https://projects.blender.org/blender/blender/pulls/127216
2025-05-27 12:10:37 +02:00
2025-05-23 14:03:20 +10:00
2023-12-08 13:28:13 +11:00
2025-05-12 11:34:32 +02:00
2025-03-12 21:55:59 +11:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%