Blender V2.61 - r43446
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "DNA_curve_types.h"
#include "DNA_object_types.h"
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "DNA_gpencil_types.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_gpencil.h"
#include "BKE_library.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "UI_view2d.h"
#include "ED_gpencil.h"
#include "ED_view3d.h"
#include "ED_clip.h"
#include "gpencil_intern.h"
Go to the source code of this file.
Definition in file gpencil_edit.c.
anonymous enum |
Definition at line 366 of file gpencil_edit.c.
static int gp_actframe_delete_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 323 of file gpencil_edit.c.
References BKE_report(), CFRA, CTX_data_scene(), ELEM, gpencil_data_get_active(), gpencil_layer_delframe(), gpencil_layer_getactive(), gpencil_layer_getframe(), NA_EDITED, NC_SCREEN, ND_GPENCIL, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_active_frame_delete().
static int gp_actframe_delete_poll | ( | bContext * | C | ) | [static] |
Definition at line 313 of file gpencil_edit.c.
References bGPDlayer::actframe, gpencil_data_get_active(), and gpencil_layer_getactive().
Referenced by GPENCIL_OT_active_frame_delete().
static int gp_add_poll | ( | bContext * | C | ) | [static] |
Definition at line 182 of file gpencil_edit.c.
References gpencil_data_get_pointers(), and NULL.
Referenced by GPENCIL_OT_data_add(), and GPENCIL_OT_layer_add().
Definition at line 460 of file gpencil_edit.c.
References CTX_data_scene(), CTX_wm_region(), CTX_wm_view3d(), ED_view3d_calc_camera_border(), RegionView3D::persp, ARegion::regiondata, RV3D_CAMOB, and TRUE.
Referenced by gp_layer_to_curve().
static int gp_convert_layer_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 609 of file gpencil_edit.c.
References BKE_report(), CTX_data_scene(), gp_layer_to_curve(), gpencil_data_get_active(), gpencil_layer_getactive(), NA_ADDED, NC_OBJECT, NC_SCENE, ND_OB_ACTIVE, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_convert().
static int gp_convert_poll | ( | bContext * | C | ) | [static] |
Definition at line 599 of file gpencil_edit.c.
References CTX_data_scene(), CTX_wm_area(), gpencil_data_get_active(), gpencil_layer_getactive(), NULL, Scene::obedit, SPACE_VIEW3D, and ScrArea::spacetype.
Referenced by GPENCIL_OT_convert().
static int gp_data_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 191 of file gpencil_edit.c.
References BKE_report(), gpencil_data_addnew(), gpencil_data_get_pointers(), bGPdata::id, id_us_min(), NA_EDITED, NC_SCREEN, ND_GPENCIL, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_data_add().
static int gp_data_unlink_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 239 of file gpencil_edit.c.
References BKE_report(), gpencil_data_get_pointers(), bGPdata::id, id_us_min(), NA_EDITED, NC_SCREEN, ND_GPENCIL, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_data_unlink().
static int gp_data_unlink_poll | ( | bContext * | C | ) | [static] |
Definition at line 229 of file gpencil_edit.c.
References gpencil_data_get_pointers(), and NULL.
Referenced by GPENCIL_OT_data_unlink().
static int gp_layer_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 277 of file gpencil_edit.c.
References BKE_report(), gpencil_data_addnew(), gpencil_data_get_pointers(), gpencil_layer_addnew(), NA_EDITED, NC_SCREEN, ND_GPENCIL, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_layer_add().
Definition at line 544 of file gpencil_edit.c.
References add_object(), BLI_assert, CFRA, CTX_data_scene(), CU_3D, Object::data, ELEM3, ListBase::first, Curve::flag, gp_camera_view_subrect(), gp_stroke_to_bezier(), gp_stroke_to_path(), GP_STROKECONVERT_CURVE, GP_STROKECONVERT_PATH, gpencil_layer_getframe(), bGPDlayer::info, Object::loc, bGPDstroke::next, NULL, OB_CURVE, rename_id(), Object::rot, bGPDframe::strokes, and zero_v3().
Referenced by gp_convert_layer_exec().
static void gp_stroke_to_bezier | ( | bContext * | C, |
bGPDlayer * | gpl, | ||
bGPDstroke * | gps, | ||
Curve * | cu, | ||
rctf * | subrect | ||
) | [static] |
Definition at line 480 of file gpencil_edit.c.
References Nurb::bezt, BLI_addtail(), calchandlesNurb(), copy_v3_v3(), CU_BEZIER, BezTriple::f1, BezTriple::f2, BezTriple::f3, gp_strokepoint_convertcoords(), BezTriple::h1, BezTriple::h2, HD_FREE, i, interp_v3_v3v3(), MEM_callocN(), Curve::nurb, Nurb::pntsu, bGPDstroke::points, bGPDspoint::pressure, BezTriple::radius, Nurb::resolu, Nurb::resolv, SELECT, bGPDlayer::thickness, bGPDstroke::totpoints, Nurb::type, BezTriple::vec, and BezTriple::weight.
Referenced by gp_layer_to_curve().
static void gp_stroke_to_path | ( | bContext * | C, |
bGPDlayer * | gpl, | ||
bGPDstroke * | gps, | ||
Curve * | cu, | ||
rctf * | subrect | ||
) | [static] |
Definition at line 425 of file gpencil_edit.c.
References BLI_addtail(), Nurb::bp, copy_v3_v3(), CU_NURB_ENDPOINT, BPoint::f1, Nurb::flagu, gp_strokepoint_convertcoords(), i, MEM_callocN(), Curve::nurb, Nurb::orderu, Nurb::pntsu, Nurb::pntsv, bGPDstroke::points, bGPDspoint::pressure, BPoint::radius, Nurb::resolu, SELECT, bGPDlayer::thickness, bGPDstroke::totpoints, BPoint::vec, and BPoint::weight.
Referenced by gp_layer_to_curve().
static void gp_strokepoint_convertcoords | ( | bContext * | C, |
bGPDstroke * | gps, | ||
bGPDspoint * | pt, | ||
float | p3d[3], | ||
rctf * | subrect | ||
) | [static] |
Definition at line 383 of file gpencil_edit.c.
References copy_v3_v3(), CTX_data_scene(), CTX_wm_region(), CTX_wm_view3d(), ED_view3d_win_to_3d(), bGPDstroke::flag, give_cursor(), GP_STROKE_2DSPACE, GP_STROKE_3DSPACE, UI_view2d_view_to_region(), ARegion::v2d, VECCOPY2D, ARegion::winx, ARegion::winy, bGPDspoint::x, rctf::xmax, rctf::xmin, bGPDspoint::y, rctf::ymax, and rctf::ymin.
Referenced by gp_stroke_to_bezier(), and gp_stroke_to_path().
Definition at line 165 of file gpencil_edit.c.
References gpencil_data_get_pointers(), and NULL.
Referenced by draw_gpencil_2dimage(), draw_gpencil_view2d(), gp_actframe_delete_exec(), gp_actframe_delete_poll(), gp_convert_layer_exec(), and gp_convert_poll().
Definition at line 172 of file gpencil_edit.c.
References Scene::basact, Scene::gpd, Object::gpd, NULL, and Base::object.
Referenced by draw_gpencil_view3d().
bGPdata** gpencil_data_get_pointers | ( | bContext * | C, |
PointerRNA * | ptr | ||
) | [read] |
Definition at line 80 of file gpencil_edit.c.
References CTX_data_active_object(), CTX_data_scene(), CTX_wm_area(), CTX_wm_screen(), CTX_wm_space_data(), ED_space_clip(), bNodeTree::gpd, Object::gpd, MovieClip::gpd, SpaceImage::gpd, Object::id, MovieClip::id, bNodeTree::id, SpaceNode::nodetree, NULL, RNA_id_pointer_create(), RNA_pointer_create(), RNA_SpaceImageEditor, SPACE_CLIP, SPACE_IMAGE, SPACE_NODE, SPACE_SEQ, SPACE_VIEW3D, and ScrArea::spacetype.
Referenced by ED_undo_gpencil_step(), gp_add_poll(), gp_data_add_exec(), gp_data_unlink_exec(), gp_data_unlink_poll(), gp_layer_add_exec(), gp_session_initdata(), gpencil_data_get_active(), gpencil_draw_poll(), and gpencil_panel_standard().
void GPENCIL_OT_active_frame_delete | ( | wmOperatorType * | ot | ) |
Definition at line 349 of file gpencil_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gp_actframe_delete_exec(), gp_actframe_delete_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_convert | ( | wmOperatorType * | ot | ) |
Definition at line 632 of file gpencil_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gp_convert_layer_exec(), gp_convert_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_data_add | ( | wmOperatorType * | ot | ) |
Definition at line 213 of file gpencil_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gp_add_poll(), gp_data_add_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_data_unlink | ( | wmOperatorType * | ot | ) |
Definition at line 261 of file gpencil_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gp_data_unlink_exec(), gp_data_unlink_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_layer_add | ( | wmOperatorType * | ot | ) |
Definition at line 298 of file gpencil_edit.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gp_add_poll(), gp_layer_add_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil().
EnumPropertyItem prop_gpencil_convertmodes[] [static] |
{ {GP_STROKECONVERT_PATH, "PATH", 0, "Path", ""}, {GP_STROKECONVERT_CURVE, "CURVE", 0, "Bezier Curve", ""}, {0, NULL, 0, NULL, NULL} }
Definition at line 372 of file gpencil_edit.c.