|
Blender V4.3
|
#include <algorithm>#include <cmath>#include <cstddef>#include <cstdio>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_ghash.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "BLI_string_utils.hh"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "DNA_anim_types.h"#include "DNA_brush_types.h"#include "DNA_gpencil_legacy_types.h"#include "DNA_material_types.h"#include "DNA_meshdata_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "DNA_view3d_types.h"#include "BKE_anim_data.hh"#include "BKE_animsys.h"#include "BKE_brush.hh"#include "BKE_context.hh"#include "BKE_deform.hh"#include "BKE_fcurve_driver.h"#include "BKE_gpencil_legacy.h"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_material.h"#include "BKE_paint.hh"#include "BKE_report.hh"#include "UI_interface.hh"#include "UI_resources.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 "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 int | gpencil_data_add_exec (bContext *C, wmOperator *op) |
| void | GPENCIL_OT_annotation_add (wmOperatorType *ot) |
| static bool | gpencil_data_unlink_poll (bContext *C) |
| static int | gpencil_data_unlink_exec (bContext *C, wmOperator *op) |
| void | GPENCIL_OT_data_unlink (wmOperatorType *ot) |
| static int | 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 int | 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 int | 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 348 of file gpencil_data.cc.
|
static |
Definition at line 325 of file gpencil_data.cc.
References BKE_gpencil_layer_active_get(), and ED_annotation_data_get_active().
Referenced by GPENCIL_OT_layer_annotation_move(), and GPENCIL_OT_layer_annotation_remove().
|
static |
Definition at line 251 of file gpencil_data.cc.
References ED_annotation_data_get_pointers().
Referenced by GPENCIL_OT_layer_annotation_add().
|
static |
Definition at line 83 of file gpencil_data.cc.
References BKE_gpencil_data_addnew(), BKE_gpencil_layer_addnew(), BKE_report(), 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 75 of file gpencil_data.cc.
References ED_annotation_data_get_pointers().
Referenced by GPENCIL_OT_annotation_add().
|
static |
Definition at line 153 of file gpencil_data.cc.
References BKE_report(), 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 137 of file gpencil_data.cc.
References ED_annotation_data_get_pointers(), bGPdata::flag, and GP_DATA_ANNOTATIONS.
Referenced by GPENCIL_OT_data_unlink().
|
static |
Definition at line 192 of file gpencil_data.cc.
References bGPDlayer::actframe, BKE_gpencil_data_addnew(), BKE_gpencil_layer_addnew(), BKE_gpencil_layer_frame_get(), BKE_report(), CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), Object::data, DATA_, DEG_id_tag_update(), ED_annotation_data_get_pointers(), GP_DATA_ANNOTATIONS, GP_GETFRAME_ADD_NEW, bGPdata::id, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, ID_RECALC_TRANSFORM, wmOperator::idname, NA_EDITED, NA_SELECTED, NC_GPENCIL, ND_DATA, OB_GPENCIL_LEGACY, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_property_is_set(), RNA_property_string_get(), RNA_struct_find_property(), RPT_ERROR, STREQ, STRNCPY, Object::type, and WM_event_add_notifier().
Referenced by GPENCIL_OT_layer_annotation_add().
|
static |
Definition at line 353 of file gpencil_data.cc.
References BKE_gpencil_layer_active_get(), BKE_gpencil_layer_mask_sort_all(), BLI_assert, BLI_listbase_link_move(), DEG_id_tag_update(), ED_annotation_data_get_active(), ED_gpencil_data_get_active(), ELEM, bGPdata::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, wmOperator::idname, bGPdata::layers, NA_EDITED, NC_GPENCIL, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), STREQ, and WM_event_add_notifier().
Referenced by GPENCIL_OT_layer_annotation_move().
|
static |
Definition at line 271 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_gpencil_layer_mask_sort_all(), BKE_id_free_us(), BKE_report(), CTX_data_main(), DEG_id_tag_update(), ED_annotation_data_get_active(), ED_annotation_data_get_pointers(), ED_gpencil_data_get_active(), ELEM, ListBase::first, bGPDlayer::flag, GP_LAYER_LOCKED, bGPdata::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, wmOperator::idname, bGPdata::layers, NA_EDITED, NA_SELECTED, NC_GPENCIL, ND_DATA, bGPDlayer::next, OPERATOR_CANCELLED, OPERATOR_FINISHED, bGPDlayer::prev, wmOperator::reports, RPT_ERROR, STREQ, and WM_event_add_notifier().
Referenced by GPENCIL_OT_layer_annotation_remove().
| void GPENCIL_OT_annotation_add | ( | wmOperatorType * | ot | ) |
Definition at line 121 of file gpencil_data.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_data_add_exec(), gpencil_data_add_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil_legacy().
| void GPENCIL_OT_data_unlink | ( | wmOperatorType * | ot | ) |
Definition at line 173 of file gpencil_data.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_data_unlink_exec(), gpencil_data_unlink_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil_legacy().
| void GPENCIL_OT_layer_annotation_add | ( | wmOperatorType * | ot | ) |
Definition at line 256 of file gpencil_data.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_add_annotation_poll(), gpencil_layer_add_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil_legacy().
| void GPENCIL_OT_layer_annotation_move | ( | wmOperatorType * | ot | ) |
Definition at line 380 of file gpencil_data.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, GP_LAYER_MOVE_DOWN, GP_LAYER_MOVE_UP, gpencil_active_layer_annotation_poll(), gpencil_layer_move_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_gpencil_legacy().
| void GPENCIL_OT_layer_annotation_remove | ( | wmOperatorType * | ot | ) |
Definition at line 333 of file gpencil_data.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_active_layer_annotation_poll(), gpencil_layer_remove_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil_legacy().