2
$\begingroup$

Is there a grease pencil equivalent for bpy.context.selected_objects but for strokes or points?

$\endgroup$

1 Answer 1

1
$\begingroup$

There is no separate variable. Grease Pencil strokes are objects like any other object and so are included in (or excluded from) bpy.context.selected_objects.

If you want just the selected Grease Pencil objects, you can use the list comprehension [object for object in bpy.context.selected_objects if object.type = 'GPENCIL']

$\endgroup$
1
  • $\begingroup$ This makes sense but i was hoping for something that would list the strokes or points as being selected. $\endgroup$
    – Nburgess
    Commented Mar 24, 2022 at 20:47

You must log in to answer this question.

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