0
$\begingroup$

I have already tried by calculating:

point_global_co = grease_pencil_object.matrix_world @ point.co

But it gives very odd results.

$\endgroup$

1 Answer 1

1
$\begingroup$

The following script prints the global point coordinates for every grease pencil object in the scene. The coordinates seem to be accurate, judging from basic tests.

import bpy


for obj in bpy.data.objects:
    if obj.type == "GPENCIL":
        print(f"\n{obj.name}")
        for layer in obj.data.layers:
            for frame in layer.frames:
                for stroke in frame.strokes:
                    for point in stroke.points:
                        print(obj.matrix_world @ point.co)
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .