Blender
V3.3
|
#include "DNA_anim_types.h"
#include "DNA_key_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "MEM_guardedalloc.h"
#include "BLI_array_utils.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_math.h"
#include "BLT_translation.h"
#include "BKE_action.h"
#include "BKE_anim_data.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_key.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_report.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_curve.h"
#include "ED_object.h"
#include "ED_outliner.h"
#include "ED_screen.h"
#include "ED_select_utils.h"
#include "ED_transform.h"
#include "ED_transform_snap_object_context.h"
#include "ED_types.h"
#include "ED_view3d.h"
#include "curve_intern.h"
#include "curve_fit_nd.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.
Classes | |
struct | NurbSort |
Macros | |
#define | BEZT_VALUE(bezt) (*((float *)((char *)(bezt) + bezt_offsetof))) |
#define | BP_VALUE(bp) (*((float *)((char *)(bp) + bp_offset))) |
Make Segment Operator | |
enum | { CURVE_MERGE_OK = 0 , CURVE_MERGE_ERR_FEW_SELECTION , CURVE_MERGE_ERR_RESOLUTION_ALL , CURVE_MERGE_ERR_RESOLUTION_SOME } |
typedef struct NurbSort | NurbSort |
static void | switchdirection_knots (float *base, int tot) |
static void | rotate_direction_nurb (Nurb *nu) |
static bool | is_u_selected (Nurb *nu, int u) |
static void | make_selection_list_nurb (View3D *v3d, ListBase *editnurb, ListBase *nsortbase) |
static bool | merge_2_nurb (Curve *cu, ListBase *editnurb, Nurb *nu1, Nurb *nu2) |
static int | merge_nurb (View3D *v3d, Object *obedit) |
static int | make_segment_exec (bContext *C, wmOperator *op) |
void | CURVE_OT_make_segment (wmOperatorType *ot) |
Delete Operator | |
static const EnumPropertyItem | curve_delete_type_items [] |
static bool | curve_delete_segments (Object *obedit, View3D *v3d, const bool split) |
static bool | curve_delete_vertices (Object *obedit, View3D *v3d) |
static int | curve_delete_exec (bContext *C, wmOperator *op) |
static const EnumPropertyItem * | rna_curve_delete_type_itemf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) |
void | CURVE_OT_delete (wmOperatorType *ot) |
anonymous enum |
Enumerator | |
---|---|
CURVE_MERGE_OK | |
CURVE_MERGE_ERR_FEW_SELECTION | |
CURVE_MERGE_ERR_RESOLUTION_ALL | |
CURVE_MERGE_ERR_RESOLUTION_SOME |
Definition at line 4193 of file editcurve.c.
|
static |
Definition at line 5524 of file editcurve.c.
References C, CTX_data_edit_object(), CTX_data_main(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), ED_curve_updateAnimPaths(), ed_editcurve_addvert(), Curve::editnurb, invert_m4_m4(), mul_m4_v3(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, ND_SELECT, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_float_get_array(), and WM_event_add_notifier().
Referenced by add_vertex_invoke(), and CURVE_OT_vertex_add().
|
static |
Definition at line 5554 of file editcurve.c.
References add_vertex_exec(), C, copy_v3_v3(), CTX_data_ensure_evaluated_depsgraph(), CU_IS_2D, Scene::cursor, Object::data, depsgraph, ViewContext::depsgraph, dot_v3v3(), ED_curve_nurb_vert_selected_find(), ED_transform_snap_object_context_create(), ED_transform_snap_object_context_destroy(), ED_transform_snap_object_project_view3d(), ED_view3d_global_to_vector(), ED_view3d_viewcontext_init(), ED_view3d_win_to_3d_int(), eps, fabsf, RegionView3D::is_persp, isect_ray_plane_v3(), View3DCursor::location, madd_v3_v3v3fl(), mul_project_m4_v3_zfac(), mul_v3_m4v3(), SnapObjectContext::mval, wmEvent::mval, normalize_v3_v3(), NULL, ViewContext::obedit, Object::obmat, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, RegionView3D::persmat, wmOperator::ptr, ViewContext::region, RNA_float_set_array(), RNA_struct_property_is_set(), ViewContext::rv3d, SCE_SNAP, SCE_SNAP_MODE_FACE_RAYCAST, ViewContext::scene, ToolSettings::snap_flag, ToolSettings::snap_mode, Scene::toolsettings, UNPACK2, ViewContext::v3d, BezTriple::vec, BPoint::vec, and WM_operator_flag_only_pass_through_on_press().
Referenced by CURVE_OT_vertex_add().
|
static |
Definition at line 2116 of file editcurve.c.
References Freestyle::a, Curve::actnu, Curve::actvert, usdtokens::b(), Nurb::bezt, BKE_nurb_copy(), BKE_nurb_handle_calc_simple(), BKE_nurb_knot_calc_u(), BKE_nurb_knot_calc_v(), BKE_nurb_order_clamp_u(), BKE_nurb_order_clamp_v(), BLI_addtail(), BLI_listbase_is_empty(), Nurb::bp, Freestyle::c, calc_duplicate_actnurb(), calc_duplicate_actvert(), CU_BEZIER, CU_NURB_CYCLIC, Object::data, DESELECT, ED_curve_nurb_select_check(), ELEM, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, Nurb::flagu, Nurb::flagv, G, G_DEBUG, HIDDEN, isNurbselU(), isNurbselV(), LISTBASE_FOREACH, LISTBASE_FOREACH_INDEX, MEM_callocN, MEM_freeN, OB_SURF, object_editcurve_get(), Nurb::pntsu, Nurb::pntsv, SELECT, select_beztriple(), select_bpoint(), blender::io::alembic::split(), SURF_SEEN, Nurb::type, and Object::type.
Referenced by curve_split_exec(), duplicate_exec(), and separate_exec().
Definition at line 550 of file editcurve.c.
References BezTriple::radius, BezTriple::tilt, and BezTriple::vec.
Referenced by calc_keyHandles().
|
static |
Definition at line 2095 of file editcurve.c.
References Curve::actnu, and BLI_listbase_count().
Referenced by adduplicateflagNurb(), and calc_duplicate_actvert().
|
static |
Definition at line 2100 of file editcurve.c.
References Curve::actvert, and calc_duplicate_actnurb().
Referenced by adduplicateflagNurb().
Definition at line 557 of file editcurve.c.
References Freestyle::a, Nurb::bezt, bezt_to_key(), BKE_nurb_handle_calc(), CU_NURB_CYCLIC, Nurb::flagu, key_to_bezt(), KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, LISTBASE_FOREACH, next, NULL, Nurb::pntsu, Nurb::pntsv, and blender::meshintersect::prev().
Referenced by calc_shapeKeys().
Definition at line 626 of file editcurve.c.
References Freestyle::a, add_v3_v3(), Nurb::bezt, BKE_keyblock_curve_element_count(), BKE_keyblock_is_basis(), BLI_findlink(), Key::block, Nurb::bp, calc_keyHandles(), copy_v3_v3(), Object::data, Curve::editnurb, Key::elemsize, ListBase::first, float(), getKeyIndexOrig_bezt(), getKeyIndexOrig_bp(), getKeyIndexOrig_keyIndex(), if(), Curve::key, KEY_RELATIVE, KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, LISTBASE_FOREACH, MEM_callocN, MEM_freeN, Nurb::next, NULL, EditNurb::nurbs, Nurb::pntsu, Nurb::pntsv, BezTriple::radius, BPoint::radius, Key::refkey, EditNurb::shapenr, sub_v3_v3v3(), BezTriple::tilt, BPoint::tilt, Key::type, BezTriple::vec, and BPoint::vec.
Referenced by ED_curve_editnurb_load().
|
static |
Definition at line 6983 of file editcurve.c.
References Freestyle::a, Nurb::bezt, BEZT_ISSEL_ANY_HIDDENHANDLES, BKE_view_layer_array_from_objects_in_edit_mode_unique_data, Nurb::bp, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), ED_curve_select_check(), Curve::editnurb, BPoint::f1, LISTBASE_FOREACH, MEM_freeN, NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, SELECT, BezTriple::tilt, BPoint::tilt, SnapObjectContext::v3d, and WM_event_add_notifier().
Referenced by CURVE_OT_tilt_clear().
|
static |
Definition at line 6704 of file editcurve.c.
References BKE_curve_decimate_nurb(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_main(), CTX_data_view_layer(), CTX_wm_view3d(), CU_ACT_NONE, CU_BEZIER, Object::data, DEG_id_tag_update(), ED_curve_updateAnimPaths(), LISTBASE_FOREACH, max_ii(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, nurb_bezt_flag_any(), object_editcurve_get(), Nurb::pntsu, wmOperator::ptr, Curve::resolu, RNA_float_get(), SELECT, Nurb::type, and WM_event_add_notifier().
Referenced by CURVE_OT_decimate().
|
static |
Definition at line 6436 of file editcurve.c.
References Curve::actnu, Curve::actvert, BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_assert, C, CTX_data_main(), CTX_data_view_layer(), CTX_wm_view3d(), CU_ACT_NONE, curve_delete_segments(), curve_delete_vertices(), CURVE_SEGMENT, CURVE_VERTEX, Object::data, DEG_id_tag_update(), ED_curve_select_check(), ED_curve_updateAnimPaths(), Curve::editnurb, if(), MEM_freeN, NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), type, SnapObjectContext::v3d, and WM_event_add_notifier().
Referenced by CURVE_OT_delete().
Definition at line 6007 of file editcurve.c.
References Freestyle::a, usdtokens::b(), Nurb::bezt, BEZT_ISSEL_ANY_HIDDENHANDLES, BKE_nurb_copy(), BKE_nurb_handles_calc(), BKE_nurb_knot_calc_u(), BKE_nurb_knot_calc_v(), BKE_nurb_order_clamp_u(), BKE_nurb_order_clamp_v(), BKE_nurbList_free(), BLI_addtail(), BLI_movelisttolist(), Nurb::bp, CU_BEZIER, CU_NURB_CYCLIC, Object::data, DESELECT, ED_curve_beztcpy(), ED_curve_bpcpy(), Curve::editnurb, BPoint::f1, Nurb::flagu, Nurb::flagv, HIDDEN, isNurbselU(), isNurbselV(), keyIndex_delNurbList(), LISTBASE_FOREACH, NULL, EditNurb::nurbs, Nurb::pntsu, Nurb::pntsv, SELECT, select_beztriple(), select_bpoint(), blender::io::alembic::split(), Nurb::type, v, and SnapObjectContext::v3d.
Referenced by curve_delete_exec(), curve_split_exec(), and separate_exec().
Definition at line 5995 of file editcurve.c.
References ed_curve_delete_selected(), ed_surf_delete_selected(), OB_SURF, Object::type, and SnapObjectContext::v3d.
Referenced by curve_delete_exec().
|
static |
Definition at line 6614 of file editcurve.c.
References Curve::actnu, Curve::actvert, Nurb::bezt, BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_array_iter_span, C, CTX_data_main(), CTX_data_view_layer(), CTX_wm_view3d(), CU_ACT_NONE, CU_BEZIER, CU_NURB_CYCLIC, Object::data, DEG_id_tag_update(), ed_curve_delete_selected(), ED_curve_select_check(), ED_curve_updateAnimPaths(), ed_dissolve_bez_segment(), Curve::editnurb, Nurb::flagu, if(), LISTBASE_FOREACH, MEM_freeN, mod_i(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsu, test_bezt_is_sel_any(), Nurb::type, SnapObjectContext::v3d, and WM_event_add_notifier().
Referenced by CURVE_OT_dissolve_verts().
|
static |
Definition at line 5689 of file editcurve.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_main(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), ED_curve_nurb_select_count(), ED_curve_select_check(), ED_curve_updateAnimPaths(), ed_editcurve_extrude(), ed_editnurb_extrude_flag(), Curve::editnurb, LISTBASE_FOREACH, MEM_freeN, NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, EditNurb::nurbs, OB_CURVES_LEGACY, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, SELECT, Object::type, SnapObjectContext::v3d, and WM_event_add_notifier().
Referenced by CURVE_OT_extrude().
Definition at line 880 of file editcurve.c.
References AnimData::action, BKE_animdata_from_id(), AnimData::drivers, ListBase::first, and Curve::id.
Referenced by ED_curve_updateAnimPaths().
|
static |
Definition at line 3983 of file editcurve.c.
References BKE_nurbList_handles_recalculate(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), ED_curve_select_check(), Curve::editnurb, MEM_freeN, NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), SELECT, and WM_event_add_notifier().
Referenced by CURVE_OT_normals_make_consistent().
void CURVE_OT_cyclic_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 5895 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, toggle_cyclic_exec(), and toggle_cyclic_invoke().
Referenced by ED_operatortypes_curve().
void CURVE_OT_decimate | ( | wmOperatorType * | ot | ) |
Definition at line 6764 of file editcurve.c.
References curve_decimate_exec(), wmOperatorType::description, ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_float_factor(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void CURVE_OT_delete | ( | wmOperatorType * | ot | ) |
Definition at line 6512 of file editcurve.c.
References curve_delete_exec(), curve_delete_type_items, wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, PROP_HIDDEN, PROP_SKIP_SAVE, rna_curve_delete_type_itemf(), RNA_def_enum(), RNA_def_enum_funcs(), RNA_def_property_flag(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_curve().
void CURVE_OT_dissolve_verts | ( | wmOperatorType * | ot | ) |
Definition at line 6669 of file editcurve.c.
References curve_dissolve_exec(), wmOperatorType::description, ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_duplicate | ( | wmOperatorType * | ot | ) |
Definition at line 5974 of file editcurve.c.
References wmOperatorType::description, duplicate_exec(), ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_extrude | ( | wmOperatorType * | ot | ) |
Definition at line 5739 of file editcurve.c.
References curve_extrude_exec(), wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_enum(), rna_enum_transform_mode_types, wmOperatorType::srna, and TFM_TRANSLATION.
Referenced by ED_operatortypes_curve().
void CURVE_OT_handle_type_set | ( | wmOperatorType * | ot | ) |
Definition at line 3948 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, ot, 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 3267 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, hide_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void CURVE_OT_make_segment | ( | wmOperatorType * | ot | ) |
Definition at line 4708 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, make_segment_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_match_texture_space | ( | wmOperatorType * | ot | ) |
Definition at line 7121 of file editcurve.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, match_texture_space_exec(), match_texture_space_poll(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_normals_make_consistent | ( | wmOperatorType * | ot | ) |
Definition at line 4011 of file editcurve.c.
References curve_normals_make_consistent_exec(), wmOperatorType::description, ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void CURVE_OT_radius_set | ( | wmOperatorType * | ot | ) |
Definition at line 2694 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OBJECT_ADD_SIZE_MAXF, OPTYPE_REGISTER, OPTYPE_UNDO, ot, 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 3347 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, reveal_exec(), RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
void CURVE_OT_separate | ( | wmOperatorType * | ot | ) |
Definition at line 1447 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, separate_exec(), and WM_operator_confirm().
Referenced by ED_operatortypes_curve().
void CURVE_OT_shade_flat | ( | wmOperatorType * | ot | ) |
Definition at line 6842 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and shade_smooth_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_shade_smooth | ( | wmOperatorType * | ot | ) |
Definition at line 6827 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and shade_smooth_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_smooth | ( | wmOperatorType * | ot | ) |
Definition at line 2853 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and smooth_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_smooth_radius | ( | wmOperatorType * | ot | ) |
Definition at line 3125 of file editcurve.c.
References curve_smooth_radius_exec(), wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_smooth_tilt | ( | wmOperatorType * | ot | ) |
Definition at line 3168 of file editcurve.c.
References curve_smooth_tilt_exec(), wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_smooth_weight | ( | wmOperatorType * | ot | ) |
Definition at line 3082 of file editcurve.c.
References curve_smooth_weight_exec(), wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_spin | ( | wmOperatorType * | ot | ) |
Definition at line 5100 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurf(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OBJECT_ADD_SIZE_MAXF, OPTYPE_REGISTER, OPTYPE_UNDO, ot, 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 3884 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, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), 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 2628 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, 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_split | ( | wmOperatorType * | ot | ) |
Definition at line 1523 of file editcurve.c.
References curve_split_exec(), wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_subdivide | ( | wmOperatorType * | ot | ) |
Definition at line 3800 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_int(), RNA_def_property_flag(), wmOperatorType::srna, and subdivide_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_switch_direction | ( | wmOperatorType * | ot | ) |
Definition at line 2566 of file editcurve.c.
References wmOperatorType::description, ED_operator_editsurfcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and switch_direction_exec().
Referenced by ED_operatortypes_curve().
void CURVE_OT_tilt_clear | ( | wmOperatorType * | ot | ) |
Definition at line 7034 of file editcurve.c.
References clear_tilt_exec(), wmOperatorType::description, ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_curve().
void CURVE_OT_vertex_add | ( | wmOperatorType * | ot | ) |
Definition at line 5655 of file editcurve.c.
References add_vertex_exec(), add_vertex_invoke(), wmOperatorType::description, ED_operator_editcurve(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OBJECT_ADD_SIZE_MAXF, OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_float_vector_xyz(), and wmOperatorType::srna.
Referenced by ED_operatortypes_curve().
Definition at line 938 of file editcurve.c.
References Freestyle::a, AnimData::action, Nurb::bezt, BKE_action_groups_reconstruct(), BKE_animdata_from_id(), BLI_addtail(), BLI_snprintf(), Nurb::bp, curves, Curve::editnurb, fcurve_path_rename(), fcurve_remove(), getCVKeyIndex(), Curve::id, LISTBASE_FOREACH_INDEX, LISTBASE_FOREACH_MUTABLE, CVKeyIndex::nu_index, NULL, EditNurb::nurbs, Nurb::pntsu, Nurb::pntsv, CVKeyIndex::pt_index, STRPREFIX, and CVKeyIndex::switched.
Referenced by ED_curve_updateAnimPaths().
|
static |
Definition at line 3103 of file editcurve.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), curve_smooth_value(), Object::data, DEG_id_tag_update(), MEM_freeN, NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by CURVE_OT_smooth_radius().
|
static |
Definition at line 3146 of file editcurve.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), curve_smooth_value(), Object::data, DEG_id_tag_update(), MEM_freeN, NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by CURVE_OT_smooth_tilt().
|
static |
Definition at line 2878 of file editcurve.c.
References Freestyle::a, Nurb::bezt, BEZT_VALUE, Nurb::bp, BP_VALUE, BPoint::f1, BezTriple::f2, float(), LISTBASE_FOREACH, Nurb::pntsu, and SELECT.
Referenced by curve_smooth_radius_exec(), curve_smooth_tilt_exec(), and curve_smooth_weight_exec().
|
static |
Definition at line 3060 of file editcurve.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), curve_smooth_value(), Object::data, DEG_id_tag_update(), MEM_freeN, NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by CURVE_OT_smooth_weight().
|
static |
Definition at line 1469 of file editcurve.c.
References Curve::actnu, adduplicateflagNurb(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_listbase_count(), BLI_listbase_is_empty(), BLI_movelisttolist(), C, CTX_data_main(), CTX_data_view_layer(), CTX_wm_view3d(), curve_delete_segments(), Object::data, DEG_id_tag_update(), ED_curve_select_check(), ED_curve_updateAnimPaths(), Curve::editnurb, MEM_freeN, NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, NULL, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, SELECT, and WM_event_add_notifier().
Referenced by CURVE_OT_split().
Definition at line 5763 of file editcurve.c.
References Freestyle::a, Nurb::bezt, BEZT_ISSEL_ANY_HIDDENHANDLES, BKE_nurb_handles_calc(), BKE_nurb_knot_calc_u(), BKE_nurb_knot_calc_v(), Nurb::bp, CU_BEZIER, CU_NURB_CYCLIC, CU_NURBS, CU_POLY, BPoint::f1, Nurb::flagu, Nurb::flagv, Nurb::knotsu, LISTBASE_FOREACH, Nurb::pntsu, Nurb::pntsv, SELECT, Nurb::type, and SnapObjectContext::v3d.
Referenced by make_cyclic_if_endpoints(), and toggle_cyclic_exec().
|
static |
Definition at line 5931 of file editcurve.c.
References adduplicateflagNurb(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_listbase_is_empty(), BLI_movelisttolist(), C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), ED_curve_select_check(), Curve::editnurb, Curve::id, ID_RECALC_SELECT, MEM_freeN, NC_GEOM, ND_SELECT, NULL, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, SELECT, SnapObjectContext::v3d, and WM_event_add_notifier().
Referenced by CURVE_OT_duplicate().
Definition at line 7049 of file editcurve.c.
References count, keyIndex_updateBezt(), and src.
Referenced by curve_delete_segments(), ed_editcurve_extrude(), extrude_vertices_from_selected_endpoints(), insert_bezt_to_nurb(), and make_segment_exec().
Definition at line 7055 of file editcurve.c.
References count, keyIndex_updateBP(), and src.
Referenced by curve_delete_segments(), ed_editcurve_extrude(), ed_editnurb_extrude_flag(), extrude_vertices_from_selected_endpoints(), insert_bp_to_nurb(), and make_segment_exec().
Definition at line 1842 of file editcurve.c.
References Freestyle::a, Curve::actnu, Nurb::bezt, BEZT_ISSEL_ANY_HIDDENHANDLES, BKE_nurb_free(), BKE_nurb_handles_calc(), BKE_nurb_knot_calc_u(), BKE_nurb_order_clamp_u(), BLI_remlink(), Nurb::bp, CU_ACT_NONE, CU_BEZIER, CU_NURBS, Object::data, Curve::editnurb, BPoint::f1, keyIndex_delBezt(), keyIndex_delBP(), keyIndex_delNurb(), keyIndex_updateBezt(), keyIndex_updateBP(), LISTBASE_FOREACH_MUTABLE, MEM_freeN, MEM_mallocN, NULL, EditNurb::nurbs, Nurb::pntsu, Nurb::pntsv, SELECT, type, and Nurb::type.
Referenced by curve_delete_vertices(), and curve_dissolve_exec().
Definition at line 1316 of file editcurve.c.
References BKE_curve_editNurb_free(), and Object::data.
Referenced by ED_object_editmode_load_free_ex(), and separate_exec().
Load editNurb in object.
Definition at line 1234 of file editcurve.c.
References BKE_nurb_duplicate(), BKE_nurb_order_clamp_u(), BKE_nurbList_free(), BLI_addtail(), calc_shapeKeys(), CU_NURBS, Object::data, ED_curve_updateAnimPaths(), ELEM, LISTBASE_FOREACH, NULL, Curve::nurb, OB_CURVES_LEGACY, OB_SURF, object_editcurve_get(), remap_hooks_and_vertex_parents(), Nurb::type, and Object::type.
Referenced by ED_object_editmode_load_free_ex(), object_hook_index_array(), and separate_exec().
Make copy in cu->editnurb
.
Definition at line 1271 of file editcurve.c.
References BKE_curve_editNurb_keyIndex_free(), BKE_keyblock_convert_to_curve(), BKE_keyblock_from_object(), BKE_nurb_duplicate(), BKE_nurbList_free(), BLI_addtail(), Object::data, Curve::editnurb, ELEM, if(), init_editNurb_keyIndex(), LISTBASE_FOREACH, MEM_callocN, Curve::nurb, OB_CURVES_LEGACY, OB_SURF, Object::shapenr, and Object::type.
Referenced by ED_object_editmode_enter_ex(), object_hook_index_array(), and separate_exec().
bool ED_curve_editnurb_select_pick | ( | struct bContext * | C, |
const int | mval[2], | ||
int | dist_px, | ||
bool | vert_without_handles, | ||
const struct SelectPick_Params * | params | ||
) |
dist_px | Maximum distance to pick (in pixels). |
vert_without_handles | When true, selecting the knot doesn't select the handles. |
Definition at line 4729 of file editcurve.c.
References Object::actcol, Curve::actvert, ViewLayer::basact, BKE_curve_nurb_active_get(), BKE_curve_nurb_active_set(), BKE_curve_nurb_vert_active_set(), BKE_curve_vert_active_get(), BKE_nurbList_flag_set(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_assert_unreachable, C, copy_v2_v2_int(), CTX_data_ensure_evaluated_depsgraph(), CU_ACT_NONE, CURVE_HANDLE_NONE, Object::data, DEG_id_tag_update(), depsgraph, DESELECT, ED_curve_deselect_all(), ED_curve_pick_vert_ex(), ED_object_base_activate(), ED_view3d_viewcontext_init(), BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, View3DOverlay::handle_display, HIDDEN, ID_RECALC_COPY_ON_WRITE, ID_RECALC_SELECT, Nurb::mat_nr, MEM_freeN, ViewContext::mval, NC_GEOM, NC_MATERIAL, ND_SELECT, ND_SHADING_LINKS, NULL, Base::object, object_editcurve_get(), View3D::overlay, params, SEL_OP_ADD, SEL_OP_AND, SEL_OP_SET, SEL_OP_SUB, SEL_OP_XOR, SELECT, select_beztriple(), select_bpoint(), ViewContext::v3d, view3d_operator_needs_opengl(), ViewContext::view_layer, and WM_event_add_notifier().
Referenced by curve_pen_modal(), and view3d_select_exec().
int ED_curve_join_objects_exec | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) |
This is used externally, by OBJECT_OT_join. TODO: shape keys - as with meshes.
Definition at line 6863 of file editcurve.c.
References Freestyle::a, Curve::bevel_radius, Nurb::bezt, BKE_curve_dimension_update(), BKE_nurb_duplicate(), BKE_nurb_handles_calc(), BKE_report(), BLI_addtail(), BLI_listbase_clear(), BLI_movelisttolist(), Nurb::bp, C, CLAMP, CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_main(), CTX_data_scene(), CU_IS_2D, Object::data, DEG_id_tag_update(), DEG_relations_tag_update(), ED_object_base_free_and_unlink(), ListBase::first, Object::id, Scene::id, ID_RECALC_GEOMETRY, ID_RECALC_SELECT, ID_RECALC_TRANSFORM, invert_m4_m4_safe_ortho(), LISTBASE_FOREACH, mat4_to_scale(), Nurb::mat_nr, mul_m4_m4m4(), mul_m4_v3(), NC_SCENE, ND_LAYER_CONTENT, ND_OB_ACTIVE, Curve::nurb, OB_CURVES_LEGACY, Object::obmat, OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, BezTriple::radius, wmOperator::reports, RPT_WARNING, scene, Object::totcol, Object::type, BezTriple::vec, BPoint::vec, and WM_event_add_notifier().
Referenced by object_join_exec().
Definition at line 521 of file editcurve.c.
References BLI_ghash_insert(), BLI_ghash_len(), BLI_ghash_ptr_new_ex(), BLI_ghashIterator_getKey(), BLI_ghashIterator_getValue(), GHASH_ITER, MEM_dupallocN, MEM_mallocN, and CVKeyIndex::orig_cv.
Referenced by undocurve_from_editcurve(), and undocurve_to_editcurve().
Definition at line 332 of file editcurve.c.
References Nurb::bezt, Nurb::bp, keyIndex_updateBezt(), keyIndex_updateBP(), Nurb::pntsu, and Nurb::pntsv.
Referenced by undocurve_from_editcurve(), and undocurve_to_editcurve().
Return 0 if animation data wasn't changed, 1 otherwise.
Definition at line 1062 of file editcurve.c.
References AnimData::action, BKE_animdata_from_id(), curve_is_animated(), curve_rename_fcurves(), bAction::curves, DEG_id_tag_update(), DEG_relations_tag_update(), AnimData::drivers, Curve::editnurb, bAction::id, Curve::id, ID_RECALC_COPY_ON_WRITE, EditNurb::keyindex, and NULL.
Referenced by add_vertex_exec(), curve_decimate_exec(), curve_delete_exec(), curve_dissolve_exec(), curve_extrude_exec(), curve_split_exec(), ED_curve_editnurb_load(), make_segment_exec(), set_spline_type_exec(), spin_exec(), subdivide_exec(), switch_direction_exec(), and undocurve_to_editcurve().
void ed_dissolve_bez_segment | ( | BezTriple * | bezt_prev, |
BezTriple * | bezt_next, | ||
const Nurb * | nu, | ||
const Curve * | cu, | ||
const uint | span_len, | ||
const uint | span_step[2] | ||
) |
Definition at line 6550 of file editcurve.c.
References Nurb::bezt, BKE_curve_forward_diff_bezier(), BLI_assert, ELEM, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_FREE, HD_VECT, MEM_freeN, MEM_mallocN, mod_i(), normalize_v3(), NULL, Nurb::pntsu, Curve::resolu, sub_v3_v3v3(), and BezTriple::vec.
Referenced by curve_dissolve_exec(), and delete_point_under_mouse().
int ed_editcurve_addvert | ( | Curve * | cu, |
EditNurb * | editnurb, | ||
View3D * | v3d, | ||
const float | location_init[3] | ||
) |
Definition at line 5384 of file editcurve.c.
References add_v3_v3(), add_v3_v3v3(), Nurb::bezt, BEZT_ISSEL_ANY_HIDDENHANDLES, BEZT_SEL_ALL, BKE_curve_nurb_active_get(), BKE_nurb_bezierPoints_add(), BKE_nurb_copy(), BKE_nurb_handle_calc_simple_auto(), BKE_nurb_handles_calc(), BKE_nurb_knot_calc_u(), BLI_addtail(), Nurb::bp, center, copy_v3_v3(), CU_BEZIER, CU_IS_2D, CU_NURB_CYCLIC, CU_SMOOTH, ed_editcurve_extrude(), ELEM, BPoint::f1, Nurb::flag, Nurb::flagu, BezTriple::h1, BezTriple::h2, HD_AUTO, LISTBASE_FOREACH, MEM_callocN, mul_v3_fl(), EditNurb::nurbs, Nurb::orderu, Nurb::pntsu, Nurb::resolu, Curve::resolu, SELECT, sub_v3_v3v3(), Nurb::type, BezTriple::vec, BPoint::vec, and zero_v3().
Referenced by add_vertex_exec(), and extrude_points_from_selected_vertices().
Definition at line 5135 of file editcurve.c.
References Curve::actvert, Nurb::bezt, BEZT_DESEL_ALL, BEZT_ISSEL_ANY_HIDDENHANDLES, BKE_curve_nurb_vert_active_get(), BKE_nurb_knot_calc_u(), BLI_assert, BLI_listbase_is_empty(), Nurb::bp, count, CU_BEZIER, CU_NURB_CYCLIC, ED_curve_beztcpy(), ED_curve_bpcpy(), BPoint::f1, BezTriple::f2, Nurb::flagu, is_cyclic(), LISTBASE_FOREACH, MEM_freeN, MEM_mallocN, NULL, EditNurb::nurbs, offset, Nurb::pntsu, SELECT, and Nurb::type.
Referenced by curve_extrude_exec(), and ed_editcurve_addvert().
Only for OB_SURF.
Definition at line 1979 of file editcurve.c.
References Freestyle::a, BKE_nurb_knot_calc_u(), BKE_nurb_knot_calc_v(), Nurb::bp, DESELECT, ED_curve_bpcpy(), ELEM, BPoint::f1, HIDDEN, isNurbselUV(), len, LISTBASE_FOREACH, MEM_freeN, MEM_mallocN, EditNurb::nurbs, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, SELECT, select_bpoint(), and v.
Referenced by curve_extrude_exec(), and ed_editnurb_spin().
bool ed_editnurb_spin | ( | float | viewmat[4][4], |
struct View3D * | v3d, | ||
struct Object * | obedit, | ||
const float | axis[3], | ||
const float | cent[3] | ||
) |
axis | is in world-space. |
cent | is in object-space. |
Definition at line 4947 of file editcurve.c.
References Freestyle::a, axis_angle_to_mat3(), BKE_nurb_knot_calc_v(), copy_m3_m4(), CU_NURB_BEZIER, CU_NURB_CYCLIC, CU_NURB_ENDPOINT, Object::data, ED_curve_nurb_select_check(), ed_editnurb_extrude_flag(), Curve::editnurb, Nurb::flagv, float(), invert_m3_m3(), LISTBASE_FOREACH, M_PI_4, M_SQRT2, mul_m3_m3m3(), object_editcurve_get(), Object::obmat, Nurb::orderv, rotateflagNurb(), SELECT, unit_m3(), and weightflagNurb().
Referenced by spin_exec().
void ed_editnurb_translate_flag | ( | ListBase * | editnurb, |
uint8_t | flag, | ||
const float | vec[3], | ||
bool | is_2d | ||
) |
Definition at line 1686 of file editcurve.c.
References Freestyle::a, add_v3_v3(), Nurb::bezt, BKE_nurb_project_2d(), Nurb::bp, CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, LISTBASE_FOREACH, Nurb::pntsu, Nurb::pntsv, Nurb::type, BezTriple::vec, and BPoint::vec.
Definition at line 1747 of file editcurve.c.
References Freestyle::a, usdtokens::b(), BKE_nurb_free(), BKE_nurb_knot_calc_u(), BKE_nurb_knot_calc_v(), BKE_nurb_order_clamp_u(), BKE_nurb_order_clamp_v(), BLI_assert, BLI_remlink(), Nurb::bp, Object::data, Curve::editnurb, BPoint::f1, isNurbselU(), isNurbselV(), keyIndex_delBP(), keyIndex_delNurb(), keyIndex_updateBP(), Nurb::knotsv, LISTBASE_FOREACH_MUTABLE, MEM_freeN, MEM_mallocN, MEM_SAFE_FREE, NULL, OB_SURF, object_editcurve_get(), Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, SELECT, SWAP, and Object::type.
Referenced by curve_delete_vertices().
|
static |
Definition at line 887 of file editcurve.c.
References AnimData::action, action_groups_remove_channel(), BKE_fcurve_copy(), BKE_fcurve_free(), BLI_addtail(), BLI_remlink(), BLI_sprintfN(), bAction::curves, curves, AnimData::drivers, FCurve::grp, len, LISTBASE_FOREACH_MUTABLE, MEM_freeN, FCurve::rna_path, and STREQLEN.
Referenced by curve_rename_fcurves().
Definition at line 926 of file editcurve.c.
References AnimData::action, action_groups_remove_channel(), BKE_fcurve_free(), BLI_remlink(), and AnimData::drivers.
Referenced by curve_rename_fcurves().
|
static |
Definition at line 204 of file editcurve.c.
References BLI_ghash_lookup(), and EditNurb::keyindex.
Referenced by curve_rename_fcurves(), getKeyIndexOrig_bezt(), getKeyIndexOrig_bp(), getKeyIndexOrig_keyIndex(), init_index_map(), and keyIndex_switchDirection().
Definition at line 214 of file editcurve.c.
References getCVKeyIndex(), NULL, and CVKeyIndex::orig_cv.
Referenced by calc_shapeKeys(), and switch_keys_direction().
Definition at line 225 of file editcurve.c.
References getCVKeyIndex(), NULL, and CVKeyIndex::orig_cv.
Referenced by calc_shapeKeys(), and switch_keys_direction().
Definition at line 236 of file editcurve.c.
References getCVKeyIndex(), and CVKeyIndex::key_index.
Referenced by calc_shapeKeys().
|
static |
Definition at line 3189 of file editcurve.c.
References Freestyle::a, Nurb::bezt, BEZT_ISSEL_ANY_HIDDENHANDLES, BKE_curve_nurb_vert_active_validate(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, Nurb::bp, C, CTX_data_view_layer(), CTX_wm_view3d(), CU_BEZIER, Object::data, DEG_id_tag_update(), DESELECT, ED_curve_select_check(), Curve::editnurb, BPoint::f1, HIDDEN, BezTriple::hide, BPoint::hide, Nurb::hide, ID_RECALC_GEOMETRY, invert(), LISTBASE_FOREACH, MEM_freeN, NC_GEOM, ND_SELECT, 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 |
Definition at line 121 of file editcurve.c.
References CVKeyIndex::key_index, MEM_callocN, CVKeyIndex::nu_index, CVKeyIndex::orig_cv, CVKeyIndex::pt_index, CVKeyIndex::switched, and CVKeyIndex::vertex_index.
Referenced by init_editNurb_keyIndex().
Definition at line 136 of file editcurve.c.
References Freestyle::a, Nurb::bezt, BLI_ghash_insert(), BLI_ghash_ptr_new(), Nurb::bp, ListBase::first, init_cvKeyIndex(), KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, EditNurb::keyindex, MEM_mallocN, Nurb::next, EditNurb::nurbs, Nurb::pntsu, and Nurb::pntsv.
Referenced by ED_curve_editnurb_make().
|
static |
Definition at line 1095 of file editcurve.c.
References Freestyle::a, Nurb::bezt, Nurb::bp, curve, Object::data, Curve::editnurb, getCVKeyIndex(), LISTBASE_FOREACH, MEM_mallocN, Curve::nurb, Nurb::pntsu, and Nurb::pntsv.
Referenced by remap_hooks_and_vertex_parents().
Definition at line 4107 of file editcurve.c.
References Nurb::bp, BPoint::f1, Nurb::pntsu, Nurb::pntsv, SELECT, and v.
Referenced by merge_2_nurb().
Definition at line 1606 of file editcurve.c.
References Freestyle::a, usdtokens::b(), Nurb::bp, BPoint::f1, Nurb::pntsu, and v.
Referenced by adduplicateflagNurb(), curve_delete_segments(), and ed_surf_delete_selected().
Definition at line 1544 of file editcurve.c.
References Freestyle::a, usdtokens::b(), Nurb::bp, BPoint::f1, Nurb::pntsu, and Nurb::pntsv.
Referenced by ed_editnurb_extrude_flag().
Definition at line 1633 of file editcurve.c.
References Freestyle::a, usdtokens::b(), Nurb::bp, Nurb::pntsu, and Nurb::pntsv.
Referenced by adduplicateflagNurb(), curve_delete_segments(), and ed_surf_delete_selected().
Definition at line 542 of file editcurve.c.
References BezTriple::radius, BezTriple::tilt, and BezTriple::vec.
Referenced by calc_keyHandles().
Definition at line 506 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 247 of file editcurve.c.
References BKE_curve_editNurb_keyIndex_delCV(), and EditNurb::keyindex.
Referenced by ed_curve_delete_selected().
Definition at line 256 of file editcurve.c.
References BKE_curve_editNurb_keyIndex_delCV(), and EditNurb::keyindex.
Referenced by ed_curve_delete_selected(), and ed_surf_delete_selected().
Definition at line 265 of file editcurve.c.
References Freestyle::a, Nurb::bezt, BKE_curve_editNurb_keyIndex_delCV(), Nurb::bp, EditNurb::keyindex, Nurb::pntsu, and Nurb::pntsv.
Referenced by ed_curve_delete_selected(), ed_surf_delete_selected(), keyIndex_delNurbList(), and make_segment_exec().
Definition at line 293 of file editcurve.c.
References keyIndex_delNurb(), and LISTBASE_FOREACH.
Referenced by curve_delete_segments().
Definition at line 342 of file editcurve.c.
References Freestyle::a, usdtokens::b(), BLI_ghash_insert(), EditNurb::keyindex, and popCVKeyIndex().
Referenced by keyIndex_switchDirection().
Definition at line 355 of file editcurve.c.
References Freestyle::a, usdtokens::b(), Nurb::bezt, Nurb::bp, getCVKeyIndex(), keyIndex_swap(), Nurb::pntsu, Nurb::pntsv, and CVKeyIndex::switched.
Referenced by keyData_switchDirectionNurb().
|
static |
Definition at line 322 of file editcurve.c.
References count, and keyIndex_updateCV().
Referenced by ED_curve_beztcpy(), ed_curve_delete_selected(), ED_curve_keyindex_update_nurb(), and subdividenurb().
|
static |
Definition at line 327 of file editcurve.c.
References count, and keyIndex_updateCV().
Referenced by ED_curve_bpcpy(), ed_curve_delete_selected(), ED_curve_keyindex_update_nurb(), ed_surf_delete_selected(), merge_2_nurb(), and subdividenurb().
|
static |
Definition at line 300 of file editcurve.c.
References BLI_ghash_insert(), count, EditNurb::keyindex, NULL, popCVKeyIndex(), and size().
Referenced by keyIndex_updateBezt(), and keyIndex_updateBP().
|
static |
Definition at line 4422 of file editcurve.c.
References Nurb::bezt, BEZT_ISSEL_ANY_HIDDENHANDLES, BKE_curve_nurb_active_set(), BKE_nurb_direction_switch(), BKE_nurb_free(), BKE_nurb_handles_calc(), BKE_nurb_knot_calc_u(), BKE_report(), BKE_reportf(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, BLI_assert, BLI_remlink(), Nurb::bp, C, CTX_data_main(), CTX_data_view_layer(), CTX_wm_view3d(), CU_BEZIER, CU_NURB_CYCLIC, CU_NURBS, CU_POLY, CURVE_MERGE_ERR_FEW_SELECTION, CURVE_MERGE_ERR_RESOLUTION_ALL, CURVE_MERGE_ERR_RESOLUTION_SOME, CURVE_MERGE_OK, Object::data, DEG_id_tag_update(), ED_curve_beztcpy(), ED_curve_bpcpy(), ED_curve_nurb_select_count(), ED_curve_select_check(), ED_curve_updateAnimPaths(), Curve::editnurb, ELEM, BPoint::f1, ListBase::first, Nurb::flagu, keyData_switchDirectionNurb(), keyIndex_delNurb(), Nurb::knotsu, MEM_freeN, MEM_mallocN, MEM_SAFE_FREE, merge_nurb(), NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, Nurb::next, NULL, OB_SURF, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, wmOperator::reports, RPT_ERROR, RPT_INFO, SELECT, SWAP, Nurb::type, Object::type, and WM_event_add_notifier().
Referenced by CURVE_OT_make_segment().
|
static |
Definition at line 4129 of file editcurve.c.
References Freestyle::a, add_v3_v3(), BLI_addhead(), BLI_addtail(), BLI_remlink(), Nurb::bp, ED_curve_nurb_select_check(), ListBase::first, ListBase::last, len_v3v3(), LISTBASE_FOREACH, MEM_callocN, mul_v3_fl(), NurbSort::next, NurbSort::nu, NULL, Nurb::pntsu, NurbSort::vec, and BPoint::vec.
Referenced by merge_nurb().
|
static |
Definition at line 7074 of file editcurve.c.
References Freestyle::a, BKE_displist_minmax(), BLI_assert, C, copy_v3_v3(), CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CU_AUTOSPACE, curve, Object_Runtime::curve_cache, Object::data, DEG_get_evaluated_object(), DEG_id_tag_update(), depsgraph, CurveCache::disp, Curve::id, ID_RECALC_GEOMETRY, INIT_MINMAX, Curve::loc, max, mid_v3_v3v3(), min, NC_GEOM, ND_DATA, NULL, OPERATOR_FINISHED, Object::runtime, size(), Curve::size, Curve::texflag, void, and WM_event_add_notifier().
Referenced by CURVE_OT_match_texture_space().
Definition at line 7067 of file editcurve.c.
References C, CTX_data_active_object(), ELEM, OB_CURVES_LEGACY, OB_FONT, OB_SURF, and Object::type.
Referenced by CURVE_OT_match_texture_space().
Definition at line 4200 of file editcurve.c.
References BKE_nurb_free(), BKE_nurb_knot_calc_u(), BKE_nurb_knot_calc_v(), BLI_remlink(), Nurb::bp, CU_NURBS, Curve::editnurb, HIDDEN, is_u_selected(), keyIndex_updateBP(), len_v3v3(), MEM_freeN, MEM_mallocN, Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, rotate_direction_nurb(), SELECT, select_bpoint(), Nurb::type, v, and BPoint::vec.
Referenced by merge_nurb().
Definition at line 4359 of file editcurve.c.
References BKE_curve_nurb_active_set(), BLI_freelistN(), CURVE_MERGE_ERR_FEW_SELECTION, CURVE_MERGE_ERR_RESOLUTION_ALL, CURVE_MERGE_ERR_RESOLUTION_SOME, CURVE_MERGE_OK, Object::data, ELEM, ListBase::first, ListBase::last, make_selection_list_nurb(), merge_2_nurb(), NurbSort::next, NurbSort::nu, NULL, object_editcurve_get(), Nurb::pntsu, and Nurb::pntsv.
Referenced by make_segment_exec().
Definition at line 6690 of file editcurve.c.
References Nurb::bezt, BezTriple::f2, and Nurb::pntsu.
Referenced by curve_decimate_exec().
Definition at line 74 of file editcurve.c.
References Object::data, Curve::editnurb, ELEM, NULL, EditNurb::nurbs, OB_CURVES_LEGACY, OB_SURF, and Object::type.
Referenced by adduplicateflagNurb(), clear_tilt_exec(), curve_decimate_exec(), curve_dissolve_exec(), curve_draw_exec(), curve_normals_make_consistent_exec(), curve_select_less(), curve_select_more(), curve_select_random_exec(), curve_smooth_radius_exec(), curve_smooth_tilt_exec(), curve_smooth_weight_exec(), curve_split_exec(), curvesurf_prim_add(), duplicate_exec(), ED_curve_add_nurbs_primitive(), ED_curve_editnurb_load(), ED_curve_editnurb_select_pick(), ed_editnurb_spin(), ed_surf_delete_selected(), hide_exec(), make_cyclic_if_endpoints(), make_segment_exec(), merge_nurb(), return_editcurve_indexar(), reveal_exec(), select_editcurve_hook(), select_next_exec(), select_previous_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(), toggle_cyclic_exec(), toggle_cyclic_invoke(), and vertex_parent_set_exec().
|
static |
Definition at line 209 of file editcurve.c.
References BLI_ghash_popkey(), EditNurb::keyindex, and NULL.
Referenced by keyIndex_swap(), and keyIndex_updateCV().
Definition at line 1160 of file editcurve.c.
References curve, Object::data, Curve::editnurb, ELEM, eModifierType_Hook, if(), HookModifierData::indexar, HookModifierData::indexar_num, init_index_map(), LISTBASE_FOREACH, MEM_freeN, NULL, Main::objects, PARVERT1, and PARVERT3.
Referenced by ED_curve_editnurb_load().
|
static |
Definition at line 3291 of file editcurve.c.
References Freestyle::a, Nurb::bezt, BKE_view_layer_array_from_objects_in_edit_mode_unique_data, Nurb::bp, C, CTX_data_view_layer(), CTX_wm_view3d(), CU_BEZIER, Object::data, DEG_id_tag_update(), HIDDEN, BezTriple::hide, BPoint::hide, Nurb::hide, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, ID_RECALC_SELECT, LISTBASE_FOREACH, MEM_freeN, NC_GEOM, ND_SELECT, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::pntsu, Nurb::pntsv, wmOperator::ptr, RNA_boolean_get(), select(), SELECT, select_beztriple(), select_bpoint(), Nurb::type, and WM_event_add_notifier().
Referenced by CURVE_OT_reveal().
|
static |
Definition at line 6492 of file editcurve.c.
References C, curve_delete_type_items, CURVE_SEGMENT, CURVE_VERTEX, NULL, RNA_enum_item_end(), and RNA_enum_items_add_value().
Referenced by CURVE_OT_delete().
Definition at line 4082 of file editcurve.c.
References Nurb::bp, Nurb::flagu, Nurb::flagv, Nurb::knotsu, KNOTSV, Nurb::knotsv, MEM_dupallocN, MEM_freeN, Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, Nurb::resolu, Nurb::resolv, SWAP, switchdirection_knots(), and v.
Referenced by merge_2_nurb().
|
static |
Definition at line 1660 of file editcurve.c.
References Freestyle::a, add_v3_v3(), Nurb::bp, CU_NURBS, BPoint::f1, LISTBASE_FOREACH, mul_m3_v3(), Nurb::pntsu, Nurb::pntsv, sub_v3_v3(), Nurb::type, and BPoint::vec.
Referenced by ed_editnurb_spin().
void selectend_nurb | ( | Object * | obedit, |
enum eEndPoint_Types | selfirst, | ||
bool | doswap, | ||
bool | selstatus | ||
) |
|
static |
Definition at line 1329 of file editcurve.c.
References adduplicateflagNurb(), BKE_curve_editNurb_keyIndex_free(), BKE_id_copy(), BKE_nurbList_free(), BKE_report(), BKE_reportf(), BKE_view_layer_array_from_bases_in_edit_mode_unique_data, BLI_assert, BLI_listbase_is_empty(), BLI_movelisttolist(), C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_view3d(), curve_delete_segments(), Object::data, DEG_id_tag_update(), DEG_relations_tag_update(), ED_curve_editnurb_free(), ED_curve_editnurb_load(), ED_curve_editnurb_make(), ED_curve_select_check(), ED_object_add_duplicate(), ED_outliner_select_sync_from_object_tag(), Curve::editnurb, Curve::id, Object::id, ID_RECALC_GEOMETRY, id_us_min(), Curve::key, EditNurb::keyindex, MEM_freeN, NC_GEOM, NC_OBJECT, ND_DATA, ND_DRAW, NULL, EditNurb::nurbs, Base::object, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, RPT_INFO, scene, SELECT, USER_DUP_ACT, WM_cursor_wait(), and WM_event_add_notifier().
Referenced by CURVE_OT_separate().
|
static |
Definition at line 2587 of file editcurve.c.
References Freestyle::a, Nurb::bezt, BKE_view_layer_array_from_objects_in_edit_mode_unique_data, Nurb::bp, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), BPoint::f1, BezTriple::f2, LISTBASE_FOREACH, MEM_freeN, NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsv, wmOperator::ptr, RNA_float_get(), SELECT, BezTriple::weight, BPoint::weight, and WM_event_add_notifier().
Referenced by CURVE_OT_spline_weight_set().
|
static |
Definition at line 3921 of file editcurve.c.
References BKE_nurbList_handles_set(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), ED_curve_select_check(), Curve::editnurb, MEM_freeN, NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by CURVE_OT_handle_type_set().
|
static |
Definition at line 2653 of file editcurve.c.
References Freestyle::a, Nurb::bezt, BKE_view_layer_array_from_objects_in_edit_mode_unique_data, Nurb::bp, C, CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), BPoint::f1, BezTriple::f2, LISTBASE_FOREACH, MEM_freeN, NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsv, wmOperator::ptr, BezTriple::radius, BPoint::radius, RNA_float_get(), SELECT, and WM_event_add_notifier().
Referenced by CURVE_OT_radius_set().
|
static |
Definition at line 3828 of file editcurve.c.
References Curve::actvert, BKE_nurb_type_convert(), BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_main(), CTX_data_view_layer(), CTX_wm_view3d(), CU_ACT_NONE, Object::data, DEG_id_tag_update(), ED_curve_nurb_select_check(), ED_curve_updateAnimPaths(), LISTBASE_FOREACH, MEM_freeN, NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, NULL, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, Nurb::pntsu, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RNA_enum_get(), RPT_ERROR, type, and WM_event_add_notifier().
Referenced by CURVE_OT_spline_type_set().
|
static |
Definition at line 6788 of file editcurve.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, clear(), CTX_data_view_layer(), CTX_wm_view3d(), CU_SMOOTH, Object::data, DEG_id_tag_update(), ED_curve_nurb_select_check(), Nurb::flag, wmOperator::idname, LISTBASE_FOREACH, MEM_freeN, NC_GEOM, ND_DATA, OB_CURVES_LEGACY, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, STREQ, Object::type, SnapObjectContext::v3d, and WM_event_add_notifier().
Referenced by CURVE_OT_shade_flat(), and CURVE_OT_shade_smooth().
|
static |
Definition at line 2763 of file editcurve.c.
References Freestyle::a, Nurb::bezt, BKE_nurb_handles_calc(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, Nurb::bp, C, CTX_data_view_layer(), CTX_wm_view3d(), CU_NURB_CYCLIC, Object::data, DEG_id_tag_update(), BPoint::f1, BezTriple::f2, Nurb::flagu, LISTBASE_FOREACH, MEM_dupallocN, MEM_freeN, mod_i(), NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_FINISHED, Nurb::pntsu, SELECT, smooth_single_bezt(), smooth_single_bp(), and WM_event_add_notifier().
Referenced by CURVE_OT_smooth().
|
static |
Definition at line 2720 of file editcurve.c.
References BLI_assert, IN_RANGE_INCL, offset, and BezTriple::vec.
Referenced by smooth_exec().
|
static |
Same as smooth_single_bezt(), keep in sync.
Definition at line 2745 of file editcurve.c.
References BLI_assert, IN_RANGE_INCL, offset, and BPoint::vec.
Referenced by smooth_exec().
|
static |
Definition at line 5026 of file editcurve.c.
References BKE_report(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, copy_m4_m4(), CTX_data_main(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), ED_curve_select_check(), ED_curve_updateAnimPaths(), ed_editnurb_spin(), ED_view3d_context_rv3d(), Curve::editnurb, if(), Object::imat, invert_m4_m4(), MEM_freeN, 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, unit_m4(), RegionView3D::viewmat, and WM_event_add_notifier().
Referenced by CURVE_OT_spin(), and spin_invoke().
|
static |
Definition at line 5084 of file editcurve.c.
References C, copy_v3_v3(), CTX_data_scene(), Scene::cursor, ED_view3d_context_rv3d(), View3DCursor::location, wmOperator::ptr, RNA_float_set_array(), scene, spin_exec(), and RegionView3D::viewinv.
Referenced by CURVE_OT_spin().
|
static |
Definition at line 3767 of file editcurve.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_main(), CTX_data_view_layer(), CTX_wm_view3d(), Object::data, DEG_id_tag_update(), ED_curve_select_check(), ED_curve_updateAnimPaths(), Curve::editnurb, MEM_freeN, 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().
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 operation. Degree is a property shared by all control-points 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 control-points 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 3375 of file editcurve.c.
References Freestyle::a, usdtokens::b(), Nurb::bezt, BEZT_ISSEL_ANY_HIDDENHANDLES, BKE_nurb_bezt_get_next(), BKE_nurb_bpoint_get_next(), BKE_nurb_handles_calc(), BKE_nurb_knot_calc_u(), BKE_nurb_knot_calc_v(), Nurb::bp, copy_v3_v3(), CU_BEZIER, CU_NURB_CYCLIC, CU_NURBS, Object::data, Curve::editnurb, BPoint::f1, Nurb::flagu, float(), interp_v3_v3v3(), interp_v4_v4v4(), interpf(), keyIndex_updateBezt(), keyIndex_updateBP(), LISTBASE_FOREACH, MEM_callocN, MEM_freeN, MEM_mallocN, NULL, EditNurb::nurbs, Nurb::pntsu, Nurb::pntsv, BezTriple::radius, BPoint::radius, SELECT, Nurb::type, BezTriple::vec, BPoint::vec, and BezTriple::weight.
Referenced by subdivide_exec().
|
static |
Definition at line 2525 of file editcurve.c.
References Curve::actnu, Curve::actvert, BKE_nurb_direction_switch(), BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_main(), CTX_data_view_layer(), CTX_wm_view3d(), CU_ACT_NONE, Object::data, DEG_id_tag_update(), ED_curve_nurb_select_check(), ED_curve_select_check(), ED_curve_updateAnimPaths(), Curve::editnurb, keyData_switchDirectionNurb(), LISTBASE_FOREACH_INDEX, MEM_freeN, NC_GEOM, NC_OBJECT, ND_DATA, ND_KEYS, EditNurb::nurbs, OPERATOR_FINISHED, Nurb::pntsu, and WM_event_add_notifier().
Referenced by CURVE_OT_switch_direction().
Definition at line 458 of file editcurve.c.
References Freestyle::a, Nurb::bezt, Key::block, Nurb::bp, Curve::editnurb, getKeyIndexOrig_bezt(), getKeyIndexOrig_bp(), Curve::key, KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, LISTBASE_FOREACH, EditNurb::nurbs, Nurb::pntsu, Nurb::pntsv, and swap_v3_v3().
Referenced by keyData_switchDirectionNurb().
Definition at line 4037 of file editcurve.c.
References Freestyle::a, fabsf, MEM_freeN, MEM_mallocN, NULL, and SWAP.
Referenced by rotate_direction_nurb().
Definition at line 6543 of file editcurve.c.
References BEZT_ISSEL_ANY_HIDDENHANDLES, user_data, and SnapObjectContext::v3d.
Referenced by curve_dissolve_exec().
|
static |
Definition at line 5841 of file editcurve.c.
References BKE_view_layer_array_from_objects_in_edit_mode_unique_data, C, CTX_data_view_layer(), CTX_wm_view3d(), curve_toggle_cyclic(), Object::data, DEG_id_tag_update(), ED_curve_select_check(), Curve::editnurb, MEM_freeN, NC_GEOM, ND_DATA, object_editcurve_get(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), SnapObjectContext::v3d, and WM_event_add_notifier().
Referenced by CURVE_OT_cyclic_toggle(), and toggle_cyclic_invoke().
|
static |
Definition at line 5871 of file editcurve.c.
References C, CTX_data_edit_object(), CU_NURBS, wmOperatorType::idname, IFACE_, LISTBASE_FOREACH, OB_SURF, object_editcurve_get(), OPERATOR_INTERFACE, Nurb::pntsu, Nurb::pntsv, toggle_cyclic_exec(), Nurb::type, Object::type, wmOperator::type, UI_popup_menu_begin(), UI_popup_menu_end(), UI_popup_menu_layout(), and uiItemsEnumO().
Referenced by CURVE_OT_cyclic_toggle().
Definition at line 1727 of file editcurve.c.
References Freestyle::a, Nurb::bp, CU_NURBS, BPoint::f1, LISTBASE_FOREACH, Nurb::pntsu, Nurb::pntsv, Nurb::type, BPoint::vec, and w().
Referenced by ed_editnurb_spin().
|
static |
Definition at line 6486 of file editcurve.c.
Referenced by CURVE_OT_delete(), and rna_curve_delete_type_itemf().