Blender V2.61 - r43446
|
#include <math.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include "DNA_key_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_anim_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_dynstr.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_keyframes_edit.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "ED_types.h"
#include "ED_util.h"
#include "ED_view3d.h"
#include "ED_curve.h"
#include "curve_intern.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
Go to the source code of this file.
Definition in file editcurve.c.
#define callocstructN | ( | x, | |
y, | |||
name | |||
) | (x*)MEM_callocN((y)* sizeof(x),name) |
Definition at line 111 of file editcurve.c.
#define FIRST 1 |
Definition at line 153 of file editcurve.c.
Referenced by CU_deselect_all(), CU_select_all(), and de_select_first_exec().
#define HIDDEN 1 |
Definition at line 150 of file editcurve.c.
Referenced by adduplicateflagNurb(), extrudeflagNurb(), hide_exec(), merge_2_nurb(), mouse_nurb(), reveal_exec(), select_nth_bezt(), and select_nth_bp().
#define LAST 0 |
Definition at line 154 of file editcurve.c.
Referenced by de_select_last_exec().
#define VISIBLE 0 |
Definition at line 151 of file editcurve.c.
Referenced by select_adjacent_cp(), select_less_exec(), select_linked_exec(), select_linked_pick_invoke(), select_more_exec(), select_row_exec(), selectend_nurb(), selectrandom_curve(), swap_selection_beztriple(), and swap_selection_bpoint().
Definition at line 6091 of file editcurve.c.
References CTX_data_edit_object(), CTX_wm_view3d(), Object::data, ED_view3d_context_rv3d(), NurbSort::nu, NULL, object_editcurve_get(), and NurbSort::vec.
Referenced by curvesurf_prim_add(), and effector_add_type().
static int add_primitive_bezier_circle_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6559 of file editcurve.c.
References CU_BEZIER, CU_PRIM_CIRCLE, and curve_prim_add().
Referenced by CURVE_OT_primitive_bezier_circle_add().
static int add_primitive_bezier_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6536 of file editcurve.c.
References CU_BEZIER, CU_PRIM_CURVE, and curve_prim_add().
Referenced by CURVE_OT_primitive_bezier_curve_add().
static int add_primitive_curve_path_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6628 of file editcurve.c.
References CU_NURBS, CU_PRIM_PATH, and curve_prim_add().
Referenced by CURVE_OT_primitive_nurbs_path_add().
static int add_primitive_nurbs_circle_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6605 of file editcurve.c.
References CU_NURBS, CU_PRIM_CIRCLE, and curve_prim_add().
Referenced by CURVE_OT_primitive_nurbs_circle_add().
static int add_primitive_nurbs_curve_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6582 of file editcurve.c.
References CU_NURBS, CU_PRIM_CURVE, and curve_prim_add().
Referenced by CURVE_OT_primitive_nurbs_curve_add().
static int add_primitive_nurbs_surface_circle_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6675 of file editcurve.c.
References CU_NURBS, CU_PRIM_CIRCLE, and surf_prim_add().
Referenced by SURFACE_OT_primitive_nurbs_surface_circle_add().
static int add_primitive_nurbs_surface_curve_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6652 of file editcurve.c.
References CU_NURBS, CU_PRIM_CURVE, and surf_prim_add().
Referenced by SURFACE_OT_primitive_nurbs_surface_curve_add().
static int add_primitive_nurbs_surface_cylinder_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6721 of file editcurve.c.
References CU_NURBS, CU_PRIM_TUBE, and surf_prim_add().
Referenced by SURFACE_OT_primitive_nurbs_surface_cylinder_add().
static int add_primitive_nurbs_surface_sphere_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6744 of file editcurve.c.
References CU_NURBS, CU_PRIM_SPHERE, and surf_prim_add().
Referenced by SURFACE_OT_primitive_nurbs_surface_sphere_add().
static int add_primitive_nurbs_surface_surface_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6698 of file editcurve.c.
References CU_NURBS, CU_PRIM_PATCH, and surf_prim_add().
Referenced by SURFACE_OT_primitive_nurbs_surface_surface_add().
static int add_primitive_nurbs_surface_torus_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 6767 of file editcurve.c.
References CU_NURBS, CU_PRIM_DONUT, and surf_prim_add().
Referenced by SURFACE_OT_primitive_nurbs_surface_torus_add().
static int add_vertex_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 4567 of file editcurve.c.
References addvert_Nurb(), wmOperator::ptr, and RNA_float_get_array().
Referenced by add_vertex_invoke(), and CURVE_OT_vertex_add().
static int add_vertex_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 4575 of file editcurve.c.
References add_vertex_exec(), copy_v3_v3(), CTX_wm_region_view3d(), Object::data, Curve::editnurb, findselectedNurbvert(), give_cursor(), mul_v3_m4v3(), wmEvent::mval, NurbSort::nu, EditNurb::nurbs, ViewContext::obedit, Object::obmat, wmOperator::ptr, RNA_float_set_array(), RNA_struct_property_is_set(), ViewContext::scene, TRUE, ViewContext::v3d, BezTriple::vec, BPoint::vec, view3d_get_view_aligned_coordinate(), and view3d_set_viewcontext().
Referenced by CURVE_OT_vertex_add().
static void adduplicateflagNurb | ( | Object * | obedit, |
short | flag | ||
) | [static] |
Definition at line 1810 of file editcurve.c.
References Nurb::bezt, BLI_addtail(), Nurb::bp, check_valid_nurb_u(), check_valid_nurb_v(), clamp_nurb_order_u(), clamp_nurb_order_v(), CU_BEZIER, CU_NURB_CYCLIC, Object::data, DESELECT, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, Nurb::flagu, G, G_DEBUG, HIDDEN, isNurbsel(), Nurb::knotsu, Nurb::knotsv, ListBase::last, Curve::lastsel, MEM_callocN(), MEM_dupallocN(), MEM_freeN(), MEM_mallocN(), NULL, nurbs_knot_calc_u(), nurbs_knot_calc_v(), object_editcurve_get(), Nurb::pntsu, Nurb::pntsv, Nurb::prev, SELECT, select_beztriple(), select_bpoint(), set_actNurb(), SWAP, and Nurb::type.
Referenced by duplicate_exec().
static int addvert_Nurb | ( | bContext * | C, |
short | mode, | ||
float | location[3] | ||
) | [static] |
Definition at line 4322 of file editcurve.c.
References Curve::actnu, add_v3_v3v3(), BEZ_DESEL, BEZ_SEL, Nurb::bezt, BLI_addtail(), BLI_findlink(), Nurb::bp, calchandlesNurb(), copy_v3_v3(), CTX_data_edit_object(), CU_BEZIER, CU_SMOOTH, DAG_id_tag_update(), Object::data, ED_curve_beztcpy(), ED_curve_bpcpy(), ED_curve_updateAnimPaths(), Curve::editnurb, BPoint::f1, findselectedNurbvert(), HD_AUTO, invert_m4_m4(), Curve::lastsel, MEM_callocN(), MEM_freeN(), MEM_mallocN(), mul_m4_v3(), mul_v3_m4v3(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, NurbSort::nu, NULL, nurbs_knot_calc_u(), Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::orderu, Nurb::pntsu, Nurb::pntsv, Curve::resolu, SELECT, set_actNurb(), sub_v3_v3v3(), test2DNurb(), Nurb::type, and WM_event_add_notifier().
Referenced by add_vertex_exec(), and extrude_exec().
static void bezt_to_key | ( | BezTriple * | bezt, |
float * | key | ||
) | [static] |
Definition at line 689 of file editcurve.c.
References BezTriple::alfa, and BezTriple::vec.
Referenced by calc_keyHandles().
static void calc_keyHandles | ( | ListBase * | nurb, |
float * | key | ||
) | [static] |
Definition at line 695 of file editcurve.c.
References Nurb::bezt, bezt_to_key(), calchandleNurb(), CU_NURB_CYCLIC, ListBase::first, Nurb::flagu, key_to_bezt(), Nurb::next, next, NULL, Nurb::pntsu, and Nurb::pntsv.
Referenced by calc_shapeKeys().
static void calc_shapeKeys | ( | Object * | obedit | ) | [static] |
Definition at line 761 of file editcurve.c.
References add_v3_v3(), BPoint::alfa, BezTriple::alfa, Nurb::bezt, BLI_findlink(), Key::block, Nurb::bp, calc_keyHandles(), copy_v3_v3(), count_curveverts(), Object::data, KeyBlock::data, Curve::editnurb, Key::elemsize, ListBase::first, getKeyIndexOrig_bezt(), getKeyIndexOrig_bp(), getKeyIndexOrig_keyIndex(), i, Curve::key, KEY_RELATIVE, MEM_callocN(), MEM_freeN(), KeyBlock::next, Nurb::next, NULL, EditNurb::nurbs, Nurb::pntsu, Nurb::pntsv, Key::refkey, KeyBlock::relative, EditNurb::shapenr, sub_v3_v3v3(), KeyBlock::totelem, Key::type, BezTriple::vec, and BPoint::vec.
Referenced by load_editNurb().
static int clear_tilt_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 6792 of file editcurve.c.
References BPoint::alfa, BezTriple::alfa, BEZSELECTED_HIDDENHANDLES, Nurb::bezt, Nurb::bp, CTX_data_edit_object(), DAG_id_tag_update(), Object::data, BPoint::f1, ListBase::first, NC_GEOM, ND_DATA, Nurb::next, NurbSort::nu, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, SELECT, and WM_event_add_notifier().
Referenced by CURVE_OT_tilt_clear().
static int convertspline | ( | short | type, |
Nurb * | nu | ||
) | [static] |
Definition at line 3311 of file editcurve.c.
References Nurb::bezt, Nurb::bp, calchandlesNurb(), copy_v3_v3(), CU_BEZIER, CU_NURB_BEZIER, CU_NURB_CYCLIC, CU_NURBS, CU_POLY, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, Nurb::flagu, BezTriple::h1, BezTriple::h2, HD_VECT, Nurb::knotsu, Nurb::knotsv, MEM_callocN(), MEM_freeN(), NULL, nurbs_knot_calc_u(), Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, BPoint::radius, BezTriple::radius, Nurb::type, BezTriple::vec, BPoint::vec, BPoint::weight, and BezTriple::weight.
Referenced by ED_nurb_set_spline_type(), and set_spline_type_exec().
void CU_deselect_all | ( | Object * | obedit | ) |
Definition at line 1277 of file editcurve.c.
References DESELECT, FIRST, object_editcurve_get(), select_adjacent_cp(), and selectend_nurb().
Referenced by de_select_all_exec(), do_lasso_select_curve(), do_nurbs_box_select(), and select_random_exec().
void CU_select_all | ( | Object * | obedit | ) |
Definition at line 1287 of file editcurve.c.
References FIRST, object_editcurve_get(), SELECT, select_adjacent_cp(), and selectend_nurb().
Referenced by de_select_all_exec().
int CU_select_nth | ( | Object * | obedit, |
int | nth | ||
) |
Definition at line 5462 of file editcurve.c.
References Nurb::bezt, Object::data, get_lastsel_nurb(), Curve::lastsel, NurbSort::nu, select_nth_bezt(), and select_nth_bp().
Referenced by select_nth_exec().
void CU_select_swap | ( | Object * | obedit | ) |
Definition at line 1297 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CU_BEZIER, CU_HIDE_HANDLES, Object::data, Curve::drawflag, BezTriple::f1, BezTriple::f2, BezTriple::f3, ListBase::first, BezTriple::hide, Curve::lastsel, Nurb::next, NULL, object_editcurve_get(), Nurb::pntsu, Nurb::pntsv, SELECT, swap_selection_bpoint(), and Nurb::type.
Referenced by de_select_all_exec().
static int curve_is_animated | ( | Object * | ob | ) | [static] |
Definition at line 1003 of file editcurve.c.
References BKE_animdata_from_id(), Object::data, and Curve::id.
Referenced by ED_curve_updateAnimPaths().
void CURVE_OT_cyclic_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 4782 of file editcurve.c.
References wmOperatorType::description, direction_items, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, toggle_cyclic_exec(), and toggle_cyclic_invoke().
Referenced by ED_operatortypes_curve().
void CURVE_OT_de_select_first | ( | wmOperatorType * | ot | ) |
Definition at line 2502 of file editcurve.c.
References de_select_first_exec(), ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_de_select_last | ( | wmOperatorType * | ot | ) |
Definition at line 2526 of file editcurve.c.
References de_select_last_exec(), ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 5893 of file editcurve.c.
References delete_exec(), delete_invoke(), wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void CURVE_OT_duplicate | ( | wmOperatorType * | ot | ) |
Definition at line 5529 of file editcurve.c.
References wmOperatorType::description, duplicate_exec(), ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_extrude | ( | wmOperatorType * | ot | ) |
Definition at line 4659 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, extrude_exec(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, TFM_TRANSLATION, and transform_mode_types.
Referenced by ED_operatortypes_curve().
void CURVE_OT_handle_type_set | ( | wmOperatorType * | ot | ) |
Definition at line 3528 of file editcurve.c.
References wmOperatorType::description, ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, HD_AUTO, HD_VECT, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), set_handle_type_exec(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_curve().
void CURVE_OT_hide | ( | wmOperatorType * | ot | ) |
Definition at line 2678 of file editcurve.c.
References ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, hide_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void CURVE_OT_make_segment | ( | wmOperatorType * | ot | ) |
Definition at line 4072 of file editcurve.c.
References ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, make_segment_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_primitive_bezier_circle_add | ( | wmOperatorType * | ot | ) |
Definition at line 6564 of file editcurve.c.
References add_primitive_bezier_circle_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
void CURVE_OT_primitive_bezier_curve_add | ( | wmOperatorType * | ot | ) |
Definition at line 6541 of file editcurve.c.
References add_primitive_bezier_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
void CURVE_OT_primitive_nurbs_circle_add | ( | wmOperatorType * | ot | ) |
Definition at line 6610 of file editcurve.c.
References add_primitive_nurbs_circle_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
void CURVE_OT_primitive_nurbs_curve_add | ( | wmOperatorType * | ot | ) |
Definition at line 6587 of file editcurve.c.
References add_primitive_nurbs_curve_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
void CURVE_OT_primitive_nurbs_path_add | ( | wmOperatorType * | ot | ) |
Definition at line 6633 of file editcurve.c.
References add_primitive_curve_path_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
void CURVE_OT_radius_set | ( | wmOperatorType * | ot | ) |
Definition at line 2108 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_float(), set_radius_exec(), wmOperatorType::srna, and WM_operator_props_popup().
Referenced by ED_operatortypes_curve().
void CURVE_OT_reveal | ( | wmOperatorType * | ot | ) |
Definition at line 2738 of file editcurve.c.
References ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and reveal_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 2604 of file editcurve.c.
References de_select_all_exec(), ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and WM_operator_properties_select_all().
Referenced by ED_operatortypes_curve().
void CURVE_OT_select_less | ( | wmOperatorType * | ot | ) |
Definition at line 5304 of file editcurve.c.
References ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and select_less_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 4864 of file editcurve.c.
References ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, select_linked_exec(), and select_linked_invoke().
Referenced by ED_operatortypes_curve().
void CURVE_OT_select_linked_pick | ( | wmOperatorType * | ot | ) |
Definition at line 4924 of file editcurve.c.
References ED_operator_editsurfcurve_region_view3d(), wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), select_linked_pick_invoke(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void CURVE_OT_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 5143 of file editcurve.c.
References ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and select_more_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_select_next | ( | wmOperatorType * | ot | ) |
Definition at line 5029 of file editcurve.c.
References ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and select_next_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_select_nth | ( | wmOperatorType * | ot | ) |
Definition at line 5500 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_int(), select_nth_exec(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void CURVE_OT_select_previous | ( | wmOperatorType * | ot | ) |
Definition at line 5056 of file editcurve.c.
References ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and select_previous_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_select_random | ( | wmOperatorType * | ot | ) |
Definition at line 5367 of file editcurve.c.
References ED_operator_editsurfcurve(), wmOperatorType::exec, FALSE, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), RNA_def_float_percentage(), select_random_exec(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void CURVE_OT_select_row | ( | wmOperatorType * | ot | ) |
Definition at line 5002 of file editcurve.c.
References ED_operator_editsurf(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and select_row_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_separate | ( | wmOperatorType * | ot | ) |
Definition at line 1400 of file editcurve.c.
References ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and separate_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_shade_flat | ( | wmOperatorType * | ot | ) |
Definition at line 5957 of file editcurve.c.
References ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and shade_smooth_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_shade_smooth | ( | wmOperatorType * | ot | ) |
Definition at line 5943 of file editcurve.c.
References ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and shade_smooth_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_smooth | ( | wmOperatorType * | ot | ) |
Definition at line 2184 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and smooth_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_smooth_radius | ( | wmOperatorType * | ot | ) |
Definition at line 2350 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and smooth_radius_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_spin | ( | wmOperatorType * | ot | ) |
Definition at line 4302 of file editcurve.c.
References ED_operator_editsurf(), wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_float_vector(), RNA_def_float_vector_xyz(), spin_exec(), spin_invoke(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void CURVE_OT_spline_type_set | ( | wmOperatorType * | ot | ) |
Definition at line 3486 of file editcurve.c.
References CU_BEZIER, CU_NURBS, CU_POLY, wmOperatorType::description, ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), set_spline_type_exec(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_curve().
void CURVE_OT_spline_weight_set | ( | wmOperatorType * | ot | ) |
Definition at line 2056 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_float_factor(), set_goal_weight_exec(), wmOperatorType::srna, and WM_operator_props_popup().
Referenced by ED_operatortypes_curve().
void CURVE_OT_subdivide | ( | wmOperatorType * | ot | ) |
Definition at line 3172 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_int(), wmOperatorType::srna, and subdivide_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_switch_direction | ( | wmOperatorType * | ot | ) |
Definition at line 2008 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and switch_direction_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_tilt_clear | ( | wmOperatorType * | ot | ) |
Definition at line 6827 of file editcurve.c.
References clear_tilt_exec(), ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_vertex_add | ( | wmOperatorType * | ot | ) |
Definition at line 4611 of file editcurve.c.
References add_vertex_exec(), add_vertex_invoke(), ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_float_vector_xyz(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
static int curve_prim_add | ( | bContext * | C, |
wmOperator * | op, | ||
int | type | ||
) | [static] |
Definition at line 6524 of file editcurve.c.
References curvesurf_prim_add().
Referenced by add_primitive_bezier_circle_exec(), add_primitive_bezier_exec(), add_primitive_curve_path_exec(), add_primitive_nurbs_circle_exec(), and add_primitive_nurbs_curve_exec().
Definition at line 1051 of file editcurve.c.
References BKE_animdata_from_id(), BLI_addtail(), BLI_snprintf(), Object::data, Curve::editnurb, fcurve_path_rename(), fcurve_remove(), ListBase::first, getCVKeyIndex(), Curve::id, FCurve::next, next, NULL, and FCurve::rna_path.
Referenced by ED_curve_updateAnimPaths().
static int curvesurf_prim_add | ( | bContext * | C, |
wmOperator * | op, | ||
int | type, | ||
int | isSurf | ||
) | [static] |
Definition at line 6454 of file editcurve.c.
References add_nurbs_primitive(), BLI_addtail(), CTX_data_edit_object(), CU_3D, CU_DEFORM_FILL, CU_PATH, CU_PRIM_PATH, DAG_id_tag_update(), Object::data, ED_object_add_generic_get_opts(), ED_object_add_type(), ED_object_exit_editmode(), ED_object_new_primitive_matrix(), ED_undo_push(), EM_FREEDATA, Curve::flag, get_curve_defname(), get_surf_defname(), Object::id, NC_OBJECT, ND_DRAW, NurbSort::nu, NULL, OB_CURVE, OB_RECALC_DATA, OB_SURF, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, rename_id(), rot, TRUE, Object::type, and WM_event_add_notifier().
Referenced by curve_prim_add(), and surf_prim_add().
static int de_select_all_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2575 of file editcurve.c.
References CTX_data_edit_object(), CU_deselect_all(), CU_select_all(), CU_select_swap(), Object::data, NC_GEOM, ND_SELECT, nurb_has_selected_cps(), object_editcurve_get(), OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, and WM_event_add_notifier().
Referenced by CURVE_OT_select_all().
static int de_select_first_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2492 of file editcurve.c.
References CTX_data_edit_object(), Object::data, DESELECT, FIRST, NC_GEOM, ND_SELECT, OPERATOR_FINISHED, selectend_nurb(), and WM_event_add_notifier().
Referenced by CURVE_OT_de_select_first().
static int de_select_last_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2516 of file editcurve.c.
References CTX_data_edit_object(), Object::data, DESELECT, LAST, NC_GEOM, ND_SELECT, OPERATOR_FINISHED, selectend_nurb(), and WM_event_add_notifier().
Referenced by CURVE_OT_de_select_last().
static int delete_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 5546 of file editcurve.c.
References Curve::actnu, BEZSELECTED_HIDDENHANDLES, Nurb::bezt, BLI_addtail(), BLI_remlink(), Nurb::bp, calchandlesNurb(), clamp_nurb_order_u(), CTX_data_edit_object(), CU_BEZIER, CU_NURB_CYCLIC, DAG_id_tag_update(), Object::data, deleteflagNurb(), ED_curve_beztcpy(), ED_curve_bpcpy(), ED_curve_updateAnimPaths(), Curve::editnurb, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, ListBase::first, Nurb::flagu, freeNurb(), freeNurblist(), keyIndex_delBezt(), keyIndex_delBP(), keyIndex_delNurb(), keyIndex_delNurbList(), keyIndex_updateBezt(), keyIndex_updateBP(), Nurb::knotsu, MEM_freeN(), MEM_mallocN(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, Nurb::next, next, NurbSort::nu, NULL, EditNurb::nurbs, nurbs_knot_calc_u(), OB_SURF, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, wmOperator::ptr, RNA_enum_get(), SELECT, Nurb::type, Object::type, and WM_event_add_notifier().
Referenced by CURVE_OT_delete().
static int delete_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 5870 of file editcurve.c.
References CTX_data_edit_object(), wmOperatorType::idname, NULL, OB_SURF, OPERATOR_CANCELLED, Object::type, wmOperator::type, uiItemEnumO(), uiItemsEnumO(), uiPupMenuBegin(), uiPupMenuEnd(), and uiPupMenuLayout().
Referenced by CURVE_OT_delete().
static int deleteflagNurb | ( | bContext * | C, |
wmOperator * | UNUSEDop, | ||
int | flag | ||
) | [static] |
Definition at line 1561 of file editcurve.c.
References BLI_remlink(), Nurb::bp, clamp_nurb_order_u(), clamp_nurb_order_v(), CTX_data_edit_object(), Object::data, ED_curve_updateAnimPaths(), Curve::editnurb, BPoint::f1, ListBase::first, freeNurb(), keyIndex_delBP(), keyIndex_delNurb(), keyIndex_updateBP(), Nurb::knotsv, Curve::lastsel, MEM_freeN(), MEM_mallocN(), NC_OBJECT, ND_KEYS, Nurb::next, next, NULL, nurbs_knot_calc_u(), nurbs_knot_calc_v(), OB_SURF, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, SWAP, Object::type, and WM_event_add_notifier().
Referenced by delete_exec().
Definition at line 658 of file editcurve.c.
References BLI_ghash_insert(), BLI_ghash_new(), BLI_ghashIterator_free(), BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue(), BLI_ghashIterator_isDone(), BLI_ghashIterator_new(), BLI_ghashIterator_step(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), and MEM_callocN().
Referenced by editCurve_to_undoCurve(), and undoCurve_to_editCurve().
static int duplicate_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 5519 of file editcurve.c.
References adduplicateflagNurb(), CTX_data_edit_object(), Object::data, NC_GEOM, ND_SELECT, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by CURVE_OT_duplicate().
int ED_curve_actSelection | ( | Curve * | cu, |
float | center[3] | ||
) |
Definition at line 6995 of file editcurve.c.
References Nurb::bezt, copy_v3_v3(), get_lastsel_nurb(), Curve::lastsel, NurbSort::nu, BezTriple::vec, and BPoint::vec.
Referenced by calc_manipulator_stats(), and calculateCenter().
Definition at line 6983 of file editcurve.c.
References keyIndex_updateBezt().
Referenced by addvert_Nurb(), delete_exec(), and make_segment_exec().
Definition at line 6989 of file editcurve.c.
References keyIndex_updateBP().
Referenced by addvert_Nurb(), delete_exec(), extrudeflagNurb(), and make_segment_exec().
int ED_curve_updateAnimPaths | ( | Object * | obedit | ) |
Definition at line 1165 of file editcurve.c.
References BKE_animdata_from_id(), curve_is_animated(), curve_rename_fcurves(), Object::data, and Curve::id.
Referenced by addvert_Nurb(), delete_exec(), deleteflagNurb(), extrude_exec(), load_editNurb(), make_segment_exec(), set_spline_type_exec(), spin_exec(), subdivide_exec(), switch_direction_exec(), and undoCurve_to_editCurve().
void ED_nurb_set_spline_type | ( | Nurb * | nu, |
int | type | ||
) |
Definition at line 3446 of file editcurve.c.
References convertspline().
static void* editCurve_to_undoCurve | ( | void * | obe | ) | [static] |
Definition at line 6910 of file editcurve.c.
References AnimData::action, Curve::actnu, UndoCurve::actnu, BKE_animdata_from_id(), BLI_addtail(), copy_fcurves(), curve_editnurbs(), bAction::curves, Object::data, AnimData::drivers, UndoCurve::drivers, dupli_keyIndexHash(), duplicateNurb(), Curve::editnurb, UndoCurve::fcurves, Curve::id, EditNurb::keyindex, keyIndex_updateNurb(), Curve::lastsel, UndoCurve::lastsel, MEM_callocN(), Nurb::next, NurbSort::nu, UndoCurve::nubase, NULL, undo_check_lastsel(), and UndoCurve::undoIndex.
Referenced by undo_push_curve().
static int extrude_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 4631 of file editcurve.c.
References addvert_Nurb(), CTX_data_edit_object(), DAG_id_tag_update(), Object::data, ED_curve_updateAnimPaths(), Curve::editnurb, extrudeflagNurb(), ListBase::first, isNurbsel_count(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, Nurb::next, NurbSort::nu, NULL, EditNurb::nurbs, OB_CURVE, OPERATOR_FINISHED, Nurb::pntsv, Object::type, and WM_event_add_notifier().
Referenced by CURVE_OT_extrude().
static short extrudeflagNurb | ( | EditNurb * | editnurb, |
int | flag | ||
) | [static] |
Definition at line 1693 of file editcurve.c.
References Nurb::bp, DESELECT, ED_curve_bpcpy(), BPoint::f1, ListBase::first, HIDDEN, isNurbselUV(), len(), MEM_freeN(), MEM_mallocN(), Nurb::next, EditNurb::nurbs, nurbs_knot_calc_u(), nurbs_knot_calc_v(), Nurb::orderv, Nurb::pntsu, Nurb::pntsv, SELECT, and select_bpoint().
Referenced by extrude_exec(), and spin_nurb().
static void fcurve_path_rename | ( | AnimData * | ad, |
char * | orig_rna_path, | ||
char * | rna_path, | ||
ListBase * | orig_curves, | ||
ListBase * | curves | ||
) | [static] |
Definition at line 1011 of file editcurve.c.
References AnimData::action, action_groups_add_channel(), action_groups_remove_channel(), BLI_addtail(), BLI_remlink(), BLI_sprintfN(), copy_fcurve(), bAction::curves, AnimData::drivers, ListBase::first, free_fcurve(), FCurve::grp, len(), MEM_freeN(), FCurve::next, FCurve::rna_path, and strlen().
Referenced by curve_rename_fcurves().
Definition at line 1043 of file editcurve.c.
References AnimData::action, action_groups_remove_channel(), BLI_remlink(), AnimData::drivers, and free_fcurve().
Referenced by curve_rename_fcurves().
static short findnearestNurbvert | ( | ViewContext * | vc, |
short | sel, | ||
const int | mval[2], | ||
Nurb ** | nurb, | ||
BezTriple ** | bezt, | ||
BPoint ** | bp | ||
) | [static] |
Definition at line 3224 of file editcurve.c.
References data, ED_view3d_init_mats_rv3d(), findnearestNurbvert__doClosest(), NULL, nurbs_foreachScreenVert(), ViewContext::obedit, and ViewContext::rv3d.
Referenced by mouse_nurb(), and select_linked_pick_invoke().
static void findnearestNurbvert__doClosest | ( | void * | userData, |
Nurb * | nu, | ||
BPoint * | bp, | ||
BezTriple * | bezt, | ||
int | beztindex, | ||
int | x, | ||
int | y | ||
) | [static] |
Definition at line 3191 of file editcurve.c.
References abs(), data, BezTriple::f1, BPoint::f1, BezTriple::f2, and BezTriple::f3.
Referenced by findnearestNurbvert().
static void findselectedNurbvert | ( | ListBase * | editnurb, |
Nurb ** | nu, | ||
BezTriple ** | bezt, | ||
BPoint ** | bp | ||
) | [static] |
Definition at line 3247 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, ListBase::first, Nurb::next, NULL, Nurb::pntsu, Nurb::pntsv, SELECT, and Nurb::type.
Referenced by add_vertex_invoke(), and addvert_Nurb().
void free_editNurb | ( | Object * | obedit | ) |
Definition at line 1270 of file editcurve.c.
References Object::data, and free_curve_editNurb().
Referenced by ED_object_exit_editmode(), and separate_exec().
static void free_undoCurve | ( | void * | ucv | ) | [static] |
Definition at line 6956 of file editcurve.c.
References BLI_ghash_free(), UndoCurve::drivers, UndoCurve::fcurves, free_fcurves(), freeNurblist(), MEM_freeN(), UndoCurve::nubase, NULL, and UndoCurve::undoIndex.
Referenced by undo_push_curve().
Definition at line 140 of file editcurve.c.
References Curve::actnu, BLI_findlink(), curve_editnurbs(), and Object::data.
Referenced by mouse_nurb().
static const char* get_curve_defname | ( | int | type | ) | [static] |
Definition at line 6051 of file editcurve.c.
References CU_BEZIER, CU_PRIM_CIRCLE, CU_PRIM_CURVE, CU_PRIM_PATH, CU_PRIMITIVE, and CU_TYPE.
Referenced by curvesurf_prim_add().
static void* get_data | ( | bContext * | C | ) | [static] |
Definition at line 6971 of file editcurve.c.
References CTX_data_edit_object().
Referenced by undo_push_curve().
Definition at line 5398 of file editcurve.c.
References curve_editnurbs(), ListBase::first, Curve::lastsel, Nurb::next, NurbSort::nu, NULL, and point_on_nurb().
Referenced by CU_select_nth(), and ED_curve_actSelection().
static const char* get_surf_defname | ( | int | type | ) | [static] |
Definition at line 6075 of file editcurve.c.
References CU_PRIM_CIRCLE, CU_PRIM_CURVE, CU_PRIM_DONUT, CU_PRIM_PATCH, CU_PRIM_SPHERE, and CU_PRIMITIVE.
Referenced by curvesurf_prim_add().
static CVKeyIndex* getCVKeyIndex | ( | EditNurb * | editnurb, |
void * | cv | ||
) | [static] |
Definition at line 354 of file editcurve.c.
References BLI_ghash_lookup(), and EditNurb::keyindex.
Referenced by curve_rename_fcurves(), getKeyIndexOrig_bezt(), getKeyIndexOrig_bp(), getKeyIndexOrig_keyIndex(), keyIndex_swap(), keyIndex_switchDirection(), and keyIndex_updateCV().
Definition at line 359 of file editcurve.c.
References getCVKeyIndex(), NULL, and CVKeyIndex::orig_cv.
Referenced by calc_shapeKeys(), and switch_keys_direction().
Definition at line 370 of file editcurve.c.
References getCVKeyIndex(), NULL, and CVKeyIndex::orig_cv.
Referenced by calc_shapeKeys(), and switch_keys_direction().
static int getKeyIndexOrig_keyIndex | ( | EditNurb * | editnurb, |
void * | cv | ||
) | [static] |
Definition at line 381 of file editcurve.c.
References getCVKeyIndex(), and CVKeyIndex::key_index.
Referenced by calc_shapeKeys().
static int hide_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2623 of file editcurve.c.
References BEZSELECTED_HIDDENHANDLES, Nurb::bezt, Nurb::bp, CTX_data_edit_object(), CU_BEZIER, DAG_id_tag_update(), Object::data, DESELECT, BPoint::f1, ListBase::first, HIDDEN, BPoint::hide, Nurb::hide, BezTriple::hide, invert(), NC_GEOM, ND_SELECT, Nurb::next, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, wmOperator::ptr, RNA_boolean_get(), SELECT, select_beztriple(), select_bpoint(), Nurb::type, and WM_event_add_notifier().
Referenced by CURVE_OT_hide().
static CVKeyIndex* init_cvKeyIndex | ( | void * | cv, |
int | key_index, | ||
int | nu_index, | ||
int | pt_index, | ||
Nurb * | orig_nu | ||
) | [static] |
Definition at line 289 of file editcurve.c.
References CVKeyIndex::key_index, MEM_callocN(), CVKeyIndex::nu_index, CVKeyIndex::orig_cv, CVKeyIndex::orig_nu, CVKeyIndex::pt_index, and CVKeyIndex::switched.
Referenced by init_editNurb_keyIndex().
Definition at line 303 of file editcurve.c.
References Nurb::bezt, BLI_ghash_insert(), BLI_ghash_new(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), Nurb::bp, ListBase::first, init_cvKeyIndex(), EditNurb::keyindex, Nurb::next, EditNurb::nurbs, Nurb::pntsu, and Nurb::pntsv.
Referenced by make_editNurb().
static int is_u_selected | ( | Nurb * | nu, |
int | u | ||
) | [static] |
Definition at line 3626 of file editcurve.c.
References Nurb::bp, Nurb::pntsu, Nurb::pntsv, and SELECT.
Referenced by merge_2_nurb().
int isNurbsel | ( | Nurb * | nu | ) |
Definition at line 215 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, Nurb::pntsu, Nurb::pntsv, SELECT, and Nurb::type.
Referenced by adduplicateflagNurb(), make_editNurb(), make_segment_exec(), make_selection_list_nurb(), material_slot_assign_exec(), printknots(), separate_exec(), set_spline_type_exec(), shade_smooth_exec(), spin_nurb(), and switch_direction_exec().
Definition at line 240 of file editcurve.c.
References BEZSELECTED_HIDDENHANDLES, Nurb::bezt, Nurb::bp, CU_BEZIER, BPoint::f1, Nurb::pntsu, Nurb::pntsv, SELECT, and Nurb::type.
Referenced by extrude_exec(), and make_segment_exec().
static short isNurbselUV | ( | Nurb * | nu, |
int * | u, | ||
int * | v, | ||
int | flag | ||
) | [static] |
Definition at line 1416 of file editcurve.c.
References Nurb::bp, BPoint::f1, Nurb::pntsu, and Nurb::pntsv.
Referenced by extrudeflagNurb().
int join_curve_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) |
Definition at line 5973 of file editcurve.c.
References Nurb::bezt, BLI_addtail(), BLI_movelisttolist(), Nurb::bp, calchandlesNurb(), CLAMP(), CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), DAG_scene_sort(), Object::data, duplicateNurb(), ED_base_object_free_and_unlink(), ED_object_enter_editmode(), ED_object_exit_editmode(), EM_DO_UNDO, EM_FREEDATA, EM_WAITCURSOR, ListBase::first, invert_m4_m4(), ListBase::last, Nurb::mat_nr, mul_m4_v3(), mult_m4_m4m4(), NC_SCENE, ND_OB_ACTIVE, Nurb::next, NurbSort::nu, NULL, Curve::nurb, Object::obmat, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, Object::totcol, Object::type, BPoint::vec, BezTriple::vec, and WM_event_add_notifier().
Referenced by join_exec().
Definition at line 682 of file editcurve.c.
References BezTriple::alfa, and BezTriple::vec.
Referenced by calc_keyHandles().
Definition at line 644 of file editcurve.c.
References Curve::editnurb, Curve::key, EditNurb::keyindex, keyIndex_switchDirection(), and switch_keys_direction().
Referenced by make_segment_exec(), and switch_direction_exec().
Definition at line 401 of file editcurve.c.
References keyIndex_delCV().
Referenced by delete_exec().
Definition at line 406 of file editcurve.c.
References keyIndex_delCV().
Referenced by delete_exec(), and deleteflagNurb().
static void keyIndex_delCV | ( | EditNurb * | editnurb, |
void * | cv | ||
) | [static] |
Definition at line 392 of file editcurve.c.
References BLI_ghash_remove(), EditNurb::keyindex, MEM_freeN(), and NULL.
Referenced by keyIndex_delBezt(), and keyIndex_delBP().
Definition at line 411 of file editcurve.c.
References Nurb::bezt, BLI_ghash_remove(), Nurb::bp, EditNurb::keyindex, MEM_freeN(), NULL, Nurb::pntsu, and Nurb::pntsv.
Referenced by delete_exec(), deleteflagNurb(), and keyIndex_delNurbList().
Definition at line 438 of file editcurve.c.
References ListBase::first, keyIndex_delNurb(), and Nurb::next.
Referenced by delete_exec().
static void keyIndex_swap | ( | EditNurb * | editnurb, |
void * | a, | ||
void * | b | ||
) | [static] |
Definition at line 495 of file editcurve.c.
References BLI_ghash_insert(), BLI_ghash_remove(), getCVKeyIndex(), EditNurb::keyindex, and NULL.
Referenced by keyIndex_switchDirection().
Definition at line 507 of file editcurve.c.
References Nurb::bezt, Nurb::bp, getCVKeyIndex(), keyIndex_swap(), Nurb::pntsu, Nurb::pntsv, and CVKeyIndex::switched.
Referenced by keyData_switchDirectionNurb().
static void keyIndex_updateBezt | ( | EditNurb * | editnurb, |
BezTriple * | bezt, | ||
BezTriple * | newbezt, | ||
int | count | ||
) | [static] |
Definition at line 474 of file editcurve.c.
References keyIndex_updateCV().
Referenced by delete_exec(), ED_curve_beztcpy(), keyIndex_updateNurb(), and subdividenurb().
static void keyIndex_updateBP | ( | EditNurb * | editnurb, |
BPoint * | bp, | ||
BPoint * | newbp, | ||
int | count | ||
) | [static] |
Definition at line 480 of file editcurve.c.
References keyIndex_updateCV().
Referenced by delete_exec(), deleteflagNurb(), ED_curve_bpcpy(), keyIndex_updateNurb(), and subdividenurb().
static void keyIndex_updateCV | ( | EditNurb * | editnurb, |
char * | cv, | ||
char * | newcv, | ||
int | count, | ||
int | size | ||
) | [static] |
Definition at line 449 of file editcurve.c.
References BLI_ghash_insert(), BLI_ghash_remove(), getCVKeyIndex(), i, EditNurb::keyindex, NULL, and size().
Referenced by keyIndex_updateBezt(), and keyIndex_updateBP().
Definition at line 486 of file editcurve.c.
References Nurb::bezt, Nurb::bp, keyIndex_updateBezt(), keyIndex_updateBP(), Nurb::pntsu, and Nurb::pntsv.
Referenced by editCurve_to_undoCurve(), and undoCurve_to_editCurve().
void load_editNurb | ( | Object * | obedit | ) |
Definition at line 1183 of file editcurve.c.
References BLI_addtail(), calc_shapeKeys(), clamp_nurb_order_u(), CU_NURBS, Object::data, duplicateNurb(), ED_curve_updateAnimPaths(), ELEM, ListBase::first, freeNurblist(), Nurb::next, NULL, Curve::nurb, OB_CURVE, OB_SURF, object_editcurve_get(), set_actNurb(), Nurb::type, and Object::type.
Referenced by ED_object_exit_editmode(), and separate_exec().
void make_editNurb | ( | Object * | obedit | ) |
Definition at line 1217 of file editcurve.c.
References BLI_addtail(), Object::data, duplicateNurb(), Curve::editnurb, ELEM, ListBase::first, free_curve_editNurb_keyIndex(), freeNurblist(), init_editNurb_keyIndex(), isNurbsel(), key_to_curve(), Curve::lastsel, MEM_callocN(), Nurb::next, NULL, Curve::nurb, OB_CURVE, ob_get_keyblock(), OB_SURF, set_actNurb(), Object::shapenr, test2DNurb(), Object::type, and undo_editmode_clear().
Referenced by ED_object_enter_editmode(), and separate_exec().
static int make_segment_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3891 of file editcurve.c.
References BEZSELECTED_HIDDENHANDLES, Nurb::bezt, BKE_report(), BLI_remlink(), Nurb::bp, calchandlesNurb(), CTX_data_edit_object(), CU_BEZIER, CU_NURB_CYCLIC, CU_NURBS, DAG_id_tag_update(), Object::data, ED_curve_beztcpy(), ED_curve_bpcpy(), ED_curve_updateAnimPaths(), Curve::editnurb, BPoint::f1, ListBase::first, Nurb::flagu, freeNurb(), isNurbsel(), isNurbsel_count(), keyData_switchDirectionNurb(), Nurb::knotsu, KNOTSU, MEM_freeN(), MEM_mallocN(), merge_nurb(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, Nurb::next, NurbSort::nu, NULL, nurbs_knot_calc_u(), OB_SURF, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::orderu, Nurb::pntsu, Nurb::pntsv, wmOperator::reports, RPT_ERROR, SELECT, set_actNurb(), switchdirectionNurb(), Object::type, Nurb::type, and WM_event_add_notifier().
Referenced by CURVE_OT_make_segment().
static void make_selection_list_nurb | ( | ListBase * | editnurb | ) | [static] |
Definition at line 3649 of file editcurve.c.
References add_v3_v3(), BLI_addhead(), BLI_addtail(), BLI_remlink(), Nurb::bp, ListBase::first, isNurbsel(), ListBase::last, len_v3v3(), MEM_callocN(), mul_v3_fl(), NurbSort::next, Nurb::next, NurbSort::nu, NULL, Nurb::pntsu, BPoint::vec, and NurbSort::vec.
Referenced by merge_nurb().
static void merge_2_nurb | ( | wmOperator * | op, |
ListBase * | editnurb, | ||
Nurb * | nu1, | ||
Nurb * | nu2 | ||
) | [static] |
Definition at line 3716 of file editcurve.c.
References BKE_report(), BLI_remlink(), Nurb::bp, CU_NURBS, freeNurb(), HIDDEN, is_u_selected(), len_v3v3(), MEM_freeN(), MEM_mallocN(), nurbs_knot_calc_u(), nurbs_knot_calc_v(), Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, wmOperator::reports, rotate_direction_nurb(), RPT_ERROR, SELECT, select_bpoint(), Nurb::type, and BPoint::vec.
Referenced by merge_nurb().
static int merge_nurb | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3837 of file editcurve.c.
References BKE_report(), BLI_freelistN(), CTX_data_edit_object(), DAG_id_tag_update(), Object::data, ListBase::first, ListBase::last, make_selection_list_nurb(), merge_2_nurb(), NC_GEOM, ND_DATA, NurbSort::next, NurbSort::nu, NULL, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, wmOperator::reports, RPT_ERROR, set_actNurb(), and WM_event_add_notifier().
Referenced by make_segment_exec().
int mouse_nurb | ( | bContext * | C, |
const int | mval[2], | ||
int | extend | ||
) |
Definition at line 4088 of file editcurve.c.
References CTX_data_edit_object(), Object::data, DESELECT, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, findnearestNurbvert(), get_actNurb(), HIDDEN, Curve::lastsel, NC_GEOM, ND_SELECT, NurbSort::nu, NULL, object_editcurve_get(), SELECT, select_beztriple(), select_bpoint(), set_actNurb(), setflagsNurb(), view3d_operator_needs_opengl(), view3d_set_viewcontext(), and WM_event_add_notifier().
Referenced by view3d_select_invoke().
static short nurb_has_selected_cps | ( | ListBase * | editnurb | ) | [static] |
Definition at line 2542 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, ListBase::first, BPoint::hide, BezTriple::hide, Nurb::next, Nurb::pntsu, Nurb::pntsv, SELECT, and Nurb::type.
Referenced by de_select_all_exec().
Definition at line 118 of file editcurve.c.
References Object::data, Curve::editnurb, ELEM, NULL, EditNurb::nurbs, OB_CURVE, OB_SURF, and Object::type.
Referenced by add_nurbs_primitive(), adduplicateflagNurb(), clear_tilt_exec(), CU_deselect_all(), CU_select_all(), CU_select_swap(), curvesurf_prim_add(), de_select_all_exec(), deleteflagNurb(), effector_add_type(), hide_exec(), load_editNurb(), make_segment_exec(), merge_nurb(), mouse_nurb(), printknots(), return_editcurve_indexar(), reveal_exec(), select_editcurve_hook(), select_less_exec(), select_more_exec(), select_next_exec(), select_previous_exec(), select_random_exec(), select_row_exec(), selectend_nurb(), set_goal_weight_exec(), set_handle_type_exec(), set_radius_exec(), set_spline_type_exec(), shade_smooth_exec(), smooth_exec(), smooth_radius_exec(), spin_nurb(), toggle_cyclic_exec(), toggle_cyclic_invoke(), and vertex_parent_set_exec().
static int point_on_nurb | ( | Nurb * | nu, |
void * | point | ||
) | [static] |
Definition at line 5387 of file editcurve.c.
References Nurb::bezt, Nurb::bp, Nurb::pntsu, and Nurb::pntsv.
Referenced by get_lastsel_nurb().
void printknots | ( | Object * | obedit | ) |
Definition at line 267 of file editcurve.c.
References CU_NURBS, ListBase::first, isNurbsel(), Nurb::knotsu, KNOTSU, Nurb::knotsv, KNOTSV, Nurb::next, object_editcurve_get(), and Nurb::type.
static int reveal_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2697 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CTX_data_edit_object(), CU_BEZIER, DAG_id_tag_update(), Object::data, ListBase::first, HIDDEN, BPoint::hide, BezTriple::hide, Nurb::hide, NC_GEOM, ND_SELECT, Nurb::next, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, SELECT, select_beztriple(), select_bpoint(), Nurb::type, and WM_event_add_notifier().
Referenced by CURVE_OT_reveal().
static void rotate_direction_nurb | ( | Nurb * | nu | ) | [static] |
Definition at line 3601 of file editcurve.c.
References Nurb::bp, Nurb::flagu, Nurb::flagv, Nurb::knotsu, Nurb::knotsv, KNOTSV, MEM_dupallocN(), MEM_freeN(), Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, Nurb::resolu, Nurb::resolv, SWAP, and switchdirection_knots().
Referenced by merge_2_nurb().
static void rotateflagNurb | ( | ListBase * | editnurb, |
short | flag, | ||
float * | cent, | ||
float | rotmat[][3] | ||
) | [static] |
Definition at line 1484 of file editcurve.c.
References add_v3_v3(), Nurb::bp, CU_NURBS, BPoint::f1, ListBase::first, mul_m3_v3(), Nurb::next, Nurb::pntsu, Nurb::pntsv, sub_v3_v3(), Nurb::type, and BPoint::vec.
Referenced by spin_nurb().
static void select_adjacent_cp | ( | ListBase * | editnurb, |
short | next, | ||
short | cont, | ||
short | selstatus | ||
) | [static] |
Definition at line 2371 of file editcurve.c.
References abs(), Nurb::bezt, Nurb::bp, CU_BEZIER, BPoint::f1, BezTriple::f2, ListBase::first, BPoint::hide, BezTriple::hide, Nurb::next, next, Nurb::pntsu, Nurb::pntsv, SELECT, select_beztriple(), select_bpoint(), Nurb::type, and VISIBLE.
Referenced by CU_deselect_all(), CU_select_all(), select_more_exec(), select_next_exec(), and select_previous_exec().
static short select_beztriple | ( | BezTriple * | bezt, |
short | selstatus, | ||
short | flag, | ||
short | hidden | ||
) | [static] |
Definition at line 158 of file editcurve.c.
References BezTriple::f1, BezTriple::f2, BezTriple::f3, and BezTriple::hide.
Referenced by adduplicateflagNurb(), hide_exec(), mouse_nurb(), reveal_exec(), select_adjacent_cp(), select_less_exec(), select_linked_exec(), select_linked_pick_invoke(), select_nth_bezt(), selectend_nurb(), selectrandom_curve(), and swap_selection_beztriple().
static short select_bpoint | ( | BPoint * | bp, |
short | selstatus, | ||
short | flag, | ||
short | hidden | ||
) | [static] |
Definition at line 181 of file editcurve.c.
References BPoint::f1, and BPoint::hide.
Referenced by adduplicateflagNurb(), extrudeflagNurb(), hide_exec(), merge_2_nurb(), mouse_nurb(), reveal_exec(), select_adjacent_cp(), select_less_exec(), select_linked_exec(), select_linked_pick_invoke(), select_more_exec(), select_nth_bp(), select_row_exec(), selectend_nurb(), selectrandom_curve(), and swap_selection_bpoint().
static int select_less_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 5160 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CTX_data_edit_object(), CU_BEZIER, Object::data, DESELECT, BPoint::f1, BezTriple::f2, ListBase::first, BezTriple::hide, BPoint::hide, MEM_callocN(), MEM_freeN(), NC_GEOM, ND_SELECT, Nurb::next, NurbSort::nu, OB_SURF, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, SELECT, select_beztriple(), select_bpoint(), Nurb::type, Object::type, VISIBLE, and WM_event_add_notifier().
Referenced by CURVE_OT_select_less().
static int select_linked_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 4808 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CTX_data_edit_object(), CU_BEZIER, Object::data, Curve::editnurb, NC_GEOM, ND_SELECT, Nurb::next, NurbSort::nu, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, SELECT, select_beztriple(), select_bpoint(), Nurb::type, VISIBLE, and WM_event_add_notifier().
Referenced by CURVE_OT_select_linked(), and select_linked_invoke().
static int select_linked_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 4859 of file editcurve.c.
References select_linked_exec().
Referenced by CURVE_OT_select_linked().
static int select_linked_pick_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 4884 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CTX_data_edit_object(), Object::data, DESELECT, findnearestNurbvert(), wmEvent::mval, NC_GEOM, ND_SELECT, NurbSort::nu, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, wmOperator::ptr, RNA_boolean_get(), SELECT, select_beztriple(), select_bpoint(), view3d_operator_needs_opengl(), view3d_set_viewcontext(), VISIBLE, and WM_event_add_notifier().
Referenced by CURVE_OT_select_linked_pick().
static int select_more_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 5072 of file editcurve.c.
References Nurb::bp, CTX_data_edit_object(), Object::data, BPoint::f1, ListBase::first, BPoint::hide, MEM_callocN(), MEM_freeN(), NC_GEOM, ND_SELECT, Nurb::next, NurbSort::nu, OB_SURF, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, SELECT, select_adjacent_cp(), select_bpoint(), Object::type, VISIBLE, and WM_event_add_notifier().
Referenced by CURVE_OT_select_more().
static int select_next_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 5018 of file editcurve.c.
References CTX_data_edit_object(), Object::data, NC_GEOM, ND_SELECT, object_editcurve_get(), OPERATOR_FINISHED, SELECT, select_adjacent_cp(), and WM_event_add_notifier().
Referenced by CURVE_OT_select_next().
Definition at line 5416 of file editcurve.c.
References abs(), Nurb::bezt, DESELECT, HIDDEN, Nurb::pntsu, and select_beztriple().
Referenced by CU_select_nth().
Definition at line 5433 of file editcurve.c.
References abs(), Nurb::bp, DESELECT, HIDDEN, Nurb::pntsu, Nurb::pntsv, and select_bpoint().
Referenced by CU_select_nth().
static int select_nth_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 5480 of file editcurve.c.
References BKE_report(), CTX_data_edit_object(), CU_select_nth(), Object::data, NC_GEOM, ND_SELECT, OB_SURF, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_int_get(), RPT_ERROR, Object::type, and WM_event_add_notifier().
Referenced by CURVE_OT_select_nth().
static int select_previous_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 5045 of file editcurve.c.
References CTX_data_edit_object(), Object::data, NC_GEOM, ND_SELECT, object_editcurve_get(), OPERATOR_FINISHED, SELECT, select_adjacent_cp(), and WM_event_add_notifier().
Referenced by CURVE_OT_select_previous().
static int select_random_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 5352 of file editcurve.c.
References CTX_data_edit_object(), CU_deselect_all(), Object::data, NC_GEOM, ND_SELECT, object_editcurve_get(), OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_float_get(), selectrandom_curve(), and WM_event_add_notifier().
Referenced by CURVE_OT_select_random().
static int select_row_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 4943 of file editcurve.c.
References Nurb::bp, CTX_data_edit_object(), Object::data, BPoint::f1, ListBase::first, Curve::lastsel, NC_GEOM, ND_SELECT, Nurb::next, NurbSort::nu, NULL, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, SELECT, select_bpoint(), setflagsNurb(), VISIBLE, and WM_event_add_notifier().
Referenced by CURVE_OT_select_row().
void selectend_nurb | ( | Object * | obedit, |
short | selfirst, | ||
short | doswap, | ||
short | selstatus | ||
) |
Definition at line 2434 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CU_BEZIER, Object::data, ListBase::first, BPoint::hide, Curve::lastsel, Nurb::next, NULL, object_editcurve_get(), Nurb::pntsu, Nurb::pntsv, select_beztriple(), select_bpoint(), swap_selection_beztriple(), swap_selection_bpoint(), Nurb::type, and VISIBLE.
Referenced by CU_deselect_all(), CU_select_all(), de_select_first_exec(), and de_select_last_exec().
static void selectrandom_curve | ( | ListBase * | editnurb, |
float | randfac | ||
) | [static] |
Definition at line 5320 of file editcurve.c.
References Nurb::bezt, BLI_frand(), BLI_rand(), BLI_srand(), Nurb::bp, CU_BEZIER, ListBase::first, Nurb::next, NurbSort::nu, Nurb::pntsu, Nurb::pntsv, SELECT, select_beztriple(), select_bpoint(), Nurb::type, and VISIBLE.
Referenced by select_random_exec().
static int separate_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 1339 of file editcurve.c.
References BA_DESELECT, BKE_report(), BLI_addtail(), BLI_remlink(), copy_curve(), CTX_data_active_base(), CTX_data_main(), CTX_data_scene(), DAG_id_tag_update(), Object::data, ED_base_object_select(), ED_object_add_duplicate(), Curve::editnurb, ListBase::first, free_curve_editNurb_keyIndex(), free_editNurb(), freeNurblist(), Object::id, Curve::id, isNurbsel(), Curve::key, load_editNurb(), make_editNurb(), NC_GEOM, ND_DATA, Nurb::next, NULL, EditNurb::nurbs, OB_RECALC_DATA, Base::object, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, ID::us, WM_cursor_wait(), and WM_event_add_notifier().
Referenced by CURVE_OT_separate().
Definition at line 128 of file editcurve.c.
References Curve::actnu, BLI_findindex(), curve_editnurbs(), Object::data, and NULL.
Referenced by adduplicateflagNurb(), addvert_Nurb(), load_editNurb(), make_editNurb(), make_segment_exec(), merge_nurb(), and mouse_nurb().
static int set_goal_weight_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2025 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CTX_data_edit_object(), DAG_id_tag_update(), Object::data, BPoint::f1, BezTriple::f2, ListBase::first, NC_GEOM, ND_DATA, Nurb::next, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsv, wmOperator::ptr, RNA_float_get(), SELECT, BPoint::weight, BezTriple::weight, and WM_event_add_notifier().
Referenced by CURVE_OT_spline_weight_set().
static int set_handle_type_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3515 of file editcurve.c.
References CTX_data_edit_object(), DAG_id_tag_update(), Object::data, NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), sethandlesNurb(), and WM_event_add_notifier().
Referenced by CURVE_OT_handle_type_set().
static int set_radius_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 2077 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CTX_data_edit_object(), DAG_id_tag_update(), Object::data, BPoint::f1, BezTriple::f2, ListBase::first, NC_GEOM, ND_DATA, Nurb::next, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsv, wmOperator::ptr, BPoint::radius, BezTriple::radius, RNA_float_get(), SELECT, and WM_event_add_notifier().
Referenced by CURVE_OT_radius_set().
static int set_spline_type_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3451 of file editcurve.c.
References BKE_report(), convertspline(), CTX_data_edit_object(), CU_BSPLINE, CU_CARDINAL, DAG_id_tag_update(), Object::data, ED_curve_updateAnimPaths(), ListBase::first, isNurbsel(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, Nurb::next, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, and WM_event_add_notifier().
Referenced by CURVE_OT_spline_type_set().
static void setflagsNurb | ( | ListBase * | editnurb, |
short | flag | ||
) | [static] |
Definition at line 1457 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, ListBase::first, Nurb::next, Nurb::pntsu, Nurb::pntsv, and Nurb::type.
Referenced by mouse_nurb(), and select_row_exec().
static int shade_smooth_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 5920 of file editcurve.c.
References clear(), CTX_data_edit_object(), CU_SMOOTH, DAG_id_tag_update(), Object::data, ListBase::first, Nurb::flag, wmOperator::idname, isNurbsel(), NC_GEOM, ND_DATA, Nurb::next, NurbSort::nu, OB_CURVE, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Object::type, and WM_event_add_notifier().
Referenced by CURVE_OT_shade_flat(), and CURVE_OT_shade_smooth().
static int smooth_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2129 of file editcurve.c.
References Nurb::bezt, Nurb::bp, calchandlesNurb(), CTX_data_edit_object(), DAG_id_tag_update(), Object::data, BPoint::f1, BezTriple::f2, ListBase::first, i, MEM_dupallocN(), MEM_freeN(), NC_GEOM, ND_DATA, Nurb::next, object_editcurve_get(), OPERATOR_FINISHED, SELECT, simple_enum_gen::val, BezTriple::vec, BPoint::vec, and WM_event_add_notifier().
Referenced by CURVE_OT_smooth().
static int smooth_radius_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 2202 of file editcurve.c.
References Nurb::bezt, Nurb::bp, CTX_data_edit_object(), DAG_id_tag_update(), Object::data, BPoint::f1, BezTriple::f2, ListBase::first, NC_GEOM, ND_DATA, Nurb::next, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsu, BPoint::radius, BezTriple::radius, SELECT, and WM_event_add_notifier().
Referenced by CURVE_OT_smooth_radius().
static int spin_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 4255 of file editcurve.c.
References BKE_report(), copy_m4_m4(), CTX_data_edit_object(), DAG_id_tag_update(), Object::data, ED_curve_updateAnimPaths(), ED_view3d_context_rv3d(), Object::imat, invert_m4_m4(), mul_m4_v3(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_float_get_array(), RPT_ERROR, spin_nurb(), unit_m4(), RegionView3D::viewmat, and WM_event_add_notifier().
Referenced by CURVE_OT_spin(), and spin_invoke().
static int spin_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 4286 of file editcurve.c.
References copy_v3_v3(), CTX_data_scene(), CTX_wm_view3d(), ED_view3d_context_rv3d(), give_cursor(), wmOperator::ptr, RNA_float_set_array(), spin_exec(), and RegionView3D::viewinv.
Referenced by CURVE_OT_spin().
static int spin_nurb | ( | float | viewmat[][4], |
Object * | obedit, | ||
float * | axis, | ||
float * | cent | ||
) | [static] |
Definition at line 4173 of file editcurve.c.
References copy_m3_m4(), cos(), CU_NURB_CYCLIC, Object::data, Curve::editnurb, extrudeflagNurb(), Nurb::flagv, invert_m3_m3(), isNurbsel(), M_PI, M_SQRT2, mul_m3_m3m3(), Nurb::next, normalize_v3_v3(), NurbSort::nu, nurbs_knot_calc_v(), object_editcurve_get(), Object::obmat, Nurb::orderv, quat_to_mat3(), rotateflagNurb(), SELECT, si, sin(), unit_m3(), and weightflagNurb().
Referenced by spin_exec().
static int subdivide_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3156 of file editcurve.c.
References CTX_data_edit_object(), DAG_id_tag_update(), Object::data, ED_curve_updateAnimPaths(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, OPERATOR_FINISHED, wmOperator::ptr, RNA_int_get(), subdividenurb(), and WM_event_add_notifier().
Referenced by CURVE_OT_subdivide().
static void subdividenurb | ( | Object * | obedit, |
int | number_cuts | ||
) | [static] |
Divide the line segments associated with the currently selected curve nodes (Bezier or NURB). If there are no valid segment selections within the current selection, nothing happens.
Subdivide NURB surfaces - nzc 30-5-'00 -
Subdivision of a NURB curve can be effected by adding a control point (insertion of a knot), or by raising the degree of the functions used to build the NURB. The expression
degree = #knots - #controlpoints + 1 (J Walter piece) degree = #knots - #controlpoints (Blender implementation) ( this is confusing.... what is true? Another concern is that the JW piece allows the curve to become explicitly 1st order derivative discontinuous, while this is not what we want here... )
is an invariant for a single NURB curve. Raising the degree of the NURB is done elsewhere; the degree is assumed constant during this opration. Degree is a property shared by all controlpoints in a curve (even though it is stored per control point - this can be misleading). Adding a knot is done by searching for the place in the knot vector where a certain knot value must be inserted, or by picking an appropriate knot value between two existing ones. The number of controlpoints that is influenced by the insertion depends on the order of the curve. A certain minimum number of knots is needed to form high-order curves, as can be seen from the equation above. In Blender, currently NURBs may be up to 6th order, so we modify at most 6 points. One point is added. For an n-degree curve, n points are discarded, and n+1 points inserted (so effectively, n points are modified). (that holds for the JW piece, but it seems not for our NURBs) In practice, the knot spacing is copied, but the tail (the points following the insertion point) need to be offset to keep the knot series ascending. The knot series is always a series of monotonically ascending integers in Blender. When not enough control points are available to fit the order, duplicates of the endpoints are added as needed.
Definition at line 2758 of file editcurve.c.
References BEZSELECTED_HIDDENHANDLES, Nurb::bezt, Nurb::bp, calchandlesNurb(), copy_v3_v3(), CU_BEZIER, CU_NURB_CYCLIC, CU_NURBS, Object::data, Curve::editnurb, BPoint::f1, ListBase::first, Nurb::flagu, i, interp_v3_v3v3(), interp_v4_v4v4(), keyIndex_updateBezt(), keyIndex_updateBP(), MEM_callocN(), MEM_freeN(), MEM_mallocN(), Nurb::next, EditNurb::nurbs, nurbs_knot_calc_u(), nurbs_knot_calc_v(), Nurb::pntsu, Nurb::pntsv, BezTriple::radius, SELECT, Nurb::type, BezTriple::vec, BPoint::vec, and BezTriple::weight.
Referenced by subdivide_exec().
static int surf_prim_add | ( | bContext * | C, |
wmOperator * | op, | ||
int | type | ||
) | [static] |
Definition at line 6529 of file editcurve.c.
References curvesurf_prim_add().
Referenced by add_primitive_nurbs_surface_circle_exec(), add_primitive_nurbs_surface_curve_exec(), add_primitive_nurbs_surface_cylinder_exec(), add_primitive_nurbs_surface_sphere_exec(), add_primitive_nurbs_surface_surface_exec(), and add_primitive_nurbs_surface_torus_exec().
void SURFACE_OT_primitive_nurbs_surface_circle_add | ( | wmOperatorType * | ot | ) |
Definition at line 6680 of file editcurve.c.
References add_primitive_nurbs_surface_circle_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
void SURFACE_OT_primitive_nurbs_surface_curve_add | ( | wmOperatorType * | ot | ) |
Definition at line 6657 of file editcurve.c.
References add_primitive_nurbs_surface_curve_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
void SURFACE_OT_primitive_nurbs_surface_cylinder_add | ( | wmOperatorType * | ot | ) |
Definition at line 6726 of file editcurve.c.
References add_primitive_nurbs_surface_cylinder_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
void SURFACE_OT_primitive_nurbs_surface_sphere_add | ( | wmOperatorType * | ot | ) |
Definition at line 6749 of file editcurve.c.
References add_primitive_nurbs_surface_sphere_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
void SURFACE_OT_primitive_nurbs_surface_surface_add | ( | wmOperatorType * | ot | ) |
Definition at line 6703 of file editcurve.c.
References add_primitive_nurbs_surface_surface_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
void SURFACE_OT_primitive_nurbs_surface_torus_add | ( | wmOperatorType * | ot | ) |
Definition at line 6772 of file editcurve.c.
References add_primitive_nurbs_surface_torus_exec(), wmOperatorType::description, ED_object_add_generic_invoke(), ED_object_add_generic_props(), ED_operator_scene_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and TRUE.
Referenced by ED_operatortypes_curve().
static short swap_selection_beztriple | ( | BezTriple * | bezt | ) | [static] |
Definition at line 199 of file editcurve.c.
References DESELECT, BezTriple::f2, SELECT, select_beztriple(), and VISIBLE.
Referenced by selectend_nurb().
static short swap_selection_bpoint | ( | BPoint * | bp | ) | [static] |
Definition at line 207 of file editcurve.c.
References DESELECT, BPoint::f1, SELECT, select_bpoint(), and VISIBLE.
Referenced by CU_select_swap(), and selectend_nurb().
static int switch_direction_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 1986 of file editcurve.c.
References CTX_data_edit_object(), DAG_id_tag_update(), Object::data, ED_curve_updateAnimPaths(), Curve::editnurb, isNurbsel(), keyData_switchDirectionNurb(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, OPERATOR_FINISHED, switchdirectionNurb(), and WM_event_add_notifier().
Referenced by CURVE_OT_switch_direction().
Definition at line 595 of file editcurve.c.
References Nurb::bezt, Key::block, Nurb::bp, KeyBlock::data, Curve::editnurb, ListBase::first, getKeyIndexOrig_bezt(), getKeyIndexOrig_bp(), Curve::key, KeyBlock::next, Nurb::next, EditNurb::nurbs, Nurb::pntsu, Nurb::pntsv, and swap_v3_v3().
Referenced by keyData_switchDirectionNurb().
static void switchdirection_knots | ( | float * | base, |
int | tot | ||
) | [static] |
Definition at line 3560 of file editcurve.c.
References fabs(), MEM_freeN(), MEM_mallocN(), NULL, and SWAP.
Referenced by rotate_direction_nurb().
static int toggle_cyclic_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 4679 of file editcurve.c.
References BEZSELECTED_HIDDENHANDLES, Nurb::bezt, Nurb::bp, calchandlesNurb(), CTX_data_edit_object(), CU_BEZIER, CU_NURB_CYCLIC, CU_NURBS, CU_POLY, DAG_id_tag_update(), Object::data, BPoint::f1, ListBase::first, Nurb::flagu, Nurb::flagv, Nurb::knotsu, NC_GEOM, ND_DATA, Nurb::next, NurbSort::nu, nurbs_knot_calc_u(), nurbs_knot_calc_v(), object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, wmOperator::ptr, RNA_enum_get(), SELECT, Nurb::type, and WM_event_add_notifier().
Referenced by CURVE_OT_cyclic_toggle(), and toggle_cyclic_invoke().
static int toggle_cyclic_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 4757 of file editcurve.c.
References CTX_data_edit_object(), CU_NURBS, ListBase::first, wmOperatorType::idname, Nurb::next, NurbSort::nu, OB_SURF, object_editcurve_get(), OPERATOR_CANCELLED, Nurb::pntsu, Nurb::pntsv, toggle_cyclic_exec(), Object::type, wmOperator::type, Nurb::type, uiItemsEnumO(), uiPupMenuBegin(), uiPupMenuEnd(), and uiPupMenuLayout().
Referenced by CURVE_OT_cyclic_toggle().
static void translateflagNurb | ( | ListBase * | editnurb, |
short | flag, | ||
float * | vec | ||
) | [static] |
Definition at line 1508 of file editcurve.c.
References add_v3_v3(), Nurb::bezt, Nurb::bp, CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, ListBase::first, Nurb::next, Nurb::pntsu, Nurb::pntsv, test2DNurb(), Nurb::type, BezTriple::vec, and BPoint::vec.
Definition at line 6843 of file editcurve.c.
References Nurb::bezt, Nurb::bp, NULL, Nurb::pntsu, and Nurb::pntsv.
Referenced by editCurve_to_undoCurve(), and undoCurve_to_editCurve().
void undo_push_curve | ( | bContext * | C, |
const char * | name | ||
) |
Definition at line 6978 of file editcurve.c.
References editCurve_to_undoCurve(), free_undoCurve(), get_data(), NULL, undo_editmode_push(), and undoCurve_to_editCurve().
Referenced by ED_undo_push().
static void undoCurve_to_editCurve | ( | void * | ucu, |
void * | obe | ||
) | [static] |
Definition at line 6860 of file editcurve.c.
References AnimData::action, Curve::actnu, BKE_animdata_from_id(), BLI_addtail(), BLI_ghash_free(), copy_fcurves(), curve_editnurbs(), bAction::curves, Object::data, AnimData::drivers, dupli_keyIndexHash(), duplicateNurb(), ED_curve_updateAnimPaths(), Curve::editnurb, ListBase::first, free_fcurves(), freeNurblist(), Curve::id, EditNurb::keyindex, keyIndex_updateNurb(), Curve::lastsel, MEM_freeN(), Nurb::next, NurbSort::nu, NULL, undo_check_lastsel(), and undobase.
Referenced by undo_push_curve().
static void weightflagNurb | ( | ListBase * | editnurb, |
short | flag, | ||
float | w | ||
) | [static] |
Definition at line 1540 of file editcurve.c.
References Nurb::bp, CU_NURBS, BPoint::f1, ListBase::first, Nurb::next, Nurb::pntsu, Nurb::pntsv, Nurb::type, BPoint::vec, and simple_enum_gen::w.
Referenced by spin_nurb().
Definition at line 3646 of file editcurve.c.
float nurbcircle[8][2] [static] |
{ {0.0, -1.0}, {-1.0, -1.0}, {-1.0, 0.0}, {-1.0, 1.0}, {0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0} }
Definition at line 113 of file editcurve.c.