From e9b955b99cd3cde127b52bff8c4559e2d57eeeb0 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 13 Nov 2020 13:17:17 +0100 Subject: GPencil: Remove ID from operators to fix T82597 Instead to use the ID of the object, now the parameter is an Enum with Selected object or New. If use selected mode, the first grease pencil object selected is used. If none of the selected objects is a grease pencil object, a new object is created. Small cleanup changes to the original patch. Differential Revision: https://developer.blender.org/D9529 --- source/blender/editors/include/ED_gpencil.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 398a1630cf6..48d323c5d57 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -79,6 +79,12 @@ typedef enum eGP_ReprojectModes { GP_REPROJECT_KEEP, } eGP_ReprojectModes; +/* Target object modes. */ +typedef enum eGP_TargetObjectMode { + GP_TARGET_OB_NEW = 0, + GP_TARGET_OB_SELECTED = 1, +} eGP_TargetObjectMode; + /* ------------- Grease-Pencil Runtime Data ---------------- */ /* Temporary 'Stroke Point' data (2D / screen-space) -- cgit v1.2.3