|
Blender V5.0
|
#include <cstdlib>#include <cstring>#include "BLI_listbase.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "DNA_gpencil_legacy_types.h"#include "DNA_screen_types.h"#include "BKE_anim_data.hh"#include "BKE_animsys.h"#include "BKE_brush.hh"#include "BKE_context.hh"#include "BKE_fcurve_driver.h"#include "BKE_gpencil_legacy.h"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_material.hh"#include "BKE_paint.hh"#include "BKE_report.hh"#include "WM_api.hh"#include "WM_types.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_enum_types.hh"#include "ED_gpencil_legacy.hh"#include "ED_object.hh"#include "ED_view3d.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_build.hh"#include "gpencil_intern.hh"Go to the source code of this file.
Enumerations | |
| enum | { GP_LAYER_MOVE_UP = -1 , GP_LAYER_MOVE_DOWN = 1 } |
Functions | |
| static bool | gpencil_data_add_poll (bContext *C) |
| static wmOperatorStatus | gpencil_data_add_exec (bContext *C, wmOperator *op) |
| void | GPENCIL_OT_annotation_add (wmOperatorType *ot) |
| static bool | gpencil_data_unlink_poll (bContext *C) |
| static wmOperatorStatus | gpencil_data_unlink_exec (bContext *C, wmOperator *op) |
| void | GPENCIL_OT_data_unlink (wmOperatorType *ot) |
| static wmOperatorStatus | gpencil_layer_add_exec (bContext *C, wmOperator *op) |
| static bool | gpencil_add_annotation_poll (bContext *C) |
| void | GPENCIL_OT_layer_annotation_add (wmOperatorType *ot) |
| static wmOperatorStatus | gpencil_layer_remove_exec (bContext *C, wmOperator *op) |
| static bool | gpencil_active_layer_annotation_poll (bContext *C) |
| void | GPENCIL_OT_layer_annotation_remove (wmOperatorType *ot) |
| static wmOperatorStatus | gpencil_layer_move_exec (bContext *C, wmOperator *op) |
| void | GPENCIL_OT_layer_annotation_move (wmOperatorType *ot) |
Operators for dealing with GP data-blocks and layers.
Definition in file gpencil_data.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| GP_LAYER_MOVE_UP | |
| GP_LAYER_MOVE_DOWN | |
Definition at line 298 of file gpencil_data.cc.
|
static |
Definition at line 275 of file gpencil_data.cc.
References BKE_gpencil_layer_active_get(), C, and ED_annotation_data_get_active().
Referenced by GPENCIL_OT_layer_annotation_move(), and GPENCIL_OT_layer_annotation_remove().
|
static |
Definition at line 203 of file gpencil_data.cc.
References C, and ED_annotation_data_get_pointers().
Referenced by GPENCIL_OT_layer_annotation_add().
|
static |
Definition at line 62 of file gpencil_data.cc.
References BKE_gpencil_data_addnew(), BKE_gpencil_layer_addnew(), BKE_report(), C, CTX_data_main(), DATA_, ED_annotation_data_get_pointers(), bGPdata::flag, GP_DATA_ANNOTATIONS, bGPdata::id, id_us_min(), NA_EDITED, NC_GPENCIL, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_annotation_add().
|
static |
Definition at line 54 of file gpencil_data.cc.
References C, and ED_annotation_data_get_pointers().
Referenced by GPENCIL_OT_annotation_add().
|
static |
Definition at line 132 of file gpencil_data.cc.
References BKE_report(), C, ED_annotation_data_get_pointers(), bGPdata::id, id_us_min(), NA_EDITED, NC_GPENCIL, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_data_unlink().
|
static |
Definition at line 116 of file gpencil_data.cc.
References C, ED_annotation_data_get_pointers(), bGPdata::flag, and GP_DATA_ANNOTATIONS.
Referenced by GPENCIL_OT_data_unlink().
|
static |
Definition at line 171 of file gpencil_data.cc.
References BKE_gpencil_data_addnew(), BKE_gpencil_layer_addnew(), BKE_report(), C, CTX_data_main(), DATA_, DEG_id_tag_update(), ED_annotation_data_get_pointers(), GP_DATA_ANNOTATIONS, bGPdata::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, ID_RECALC_TRANSFORM, NA_EDITED, NA_SELECTED, NC_GPENCIL, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_layer_annotation_add().
|
static |
Definition at line 303 of file gpencil_data.cc.
References BKE_gpencil_layer_active_get(), BLI_assert, BLI_listbase_link_move(), C, DEG_id_tag_update(), ED_annotation_data_get_active(), ELEM, bGPdata::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, bGPdata::layers, NA_EDITED, NC_GPENCIL, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by GPENCIL_OT_layer_annotation_move().
|
static |
Definition at line 223 of file gpencil_data.cc.
References BKE_gpencil_free_data(), BKE_gpencil_layer_active_get(), BKE_gpencil_layer_active_set(), BKE_gpencil_layer_delete(), BKE_id_free_us(), BKE_report(), C, CTX_data_main(), DEG_id_tag_update(), ED_annotation_data_get_active(), ED_annotation_data_get_pointers(), ED_view3d_gizmo_ruler_remove_by_gpencil_layer(), ELEM, ListBase::first, bGPDlayer::flag, GP_LAYER_IS_RULER, GP_LAYER_LOCKED, bGPdata::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, bGPdata::layers, NA_EDITED, NA_SELECTED, NC_GPENCIL, ND_DATA, bGPDlayer::next, OPERATOR_CANCELLED, OPERATOR_FINISHED, bGPDlayer::prev, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_layer_annotation_remove().
| void GPENCIL_OT_annotation_add | ( | wmOperatorType * | ot | ) |
Definition at line 100 of file gpencil_data.cc.
References gpencil_data_add_exec(), gpencil_data_add_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_gpencil_legacy().
| void GPENCIL_OT_data_unlink | ( | wmOperatorType * | ot | ) |
Definition at line 152 of file gpencil_data.cc.
References gpencil_data_unlink_exec(), gpencil_data_unlink_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_gpencil_legacy().
| void GPENCIL_OT_layer_annotation_add | ( | wmOperatorType * | ot | ) |
Definition at line 208 of file gpencil_data.cc.
References gpencil_add_annotation_poll(), gpencil_layer_add_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_gpencil_legacy().
| void GPENCIL_OT_layer_annotation_move | ( | wmOperatorType * | ot | ) |
Definition at line 324 of file gpencil_data.cc.
References GP_LAYER_MOVE_DOWN, GP_LAYER_MOVE_UP, gpencil_active_layer_annotation_poll(), gpencil_layer_move_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_enum().
Referenced by ED_operatortypes_gpencil_legacy().
| void GPENCIL_OT_layer_annotation_remove | ( | wmOperatorType * | ot | ) |
Definition at line 283 of file gpencil_data.cc.
References gpencil_active_layer_annotation_poll(), gpencil_layer_remove_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_gpencil_legacy().