69 if (gpd_ptr ==
nullptr) {
105 ot->name =
"Annotation Add New";
106 ot->idname =
"GPENCIL_OT_annotation_add";
107 ot->description =
"Add new Annotation data-block";
123 if ((gpd_ptr !=
nullptr) && (*gpd_ptr !=
nullptr)) {
130 return (gpd_ptr && *gpd_ptr);
138 if (gpd_ptr ==
nullptr) {
157 ot->name =
"Annotation Unlink";
158 ot->idname =
"GPENCIL_OT_data_unlink";
159 ot->description =
"Unlink active Annotation data-block";
181 if (gpd_ptr ==
nullptr) {
186 if (*gpd_ptr ==
nullptr) {
213 ot->name =
"Add New Annotation Layer";
214 ot->idname =
"GPENCIL_OT_layer_annotation_add";
215 ot->description =
"Add new Annotation layer or note for the active data-block";
231 if (
ELEM(
nullptr, gpd, gpl)) {
285 return (gpl !=
nullptr);
291 ot->name =
"Remove Annotation Layer";
292 ot->idname =
"GPENCIL_OT_layer_annotation_remove";
293 ot->description =
"Remove active Annotation layer";
316 if (
ELEM(
nullptr, gpd, gpl)) {
337 {0,
nullptr, 0,
nullptr,
nullptr},
341 ot->name =
"Move Annotation Layer";
342 ot->idname =
"GPENCIL_OT_layer_annotation_move";
343 ot->description =
"Move the active Annotation layer up/down in the list";
Main * CTX_data_main(const bContext *C)
void BKE_gpencil_layer_active_set(struct bGPdata *gpd, struct bGPDlayer *active)
void BKE_gpencil_free_data(struct bGPdata *gpd, bool free_all)
struct bGPDlayer * BKE_gpencil_layer_addnew(struct bGPdata *gpd, const char *name, bool setactive, bool add_to_header)
void BKE_gpencil_layer_mask_sort_all(struct bGPdata *gpd)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
struct bGPdata * BKE_gpencil_data_addnew(struct Main *bmain, const char name[])
void BKE_gpencil_layer_delete(struct bGPdata *gpd, struct bGPDlayer *gpl)
void BKE_id_free_us(Main *bmain, void *idv) ATTR_NONNULL()
General operations, lookup, etc. for materials.
void BKE_report(ReportList *reports, eReportType type, const char *message)
void void void bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step) ATTR_NONNULL()
void DEG_id_tag_update(ID *id, unsigned int flags)
void ED_view3d_gizmo_ruler_remove_by_gpencil_layer(struct bContext *C, bGPDlayer *gpl)
static bool gpencil_active_layer_annotation_poll(bContext *C)
static wmOperatorStatus gpencil_layer_move_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_layer_annotation_move(wmOperatorType *ot)
void GPENCIL_OT_layer_annotation_remove(wmOperatorType *ot)
static bool gpencil_data_unlink_poll(bContext *C)
static wmOperatorStatus gpencil_layer_add_exec(bContext *C, wmOperator *op)
static wmOperatorStatus gpencil_data_add_exec(bContext *C, wmOperator *op)
static bool gpencil_data_add_poll(bContext *C)
static wmOperatorStatus gpencil_layer_remove_exec(bContext *C, wmOperator *op)
static bool gpencil_add_annotation_poll(bContext *C)
void GPENCIL_OT_annotation_add(wmOperatorType *ot)
void GPENCIL_OT_data_unlink(wmOperatorType *ot)
void GPENCIL_OT_layer_annotation_add(wmOperatorType *ot)
static wmOperatorStatus gpencil_data_unlink_exec(bContext *C, wmOperator *op)
bGPdata * ED_annotation_data_get_active(const bContext *C)
bGPdata ** ED_annotation_data_get_pointers(const bContext *C, PointerRNA *r_ptr)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)