|
Blender V5.0
|
#include <algorithm>#include <cmath>#include <cstdlib>#include <cstring>#include <optional>#include "MEM_guardedalloc.h"#include "BLI_ghash.h"#include "BLI_index_range.hh"#include "BLI_listbase.h"#include "BLI_math_base_safe.h"#include "BLI_math_geom.h"#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_solvers.h"#include "BLI_math_vector.h"#include "BLI_math_vector_types.hh"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "DNA_anim_types.h"#include "DNA_curve_types.h"#include "DNA_defaults.h"#include "DNA_material_types.h"#include "DNA_key_types.h"#include "DNA_object_types.h"#include "DNA_vfont_types.h"#include "BKE_curve.hh"#include "BKE_curveprofile.h"#include "BKE_idtype.hh"#include "BKE_key.hh"#include "BKE_lib_id.hh"#include "BKE_lib_query.hh"#include "BKE_object_types.hh"#include "BKE_vfont.hh"#include "DEG_depsgraph.hh"#include "DEG_depsgraph_query.hh"#include "BLO_read_write.hh"Go to the source code of this file.
Classes | |
| struct | BevelSort |
| class | Array< T, InlineBufferCapacity, Allocator > |
| class | MutableSpan< T > |
| class | Span< T > |
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define | p2_h1 ((p2) - 3) |
| #define | p2_h2 ((p2) + 3) |
| #define | SEL_F1 (1 << 0) |
| #define | SEL_F2 (1 << 1) |
| #define | SEL_F3 (1 << 2) |
| #define | MAT_NR_REMAP(n) |
Typedefs | |
| using | float3 |
| using | float4x4 |
Enumerations | |
| enum class | NURBSValidationStatus { Valid , AtLeastTwoPointsRequired , MorePointsThanOrderRequired , MoreRowsForBezierRequired , MorePointsForBezierRequired } |
Functions | |
| static void | curve_init_data (ID *id) |
| static void | curve_copy_data (Main *bmain, std::optional< Library * > owner_library, ID *id_dst, const ID *id_src, const int flag) |
| static void | curve_free_data (ID *id) |
| static void | curve_foreach_id (ID *id, LibraryForeachIDData *data) |
| static void | curve_blend_write (BlendWriter *writer, ID *id, const void *id_address) |
| static void | curve_blend_read_data (BlendDataReader *reader, ID *id) |
| void | BKE_curve_editfont_free (Curve *cu) |
| static void | curve_editNurb_keyIndex_cv_free_cb (void *val) |
| void | BKE_curve_editNurb_keyIndex_delCV (GHash *keyindex, const void *cv) |
| void | BKE_curve_editNurb_keyIndex_free (GHash **keyindex) |
| void | BKE_curve_editNurb_free (Curve *cu) |
| void | BKE_curve_init (Curve *cu, const short curve_type) |
| Curve * | BKE_curve_add (Main *bmain, const char *name, int type) |
| ListBase * | BKE_curve_editNurbs_get (Curve *cu) |
| const ListBase * | BKE_curve_editNurbs_get_for_read (const Curve *cu) |
| void | BKE_curve_dimension_update (Curve *cu) |
| void | BKE_curve_type_test (Object *ob, const bool dimension_update) |
| void | BKE_curve_texspace_calc (Curve *cu) |
| void | BKE_curve_texspace_ensure (Curve *cu) |
| bool | BKE_nurbList_index_get_co (ListBase *nurb, const int index, float r_co[3]) |
| int | BKE_nurbList_verts_count (const ListBase *nurb) |
| int | BKE_nurbList_verts_count_without_handles (const ListBase *nurb) |
| void | BKE_nurb_free (Nurb *nu) |
| void | BKE_nurbList_free (ListBase *lb) |
| Nurb * | BKE_nurb_duplicate (const Nurb *nu) |
| Nurb * | BKE_nurb_copy (Nurb *src, int pntsu, int pntsv) |
| void | BKE_nurbList_duplicate (ListBase *lb1, const ListBase *lb2) |
| void | BKE_nurb_project_2d (Nurb *nu) |
| static void | calc_nurb_minmax (const Nurb *nu, bool use_radius, float min[3], float max[3]) |
| float | BKE_nurb_calc_length (const Nurb *nu, int resolution) |
| void | BKE_nurb_points_add (Nurb *nu, int number) |
| void | BKE_nurb_bezierPoints_add (Nurb *nu, int number) |
| int | BKE_nurb_index_from_uv (Nurb *nu, int u, int v) |
| void | BKE_nurb_index_to_uv (Nurb *nu, int index, int *r_u, int *r_v) |
| BezTriple * | BKE_nurb_bezt_get_next (Nurb *nu, BezTriple *bezt) |
| BPoint * | BKE_nurb_bpoint_get_next (Nurb *nu, BPoint *bp) |
| BezTriple * | BKE_nurb_bezt_get_prev (Nurb *nu, BezTriple *bezt) |
| BPoint * | BKE_nurb_bpoint_get_prev (Nurb *nu, BPoint *bp) |
| void | BKE_nurb_bezt_calc_normal (Nurb *, BezTriple *bezt, float r_normal[3]) |
| void | BKE_nurb_bezt_calc_plane (Nurb *nu, BezTriple *bezt, float r_plane[3]) |
| void | BKE_nurb_bpoint_calc_normal (Nurb *nu, BPoint *bp, float r_normal[3]) |
| void | BKE_nurb_bpoint_calc_plane (Nurb *nu, BPoint *bp, float r_plane[3]) |
| static void | calcknots (float *knots, const int pnts, const short order, const short flag) |
| static void | makeknots (Nurb *nu, short uv) |
| void | BKE_nurb_knot_alloc_u (Nurb *nu) |
| void | BKE_nurb_knot_calc_u (Nurb *nu) |
| void | BKE_nurb_knot_calc_v (Nurb *nu) |
| static void | basisNurb (float t, short order, int pnts, const float *knots, float *basis, int *start, int *end) |
| void | BKE_nurb_makeFaces (const Nurb *nu, float *coord_array, int rowstride, int resolu, int resolv) |
| void | BKE_nurb_makeCurve (const Nurb *nu, float *coord_array, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride) |
| uint | BKE_curve_calc_coords_axis_len (const uint bezt_array_len, const uint resolu, const bool is_cyclic, const bool use_cyclic_duplicate_endpoint) |
| void | BKE_curve_calc_coords_axis (const BezTriple *bezt_array, const uint bezt_array_len, const uint resolu, const bool is_cyclic, const bool use_cyclic_duplicate_endpoint, const uint axis, const uint stride, float *r_points) |
| void | BKE_curve_forward_diff_bezier (float q0, float q1, float q2, float q3, float *p, int it, int stride) |
| void | BKE_curve_forward_diff_tangent_bezier (float q0, float q1, float q2, float q3, float *p, int it, int stride) |
| static void | forward_diff_bezier_cotangent (const float p0[3], const float p1[3], const float p2[3], const float p3[3], float p[3], int it, int stride) |
| static int | cu_isectLL (const float v1[3], const float v2[3], const float v3[3], const float v4[3], short cox, short coy, float *lambda, float *mu, float vec[3]) |
| static bool | bevelinside (const BevList *bl1, const BevList *bl2) |
| static int | vergxcobev (const void *a1, const void *a2) |
| static void | calc_bevel_sin_cos (float x1, float y1, float x2, float y2, float *r_sina, float *r_cosa) |
| static void | tilt_bezpart (const BezTriple *prevbezt, const BezTriple *bezt, const Nurb *nu, float *tilt_array, float *radius_array, float *weight_array, int resolu, int stride) |
| static void | bevel_list_calc_bisect (BevList *bl) |
| static void | bevel_list_flip_tangents (BevList *bl) |
| static void | bevel_list_apply_tilt (BevList *bl) |
| static void | bevel_list_smooth (BevList *bl, int smooth_iter) |
| static void | make_bevel_list_3D_zup (BevList *bl) |
| static void | minimum_twist_between_two_points (BevPoint *bevp_curr, const BevPoint *bevp_prev) |
| static void | make_bevel_list_3D_minimum_twist (BevList *bl) |
| static void | make_bevel_list_3D_tangent (BevList *bl) |
| static void | make_bevel_list_3D (BevList *bl, int smooth_iter, int twist_mode) |
| static void | make_bevel_list_segment_3D (BevList *bl) |
| static void | make_bevel_list_segment_2D (BevList *bl) |
| static void | make_bevel_list_2D (BevList *bl) |
| static void | bevlist_firstlast_direction_calc_from_bpoint (const Nurb *nu, BevList *bl) |
| void | BKE_curve_bevelList_free (ListBase *bev) |
| void | BKE_curve_bevelList_make (Object *ob, const ListBase *nurbs, const bool for_render) |
| static void | calchandleNurb_intern (BezTriple *bezt, const BezTriple *prev, const BezTriple *next, eBezTriple_Flag handle_sel_flag, bool is_fcurve, bool skip_align, char fcurve_smoothing) |
| static void | calchandlesNurb_intern (Nurb *nu, eBezTriple_Flag handle_sel_flag, bool skip_align) |
| static void * | allocate_arrays (int count, float ***floats, char ***chars, const char *name) |
| static void | free_arrays (void *buffer) |
| static float | bezier_relax_direction (const float *a, const float *b, const float *c, const float *d, const float *h, int i, int count) |
| static void | bezier_lock_unknown (float *a, float *b, float *c, float *d, int i, float value) |
| static void | bezier_restore_equation (float *a, float *b, float *c, float *d, const float *a0, const float *b0, const float *c0, const float *d0, int i) |
| static bool | tridiagonal_solve_with_limits (float *a, float *b, float *c, float *d, float *h, const float *hmin, const float *hmax, int solve_count) |
| static void | bezier_eq_continuous (float *a, float *b, float *c, float *d, const float *dy, const float *l, int i) |
| static void | bezier_eq_noaccel_right (float *a, float *b, float *c, float *d, const float *dy, const float *l, int i) |
| static void | bezier_eq_noaccel_left (float *a, float *b, float *c, float *d, const float *dy, const float *l, int i) |
| static void | bezier_clamp (float *hmax, float *hmin, int i, float dy, bool no_reverse, bool no_overshoot) |
| static void | bezier_output_handle_inner (BezTriple *bezt, bool right, const float newval[3], bool endpoint) |
| static void | bezier_output_handle (BezTriple *bezt, bool right, float dy, bool endpoint) |
| static bool | bezier_check_solve_end_handle (BezTriple *bezt, char htype, bool end) |
| static float | bezier_calc_handle_adj (float hsize[2], float dx) |
| static void | bezier_handle_calc_smooth_fcurve (BezTriple *bezt, int total, int start, int count, bool cycle) |
| static bool | is_free_auto_point (BezTriple *bezt) |
| void | BKE_nurb_handle_smooth_fcurve (BezTriple *bezt, int total, bool cyclic) |
| void | BKE_nurb_handle_calc (BezTriple *bezt, BezTriple *prev, BezTriple *next, const bool is_fcurve, const char smoothing) |
| void | BKE_nurb_handle_calc_ex (BezTriple *bezt, BezTriple *prev, BezTriple *next, const eBezTriple_Flag__Alias handle_sel_flag, const bool is_fcurve, const char smoothing) |
| void | BKE_nurb_handles_calc (Nurb *nu) |
| static void | nurbList_handles_swap_select (Nurb *nu) |
| static void | nurb_handles_calc__align_selected (Nurb *nu) |
| void | BKE_nurb_handle_calc_simple (Nurb *nu, BezTriple *bezt) |
| void | BKE_nurb_handle_calc_simple_auto (Nurb *nu, BezTriple *bezt) |
| short | BKE_nurb_bezt_handle_test_calc_flag (const BezTriple *bezt, const eBezTriple_Flag__Alias sel_flag, const eNurbHandleTest_Mode handle_mode) |
| void | BKE_nurb_bezt_handle_test (BezTriple *bezt, const eBezTriple_Flag__Alias sel_flag, const eNurbHandleTest_Mode handle_mode, const bool use_around_local) |
| void | BKE_nurb_handles_test (Nurb *nu, const eNurbHandleTest_Mode handle_mode, const bool use_around_local) |
| void | BKE_nurb_handles_autocalc (Nurb *nu, uint8_t flag) |
| void | BKE_nurbList_handles_autocalc (ListBase *editnurb, uint8_t flag) |
| void | BKE_nurbList_handles_set (ListBase *editnurb, eNurbHandleTest_Mode handle_mode, const char code) |
| void | BKE_nurbList_handles_recalculate (ListBase *editnurb, const bool calc_length, const uint8_t flag) |
| void | BKE_nurbList_flag_set (ListBase *editnurb, uint8_t flag, bool set) |
| bool | BKE_nurbList_flag_set_from_flag (ListBase *editnurb, uint8_t from_flag, uint8_t flag) |
| void | BKE_nurb_direction_switch (Nurb *nu) |
| void | BKE_curve_nurbs_vert_coords_get (const ListBase *lb, MutableSpan< float3 > vert_coords) |
| Array< float3 > | BKE_curve_nurbs_vert_coords_alloc (const ListBase *lb) |
| void | BKE_curve_nurbs_vert_coords_apply_with_mat4 (ListBase *lb, const Span< float3 > vert_coords, const float4x4 &transform, const bool constrain_2d) |
| void | BKE_curve_nurbs_vert_coords_apply (ListBase *lb, const Span< float3 > vert_coords, const bool constrain_2d) |
| Array< float3 > | BKE_curve_nurbs_key_vert_coords_alloc (const ListBase *lb, const float *key) |
| void | BKE_curve_nurbs_key_vert_tilts_apply (ListBase *lb, const float *key) |
| static NURBSValidationStatus | nurb_check_valid (const int pnts, const short order, const short flag, const short type, const bool is_surf, int *r_points_needed) |
| bool | BKE_nurb_valid_message (const int pnts, const short order, const short flag, const short type, const bool is_surf, const int dir, char *message_dst, const size_t maxncpy) |
| bool | BKE_nurb_check_valid_u (const Nurb *nu) |
| bool | BKE_nurb_check_valid_v (const Nurb *nu) |
| bool | BKE_nurb_check_valid_uv (const Nurb *nu) |
| bool | BKE_nurb_order_clamp_u (Nurb *nu) |
| bool | BKE_nurb_order_clamp_v (Nurb *nu) |
| bool | BKE_nurb_type_convert (Nurb *nu, const short type, const bool use_handles, const char **r_err_msg) |
| ListBase * | BKE_curve_nurbs_get (Curve *cu) |
| const ListBase * | BKE_curve_nurbs_get_for_read (const Curve *cu) |
| void | BKE_curve_nurb_active_set (Curve *cu, const Nurb *nu) |
| Nurb * | BKE_curve_nurb_active_get (Curve *cu) |
| void * | BKE_curve_vert_active_get (Curve *cu) |
| int | BKE_curve_nurb_vert_index_get (const Nurb *nu, const void *vert) |
| void | BKE_curve_nurb_vert_active_set (Curve *cu, const Nurb *nu, const void *vert) |
| bool | BKE_curve_nurb_vert_active_get (Curve *cu, Nurb **r_nu, void **r_vert) |
| void | BKE_curve_nurb_vert_active_validate (Curve *cu) |
| static std::optional< blender::Bounds< blender::float3 > > | calc_nurblist_bounds (const ListBase *nurbs, const bool use_radius) |
| std::optional< blender::Bounds< blender::float3 > > | BKE_curve_minmax (const Curve *cu, bool use_radius) |
| bool | BKE_curve_center_median (Curve *cu, float cent[3]) |
| void | BKE_curve_transform_ex (Curve *cu, const float mat[4][4], const bool do_keys, const bool do_props, const float unit_scale) |
| void | BKE_curve_transform (Curve *cu, const float mat[4][4], const bool do_keys, const bool do_props) |
| void | BKE_curve_translate (Curve *cu, const float offset[3], const bool do_keys) |
| void | BKE_curve_material_index_remove (Curve *cu, int index) |
| bool | BKE_curve_material_index_used (const Curve *cu, int index) |
| void | BKE_curve_material_index_clear (Curve *cu) |
| bool | BKE_curve_material_index_validate (Curve *cu) |
| void | BKE_curve_material_remap (Curve *cu, const uint *remap, uint remap_len) |
| void | BKE_curve_smooth_flag_set (Curve *cu, const bool use_smooth) |
| void | BKE_curve_rect_from_textbox (const Curve *cu, const TextBox *tb, rctf *r_rect) |
| void | BKE_curve_correct_bezpart (const float v1[2], float v2[2], float v3[2], const float v4[2]) |
| void | BKE_curve_eval_geometry (Depsgraph *depsgraph, Curve *curve) |
| void | BKE_curve_batch_cache_dirty_tag (Curve *cu, int mode) |
| void | BKE_curve_batch_cache_free (Curve *cu) |
Variables | |
| IDTypeInfo | IDType_ID_CU_LEGACY |
| void(* | BKE_curve_batch_cache_dirty_tag_cb )(Curve *cu, int mode) = nullptr |
| void(* | BKE_curve_batch_cache_free_cb )(Curve *cu) = nullptr |
| #define MAT_NR_REMAP | ( | n | ) |
Referenced by BKE_curve_material_remap().
| #define p2_h1 ((p2) - 3) |
| #define p2_h2 ((p2) + 3) |
| #define SEL_F1 (1 << 0) |
Definition at line 4011 of file curve.cc.
Referenced by BKE_nurb_bezt_handle_test(), BKE_nurb_bezt_handle_test_calc_flag(), blender::ed::transform::createTransCurveVerts(), blender::ed::transform::getTransformOrientation_ex(), paintcurve_point_get_closest(), paintcurve_point_select(), and paintcurve_point_side_index().
| #define SEL_F2 (1 << 1) |
Definition at line 4012 of file curve.cc.
Referenced by BKE_nurb_bezt_handle_test(), BKE_nurb_bezt_handle_test_calc_flag(), blender::ed::transform::createTransCurveVerts(), blender::ed::transform::getTransformOrientation_ex(), paintcurve_point_get_closest(), and paintcurve_point_select().
| #define SEL_F3 (1 << 2) |
Definition at line 4013 of file curve.cc.
Referenced by BKE_nurb_bezt_handle_test(), BKE_nurb_bezt_handle_test_calc_flag(), blender::ed::transform::createTransCurveVerts(), blender::ed::transform::getTransformOrientation_ex(), paintcurve_point_get_closest(), paintcurve_point_select(), paintcurve_point_side_index(), and paintcurve_slide_invoke().
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| using blender::float4x4 |
Definition at line 1012 of file BLI_math_matrix_types.hh.
|
strong |
|
static |
A utility function for allocating a number of arrays of the same length with easy error checking and de-allocation, and an easy way to add or remove arrays that are processed in this way when changing code.
floats, chars: null-terminated arrays of pointers to array pointers that need to be allocated.
Returns: pointer to the buffer that contains all of the arrays.
Definition at line 3353 of file curve.cc.
References count, i, MEM_malloc_arrayN(), and name.
Referenced by bezier_handle_calc_smooth_fcurve(), and tridiagonal_solve_with_limits().
|
static |
Definition at line 1199 of file curve.cc.
Referenced by BKE_nurb_makeCurve(), and BKE_nurb_makeFaces().
|
static |
Definition at line 2097 of file curve.cc.
References axis_angle_to_quat(), BevList::bevpoints, BevPoint::dir, mul_qt_qtqt(), normalize_qt(), BevList::nr, BevPoint::quat, and BevPoint::tilt.
Referenced by make_bevel_list_3D().
|
static |
Utility for make_bevel_list_3D_* functions.
Definition at line 2014 of file curve.cc.
References BevList::bevpoints, bisect_v3_v3v3v3(), copy_v3_v3(), BevPoint::dir, is_cyclic(), is_zero_v3(), normalize_v3(), BevList::nr, BevList::poly, sub_v3_v3v3(), UNLIKELY, and BevPoint::vec.
Referenced by make_bevel_list_3D_minimum_twist(), make_bevel_list_3D_tangent(), and make_bevel_list_3D_zup().
|
static |
Definition at line 2076 of file curve.cc.
References angle_normalized_v3v3(), BevList::bevpoints, DEG2RADF, negate_v3(), BevList::nr, and BevPoint::tan.
Referenced by make_bevel_list_3D_tangent().
|
static |
Smooth quaternions, this function should be optimized, it can get slow with many iterations.
Definition at line 2120 of file curve.cc.
References angle_normalized_v3v3(), axis_angle_to_quat(), BevList::bevpoints, copy_qt_qt(), cross, cross_v3_v3v3(), BevPoint::dir, interp_qt_qtqt(), mul_qt_qtqt(), mul_qt_v3(), normalize_qt(), BevList::nr, BevList::poly, BevPoint::quat, and smooth_iter().
Referenced by make_bevel_list_3D().
Definition at line 1791 of file curve.cc.
References BevList::bevpoints, copy_v3_v3(), cu_isectLL(), hvec2, max, min, BevList::nr, and BevPoint::vec.
Referenced by BKE_curve_bevelList_make().
Definition at line 2499 of file curve.cc.
References BevList::bevpoints, Nurb::bp, BevPoint::dir, normalize_v3(), BevList::nr, Nurb::pntsu, sub_v3_v3v3(), and BPoint::vec.
Referenced by BKE_curve_bevelList_make().
Definition at line 3695 of file curve.cc.
References mul_v2_fl().
Referenced by bezier_handle_calc_smooth_fcurve().
|
static |
Definition at line 3689 of file curve.cc.
References BezTriple::auto_handle_type, ELEM, HD_AUTO, HD_AUTO_ANIM, HD_AUTOTYPE_NORMAL, and HD_VECT.
Referenced by bezier_handle_calc_smooth_fcurve().
|
static |
Definition at line 3705 of file curve.cc.
References allocate_arrays(), b, bezier_calc_handle_adj(), bezier_check_solve_end_handle(), bezier_clamp(), bezier_eq_continuous(), bezier_eq_noaccel_left(), bezier_eq_noaccel_right(), bezier_lock_unknown(), bezier_output_handle(), BLI_assert, count, ELEM, FLT_MAX, free_arrays(), BezTriple::h1, BezTriple::h2, HD_AUTO_ANIM, i, l, max_ff(), min_ff(), NAN_FLT, sub_v2_v2v2(), tridiagonal_solve_with_limits(), and BezTriple::vec.
Referenced by BKE_nurb_handle_smooth_fcurve().
Definition at line 3407 of file curve.cc.
Referenced by bezier_handle_calc_smooth_fcurve(), and tridiagonal_solve_with_limits().
Definition at line 3678 of file curve.cc.
References bezier_output_handle_inner(), copy_v3_v3(), and BezTriple::vec.
Referenced by bezier_handle_calc_smooth_fcurve().
|
static |
Definition at line 3645 of file curve.cc.
References add_v3_v3v3(), copy_v3_v3(), ELEM, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_ALIGN_DOUBLESIDE, HD_AUTO, HD_AUTO_ANIM, HD_VECT, len_v3v3(), madd_v3_v3v3fl(), sub_v3_v3v3(), and BezTriple::vec.
Referenced by bezier_output_handle().
|
static |
Definition at line 3414 of file curve.cc.
Referenced by tridiagonal_solve_with_limits().
Definition at line 407 of file curve.cc.
References BKE_curve_init(), BKE_libblock_alloc(), ID_CU_LEGACY, and name.
Referenced by BKE_mesh_to_curve(), BKE_object_obdata_add_from_type(), blender::io::obj::CurveFromGeometry::create_curve_object(), and blender::io::alembic::AbcNurbsReader::readObjectData().
| void BKE_curve_batch_cache_dirty_tag | ( | Curve * | cu, |
| int | mode ) |
Definition at line 5502 of file curve.cc.
References Curve::batch_cache, and BKE_curve_batch_cache_dirty_tag_cb.
Referenced by BKE_object_batch_cache_dirty_tag(), and BKE_object_data_select_update().
| void BKE_curve_batch_cache_free | ( | Curve * | cu | ) |
Definition at line 5508 of file curve.cc.
References Curve::batch_cache, and BKE_curve_batch_cache_free_cb.
Referenced by curve_free_data().
| void BKE_curve_bevelList_free | ( | ListBase * | bev | ) |
Definition at line 2516 of file curve.cc.
References BLI_listbase_clear(), LISTBASE_FOREACH_MUTABLE, and MEM_freeN().
Referenced by BKE_curve_bevelList_make(), BKE_object_free_curve_cache(), and object_free_data().
Definition at line 2534 of file curve.cc.
References b, bevelinside(), Curve::bevfac1_mapping, Curve::bevfac2_mapping, bevlist_firstlast_direction_calc_from_bpoint(), Curve::bevobj, BevList::bevpoints, BKE_curve_bevelList_free(), BKE_curve_forward_diff_bezier(), BKE_nurb_check_valid_u(), BKE_nurb_makeCurve(), BevelSort::bl, BLI_addtail(), BLI_assert, BLI_insertlinkbefore(), BLI_remlink(), BevList::charidx, compare_v3v3(), copy_v3_v3(), CU_3D, CU_BACK, CU_BEVFAC_MAP_SEGMENT, CU_BEVFAC_MAP_SPLINE, CU_BEZIER, CU_DO_RADIUS, CU_FRONT, CU_IS_2D, CU_NURB_CYCLIC, CU_NURBS, CU_POLY, CU_TWIST_TANGENT, Object::data, BevelSort::dir, BevPoint::dir, BevList::dupe_nr, BevPoint::dupe_tag, Curve::editnurb, ELEM, fabsf, Curve::flag, forward_diff_bezier_cotangent(), BezTriple::h1, BezTriple::h2, HD_VECT, BevList::hole, is_cyclic(), BevelSort::left, len, len_v3v3(), LISTBASE_FOREACH, LISTBASE_FOREACH_MUTABLE, make_bevel_list_2D(), make_bevel_list_3D(), make_bevel_list_segment_2D(), make_bevel_list_segment_3D(), MEM_calloc_arrayN(), MEM_callocN(), MEM_freeN(), MEM_malloc_arrayN(), MEM_mallocN(), min, normalize_v3(), BevList::nr, OB_FONT, BevPoint::offset, BevList::poly, BevPoint::quat, BevPoint::radius, BezTriple::radius, BPoint::radius, Curve::resolu_ren, Object::runtime, BevList::segbevcount, BevList::seglen, SEGMENTSU, sub_v3_v3v3(), BevPoint::tan, Curve::taperobj, BevPoint::tilt, BezTriple::tilt, BPoint::tilt, tilt_bezpart(), Curve::twist_mode, Curve::twist_smooth, Object::type, unit_qt(), BevPoint::vec, BezTriple::vec, BPoint::vec, vergxcobev(), BevPoint::weight, BezTriple::weight, and BPoint::weight.
Referenced by evaluate_curve_type_object().
| void BKE_curve_calc_coords_axis | ( | const BezTriple * | bezt_array, |
| unsigned int | bezt_array_len, | ||
| unsigned int | resolu, | ||
| bool | is_cyclic, | ||
| bool | use_cyclic_duplicate_endpoint, | ||
| unsigned int | axis, | ||
| unsigned int | stride, | ||
| float * | r_points ) |
Calculate an array for the entire curve (cyclic or non-cyclic).
| use_cyclic_duplicate_endpoint | Duplicate values at the beginning & end of the array. |
Definition at line 1613 of file curve.cc.
References BKE_curve_calc_coords_axis_len(), BKE_curve_forward_diff_bezier(), BLI_assert, i, is_cyclic(), POINTER_OFFSET, UNUSED_VARS_NDEBUG, and BezTriple::vec.
Referenced by BKE_curve_decimate_bezt_array().
| uint BKE_curve_calc_coords_axis_len | ( | unsigned int | bezt_array_len, |
| unsigned int | resolu, | ||
| bool | is_cyclic, | ||
| bool | use_cyclic_duplicate_endpoint ) |
Calculate the length for arrays filled in by BKE_curve_calc_coords_axis.
Definition at line 1603 of file curve.cc.
References is_cyclic().
Referenced by BKE_curve_calc_coords_axis(), and BKE_curve_decimate_bezt_array().
Definition at line 5117 of file curve.cc.
References add_v3_v3(), BKE_curve_nurbs_get(), CU_BEZIER, i, LISTBASE_FOREACH, mul_v3_fl(), BezTriple::vec, BPoint::vec, and zero_v3().
Referenced by blender::ed::object::object_origin_set_exec().
This function is almost the same as BKE_fcurve_correct_bezpart, but doesn't allow as large a tangent.
Definition at line 5430 of file curve.cc.
References fabsf, len, and v2.
Referenced by curve_eval_bezier_point().
| void BKE_curve_dimension_update | ( | Curve * | cu | ) |
Definition at line 437 of file curve.cc.
References BKE_curve_nurbs_get(), BKE_nurb_handles_calc(), BKE_nurb_project_2d(), CU_BEZIER, CU_IS_2D, and LISTBASE_FOREACH.
Referenced by BKE_curve_type_test(), blender::ed::object::convert_font_to_curve_legacy_generic(), curve_from_font_object(), ED_curve_join_objects_exec(), and blender::ed::transform::recalcData_curve().
| void BKE_curve_editfont_free | ( | Curve * | cu | ) |
Frees edit-curve entirely.
Definition at line 316 of file curve.cc.
References Curve::editfont, MEM_freeN(), EditFont::selboxes, EditFont::textbuf, and EditFont::textbufinfo.
Referenced by curve_free_data(), and ED_curve_editfont_free().
| void BKE_curve_editNurb_free | ( | Curve * | cu | ) |
Definition at line 358 of file curve.cc.
References BKE_curve_editNurb_keyIndex_free(), BKE_nurbList_free(), Curve::editnurb, EditNurb::keyindex, MEM_freeN(), and EditNurb::nurbs.
Referenced by curve_free_data(), and ED_curve_editnurb_free().
| void BKE_curve_editNurb_keyIndex_delCV | ( | GHash * | keyindex, |
| const void * | cv ) |
Definition at line 343 of file curve.cc.
References BLI_assert, BLI_ghash_remove(), and curve_editNurb_keyIndex_cv_free_cb().
Referenced by delete_bezt_from_nurb(), delete_bp_from_nurb(), keyIndex_delBezt(), keyIndex_delBP(), and keyIndex_delNurb().
| void BKE_curve_editNurb_keyIndex_free | ( | GHash ** | keyindex | ) |
Definition at line 349 of file curve.cc.
References BLI_ghash_free(), and curve_editNurb_keyIndex_cv_free_cb().
Referenced by BKE_curve_editNurb_free(), ED_curve_editnurb_make(), separate_exec(), undocurve_free_data(), and undocurve_to_editcurve().
Get list of nurbs from edit-nurbs structure.
Definition at line 419 of file curve.cc.
References Curve::editnurb, and EditNurb::nurbs.
Referenced by BKE_curve_material_remap(), BKE_curve_nurb_active_get(), BKE_curve_nurb_active_set(), BKE_curve_nurb_vert_active_get(), BKE_curve_nurbs_get(), BKE_where_on_path(), blender::ed::transform::createTransCurveVerts(), delete_point_under_mouse(), do_lasso_select_curve(), do_nurbs_box_select(), ED_transverts_create_from_obedit(), ED_transverts_update_obedit(), editcurve_object_from_context(), extrude_points_from_selected_vertices(), blender::ed::transform::getTransformOrientation_ex(), blender::ed::transform::gizmo_3d_foreach_selected(), insert_point_to_segment(), is_spline_nearby(), material_slot_assign_exec(), material_slot_de_select(), nurbs_foreachScreenVert(), nurbscurve_circle_select(), blender::ed::transform::recalcData_curve(), stats_object_edit(), undocurve_from_editcurve(), undocurve_to_editcurve(), and v3d_editvertex_buts().
Definition at line 428 of file curve.cc.
References Curve::editnurb, and EditNurb::nurbs.
Referenced by BKE_curve_nurbs_get_for_read(), and evaluate_surface_object().
| void BKE_curve_eval_geometry | ( | Depsgraph * | depsgraph, |
| Curve * | curve ) |
Definition at line 5483 of file curve.cc.
References BKE_curve_texspace_calc(), copy_v3_v3(), CU_TEXSPACE_FLAG_AUTO_EVALUATED, DEG_debug_print_eval(), DEG_get_original(), DEG_is_active(), depsgraph, Curve::id, ID::name, Curve::texspace_flag, Curve::texspace_location, and Curve::texspace_size.
Referenced by blender::deg::DepsgraphNodeBuilder::build_object_data_geometry_datablock().
| void BKE_curve_forward_diff_bezier | ( | float | q0, |
| float | q1, | ||
| float | q2, | ||
| float | q3, | ||
| float * | p, | ||
| int | it, | ||
| int | stride ) |
Forward differencing method for bezier curve.
Definition at line 1669 of file curve.cc.
References float, and POINTER_OFFSET.
Referenced by add_bezt_vertices(), BKE_curve_bevelList_make(), BKE_curve_calc_coords_axis(), BKE_mask_point_segment_diff(), BKE_mask_spline_differentiate_with_resolution(), BKE_nurb_calc_length(), bm_edgering_pair_interpolate(), create_samples(), curve_eval_bezier_point(), curve_to_displist(), ed_dissolve_bez_segment(), equalize_cubic_bezier(), fcurve_scene_coord_range_get(), M_Geometry_interpolate_bezier(), mask_spline_feather_differentiated_points_with_resolution__double(), blender::ed::space_node::node_link_bezier_points_evaluated(), blender::ed::sculpt_paint::paint_draw_curve_cursor(), blender::ed::sculpt_paint::paint_stroke_curve_end(), and update_cut_data_for_nurb().
| void BKE_curve_forward_diff_tangent_bezier | ( | float | q0, |
| float | q1, | ||
| float | q2, | ||
| float | q3, | ||
| float * | p, | ||
| int | it, | ||
| int | stride ) |
Forward differencing method for first derivative of cubic bezier curve.
Definition at line 1697 of file curve.cc.
References float, and POINTER_OFFSET.
Referenced by blender::ed::sculpt_paint::paint_stroke_curve_end().
| void BKE_curve_init | ( | Curve * | cu, |
| const short | curve_type ) |
Definition at line 368 of file curve.cc.
References Curve::actbox, Curve::bevel_profile, BKE_vfont_builtin_ensure(), BLI_assert, BLI_strlen_utf8_ex(), CU_3D, CU_BACK, CU_FRONT, curve_init_data(), DATA_, Curve::flag, TextBox::h, Curve::id, VFont::id, Curve::len, Curve::len_char32, MAXTEXTBOX, MEM_calloc_arrayN(), MEM_malloc_arrayN(), OB_FONT, OB_SURF, Curve::ob_type, Curve::offset, Curve::pos, Curve::resolu, Curve::resolv, Curve::str, str, Curve::strinfo, Curve::tb, Curve::totbox, ID::us, Curve::vfont, Curve::vfontb, Curve::vfontbi, Curve::vfonti, and TextBox::w.
Referenced by BKE_curve_add().
| void BKE_curve_material_index_clear | ( | Curve * | cu | ) |
Definition at line 5318 of file curve.cc.
References i, Curve::len_char32, LISTBASE_FOREACH, CharInfo::mat_nr, Curve::nurb, OB_FONT, Curve::ob_type, and Curve::strinfo.
Referenced by material_data_index_clear_id().
| void BKE_curve_material_index_remove | ( | Curve * | cu, |
| int | index ) |
Definition at line 5278 of file curve.cc.
References i, Curve::len_char32, LISTBASE_FOREACH, CharInfo::mat_nr, Curve::nurb, OB_FONT, Curve::ob_type, and Curve::strinfo.
Referenced by material_data_index_remove_id().
| bool BKE_curve_material_index_used | ( | const Curve * | cu, |
| int | index ) |
Definition at line 5297 of file curve.cc.
References i, Curve::len_char32, LISTBASE_FOREACH, CharInfo::mat_nr, Curve::nurb, OB_FONT, Curve::ob_type, and Curve::strinfo.
Referenced by BKE_object_material_slot_used().
| bool BKE_curve_material_index_validate | ( | Curve * | cu | ) |
Definition at line 5333 of file curve.cc.
References DEG_id_tag_update(), i, Curve::id, ID_RECALC_GEOMETRY, Curve::len_char32, LISTBASE_FOREACH, CharInfo::mat_nr, max_ii(), Curve::nurb, OB_FONT, Curve::ob_type, Curve::strinfo, and Curve::totcol.
Definition at line 5365 of file curve.cc.
References BKE_curve_editNurbs_get(), Curve::editfont, i, EditFont::len, Curve::len_char32, LISTBASE_FOREACH, MAT_NR_REMAP, OB_FONT, Curve::ob_type, Curve::strinfo, and EditFont::textbufinfo.
Referenced by BKE_object_material_remap().
| std::optional< blender::Bounds< blender::float3 > > BKE_curve_minmax | ( | const Curve * | cu, |
| bool | use_radius ) |
Definition at line 5097 of file curve.cc.
References BKE_curve_nurbs_get_for_read(), BKE_nurbList_free(), BKE_vfont_to_curve_ex(), BLI_listbase_is_empty(), BLI_SCOPED_DEFER, calc_nurblist_bounds(), FO_EDIT, and Curve::len.
Referenced by BKE_curve_texspace_calc(), BKE_object_boundbox_get(), blender::ed::object::object_origin_set_exec(), and blender::ed::transform::snapCurve().
Definition at line 4988 of file curve.cc.
References Curve::actnu, BKE_curve_editNurbs_get(), and BLI_findlink().
Referenced by ED_curve_editnurb_select_pick(), ed_editcurve_addvert(), and edcu_shortest_path_pick_invoke().
Definition at line 4976 of file curve.cc.
References Curve::actnu, BKE_curve_editNurbs_get(), BLI_assert, BLI_findindex(), CU_ACT_NONE, and Nurb::hide.
Referenced by BKE_curve_nurb_vert_active_set(), curve_draw_exec(), ED_curve_editnurb_select_pick(), make_segment_exec(), and merge_nurb().
Get points to the active nurb and active vert for curve.
Definition at line 5031 of file curve.cc.
References Curve::actnu, Curve::actvert, Nurb::bezt, BKE_curve_editNurbs_get(), BLI_assert, BLI_findlink(), Nurb::bp, CU_ACT_NONE, CU_BEZIER, Nurb::pntsu, Nurb::pntsv, and Nurb::type.
Referenced by BKE_curve_nurb_vert_active_validate(), BKE_curve_vert_active_get(), ED_curve_active_center(), ed_curve_select_nth(), ed_editcurve_extrude(), blender::ed::transform::getTransformOrientation_ex(), and select_row_exec().
Set active nurb and active vert for curve.
Definition at line 5014 of file curve.cc.
References Curve::actnu, Curve::actvert, BKE_curve_nurb_active_set(), BKE_curve_nurb_vert_index_get(), and CU_ACT_NONE.
Referenced by curve_pen_invoke(), delete_nurb(), ED_curve_editnurb_select_pick(), edcu_shortest_path_pick_invoke(), extrude_points_from_selected_vertices(), insert_bezt_to_nurb(), insert_bp_to_nurb(), toggle_select_bezt(), and toggle_select_bp().
| void BKE_curve_nurb_vert_active_validate | ( | Curve * | cu | ) |
Definition at line 5058 of file curve.cc.
References Curve::actnu, Curve::actvert, BEZT_ISSEL_ANY, BKE_curve_nurb_vert_active_get(), CU_ACT_NONE, CU_BEZIER, BPoint::f1, Nurb::hide, SELECT, and Nurb::type.
Referenced by curve_select_random_exec(), de_select_all_exec(), de_select_first_exec(), de_select_last_exec(), do_lasso_select_curve(), do_nurbs_box_select(), extrude_vertices_from_selected_endpoints(), hide_exec(), nurbscurve_circle_select(), and select_linked_pick_invoke().
| int BKE_curve_nurb_vert_index_get | ( | const Nurb * | nu, |
| const void * | vert ) |
Definition at line 5003 of file curve.cc.
References ARRAY_HAS_ITEM, Nurb::bezt, BLI_assert, Nurb::bp, CU_BEZIER, Nurb::pntsu, Nurb::pntsv, and Nurb::type.
Referenced by BKE_curve_nurb_vert_active_set(), delete_bezt_from_nurb(), delete_bp_from_nurb(), delete_point_under_mouse(), and edcu_shortest_path_pick_invoke().
Definition at line 4958 of file curve.cc.
References BKE_curve_editNurbs_get(), Curve::editnurb, and Curve::nurb.
Referenced by BKE_curve_center_median(), BKE_curve_dimension_update(), BKE_curve_translate(), BKE_object_shapekey_remove(), blo_do_versions_290(), blender::io::obj::CurveFromGeometry::create_curve_object(), curve_from_curve_object(), blender::io::alembic::ABCNurbsWriter::do_write(), give_parvert(), insert_curvekey(), and blender::io::alembic::AbcNurbsReader::readObjectData().
Definition at line 4967 of file curve.cc.
References BKE_curve_editNurbs_get_for_read(), Curve::editnurb, and Curve::nurb.
Referenced by BKE_curve_minmax(), blender::bke::curve_legacy_to_curves(), and evaluate_curve_type_object().
Definition at line 4633 of file curve.cc.
References BKE_nurbList_verts_count(), CU_BEZIER, i, KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, and LISTBASE_FOREACH.
Referenced by BKE_curve_calc_modifiers_pre().
Definition at line 4665 of file curve.cc.
References CU_BEZIER, i, KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, LISTBASE_FOREACH, BezTriple::radius, BPoint::radius, BezTriple::tilt, and BPoint::tilt.
Referenced by BKE_curve_calc_modifiers_pre().
Definition at line 4555 of file curve.cc.
References BKE_curve_nurbs_vert_coords_get(), and BKE_nurbList_verts_count().
Referenced by BKE_curve_calc_modifiers_pre(), blender::ed::object::data_xform_create_ex(), and blender::ed::object::modifier_apply_obdata().
| void BKE_curve_nurbs_vert_coords_apply | ( | ListBase * | lb, |
| const Span< float3 > | vert_coords, | ||
| const bool | constrain_2d ) |
Definition at line 4598 of file curve.cc.
References BKE_nurb_project_2d(), calchandlesNurb_intern(), copy_v3_v3(), CU_BEZIER, i, LISTBASE_FOREACH, SELECT, BezTriple::vec, and BPoint::vec.
| void BKE_curve_nurbs_vert_coords_apply_with_mat4 | ( | ListBase * | lb, |
| const Span< float3 > | vert_coords, | ||
| const float4x4 & | transform, | ||
| const bool | constrain_2d ) |
Definition at line 4562 of file curve.cc.
References BKE_nurb_project_2d(), calchandlesNurb_intern(), CU_BEZIER, i, LISTBASE_FOREACH, mul_v3_m4v3(), SELECT, transform(), BezTriple::vec, and BPoint::vec.
| void BKE_curve_nurbs_vert_coords_get | ( | const ListBase * | lb, |
| MutableSpan< float3 > | vert_coords ) |
Definition at line 4530 of file curve.cc.
References CU_BEZIER, i, LISTBASE_FOREACH, BezTriple::vec, and BPoint::vec.
Referenced by BKE_curve_nurbs_vert_coords_alloc().
Definition at line 5421 of file curve.cc.
References Curve::fsize, TextBox::h, TextBox::w, TextBox::x, rctf::xmax, rctf::xmin, Curve::xof, TextBox::y, rctf::ymax, rctf::ymin, and Curve::yof.
Referenced by ED_curve_editfont_select_pick().
| void BKE_curve_smooth_flag_set | ( | Curve * | cu, |
| const bool | use_smooth ) |
Definition at line 5407 of file curve.cc.
References CU_SMOOTH, LISTBASE_FOREACH, and Curve::nurb.
Referenced by blender::ed::object::shade_smooth_exec().
| void BKE_curve_texspace_calc | ( | Curve * | cu | ) |
Definition at line 468 of file curve.cc.
References BKE_curve_minmax(), bounds(), copy_v3_v3(), CU_TEXSPACE_FLAG_AUTO, CU_TEXSPACE_FLAG_AUTO_EVALUATED, FLT_MAX, mid_v3_v3v3(), Curve::texspace_flag, Curve::texspace_location, and Curve::texspace_size.
Referenced by BKE_curve_eval_geometry(), BKE_curve_texspace_ensure(), and object_for_curve_to_mesh_create().
| void BKE_curve_texspace_ensure | ( | Curve * | cu | ) |
Definition at line 502 of file curve.cc.
References BKE_curve_texspace_calc(), CU_TEXSPACE_FLAG_AUTO, CU_TEXSPACE_FLAG_AUTO_EVALUATED, and Curve::texspace_flag.
Referenced by BKE_object_obdata_texspace_get(), blender::draw::overlay::Bounds::object_sync(), and ObjectInfos::sync().
| void BKE_curve_transform | ( | Curve * | cu, |
| const float | mat[4][4], | ||
| const bool | do_keys, | ||
| const bool | do_props ) |
Definition at line 5226 of file curve.cc.
References BKE_curve_transform_ex(), and mat4_to_scale().
| void BKE_curve_transform_ex | ( | Curve * | cu, |
| const float | mat[4][4], | ||
| const bool | do_keys, | ||
| const bool | do_props, | ||
| const float | unit_scale ) |
Definition at line 5154 of file curve.cc.
References BKE_nurb_handles_calc(), Key::block, CU_BEZIER, ELEM, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM, i, is_uniform_scaled_m4(), Curve::key, KEYELEM_ELEM_LEN_BEZTRIPLE, KEYELEM_ELEM_LEN_BPOINT, KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, LISTBASE_FOREACH, mul_m4_v3(), Curve::nurb, BezTriple::radius, BPoint::radius, BezTriple::vec, and BPoint::vec.
Referenced by blender::ed::object::apply_objects_internal(), and BKE_curve_transform().
Definition at line 5232 of file curve.cc.
References add_v3_v3(), BKE_curve_nurbs_get(), Key::block, CU_BEZIER, i, Curve::key, KEYELEM_ELEM_LEN_BEZTRIPLE, KEYELEM_ELEM_LEN_BPOINT, KEYELEM_FLOAT_LEN_BEZTRIPLE, KEYELEM_FLOAT_LEN_BPOINT, LISTBASE_FOREACH, and Curve::nurb.
Referenced by blender::ed::object::object_origin_set_exec().
| void BKE_curve_type_test | ( | Object * | ob, |
| const bool | dimension_update ) |
Definition at line 454 of file curve.cc.
References BKE_curve_dimension_update(), CU_IS_2D, Object::data, OB_CURVES_LEGACY, Curve::ob_type, and Object::type.
Referenced by libblock_remap_data_postprocess_obdata_relink(), and object_blend_read_after_liblink().
| void * BKE_curve_vert_active_get | ( | Curve * | cu | ) |
Get active vert for curve.
Definition at line 4994 of file curve.cc.
References BKE_curve_nurb_vert_active_get().
Referenced by ED_curve_editnurb_select_pick().
| void BKE_nurb_bezierPoints_add | ( | Nurb * | nu, |
| int | number ) |
Definition at line 876 of file curve.cc.
References Nurb::bezt, i, MEM_recallocN, Nurb::pntsu, and BezTriple::radius.
Referenced by ed_editcurve_addvert().
Definition at line 1007 of file curve.cc.
References add_v3_v3v3(), normalize_v3(), sub_v3_v3v3(), and BezTriple::vec.
Referenced by blender::ed::transform::createTransCurveVerts(), blender::ed::transform::getTransformOrientation_ex(), and nurb_bezt_direction_worldspace_get().
Definition at line 1022 of file curve.cc.
References add_v3_v3v3(), BKE_nurb_bezt_get_next(), BKE_nurb_bezt_get_prev(), copy_v3_v3(), cross_v3_v3v3(), normalize_v3(), sub_v3_v3v3(), and BezTriple::vec.
Referenced by blender::ed::transform::createTransCurveVerts(), ED_transverts_create_from_obedit(), and blender::ed::transform::getTransformOrientation_ex().
Definition at line 921 of file curve.cc.
References ARRAY_HAS_ITEM, Nurb::bezt, BLI_assert, CU_NURB_CYCLIC, Nurb::flagu, and Nurb::pntsu.
Referenced by BKE_nurb_bezt_calc_plane(), BKE_nurb_handle_calc_simple(), curve_pen_modal(), delete_point_under_mouse(), move_adjacent_handle(), move_segment(), and subdividenurb().
Definition at line 963 of file curve.cc.
References ARRAY_HAS_ITEM, Nurb::bezt, BLI_assert, CU_NURB_CYCLIC, Nurb::flagu, Nurb::pntsu, and Nurb::pntsv.
Referenced by BKE_nurb_bezt_calc_plane(), BKE_nurb_handle_calc_simple(), delete_point_under_mouse(), and move_adjacent_handle().
| void BKE_nurb_bezt_handle_test | ( | BezTriple * | bezt, |
| eBezTriple_Flag__Alias | sel_flag, | ||
| const eNurbHandleTest_Mode | handle_mode, | ||
| bool | use_around_local ) |
Update selected handle types to ensure valid state, e.g. deduce "Auto" types to concrete ones. Thereby sel_flag defines what qualifies as selected. Use when something has changed handle positions.
The caller needs to recalculate handles.
| sel_flag | The flag (bezt.f1/2/3) value to use to determine selection. Usually SELECT, but may want to use a different one at times (if caller does not operate on * selection). |
| handle_mode | Interpret the selection base on modes in eNurbHandleTest_Mode. |
Definition at line 4048 of file curve.cc.
References BKE_nurb_bezt_handle_test_calc_flag(), ELEM, flag, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM, HD_FREE, HD_VECT, SEL_F1, SEL_F2, and SEL_F3.
Referenced by BKE_nurb_handles_test(), graphedit_activekey_handles_cb(), and testhandles_fcurve().
| short BKE_nurb_bezt_handle_test_calc_flag | ( | const BezTriple * | bezt, |
| const eBezTriple_Flag__Alias | sel_flag, | ||
| const eNurbHandleTest_Mode | handle_mode ) |
Return a flag for the handles to treat as "selected": 1 << 0, 1 << 1, 1 << 2 map to handles 1 2 & 3.
Definition at line 4015 of file curve.cc.
References BezTriple::f1, BezTriple::f2, BezTriple::f3, flag, NURB_HANDLE_TEST_EACH, NURB_HANDLE_TEST_KNOT_ONLY, NURB_HANDLE_TEST_KNOT_OR_EACH, SEL_F1, SEL_F2, and SEL_F3.
Referenced by blender::ed::transform::bezt_select_to_transform_triple_flag(), BKE_nurb_bezt_handle_test(), and BKE_nurbList_handles_set().
Definition at line 1059 of file curve.cc.
References add_v3_v3(), BKE_nurb_bpoint_get_next(), BKE_nurb_bpoint_get_prev(), normalize_v3(), sub_v3_v3v3(), BPoint::vec, and zero_v3().
Referenced by blender::ed::transform::createTransCurveVerts(), blender::ed::transform::getTransformOrientation_ex(), and nurb_bpoint_direction_worldspace_get().
Definition at line 1082 of file curve.cc.
References add_v3_v3v3(), BKE_nurb_bpoint_get_next(), BKE_nurb_bpoint_get_prev(), copy_v3_v3(), cross_v3_v3v3(), normalize_v3(), sub_v3_v3v3(), and BPoint::vec.
Referenced by blender::ed::transform::createTransCurveVerts(), and blender::ed::transform::getTransformOrientation_ex().
Definition at line 942 of file curve.cc.
References ARRAY_HAS_ITEM, BLI_assert, Nurb::bp, CU_NURB_CYCLIC, Nurb::flagu, and Nurb::pntsu.
Referenced by BKE_nurb_bpoint_calc_normal(), BKE_nurb_bpoint_calc_plane(), blender::ed::transform::getTransformOrientation_ex(), and subdividenurb().
Definition at line 985 of file curve.cc.
References ARRAY_HAS_ITEM, BLI_assert, Nurb::bp, CU_NURB_CYCLIC, Nurb::flagu, Nurb::pntsu, and Nurb::pntsv.
Referenced by BKE_nurb_bpoint_calc_normal(), BKE_nurb_bpoint_calc_plane(), and blender::ed::transform::getTransformOrientation_ex().
Definition at line 762 of file curve.cc.
References b, Nurb::bezt, BKE_curve_forward_diff_bezier(), BKE_nurb_makeCurve(), Nurb::bp, CU_BEZIER, CU_NURB_CYCLIC, CU_NURBS, CU_POLY, Nurb::flagu, BezTriple::h1, BezTriple::h2, HD_VECT, len_v3v3(), length(), MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), Nurb::pntsu, Nurb::pntsv, Nurb::resolu, Nurb::type, BezTriple::vec, and BPoint::vec.
| bool BKE_nurb_check_valid_u | ( | const Nurb * | nu | ) |
Definition at line 4766 of file curve.cc.
References Nurb::flagu, nurb_check_valid(), Nurb::orderu, Nurb::pntsu, Nurb::pntsv, Nurb::type, and Valid.
Referenced by BKE_curve_bevelList_make(), BKE_nurb_check_valid_uv(), calc_bevfac_mapping(), curve_to_displist(), and makeknots().
| bool BKE_nurb_check_valid_uv | ( | const Nurb * | nu | ) |
Definition at line 4782 of file curve.cc.
References BKE_nurb_check_valid_u(), BKE_nurb_check_valid_v(), and Nurb::pntsv.
Referenced by evaluate_surface_object().
| bool BKE_nurb_check_valid_v | ( | const Nurb * | nu | ) |
Definition at line 4774 of file curve.cc.
References Nurb::flagv, nurb_check_valid(), Nurb::orderv, Nurb::pntsv, Nurb::type, and Valid.
Referenced by BKE_nurb_check_valid_uv(), and makeknots().
Copy the nurb but allow for different number of points (to be copied after this).
Definition at line 649 of file curve.cc.
References Nurb::bezt, Nurb::bp, Nurb::knotsu, Nurb::knotsv, MEM_malloc_arrayN(), MEM_mallocN(), Nurb::pntsu, and Nurb::pntsv.
Referenced by adduplicateflagNurb(), curve_delete_segments(), and ed_editcurve_addvert().
| void BKE_nurb_direction_switch | ( | Nurb * | nu | ) |
Definition at line 4407 of file curve.cc.
References b, Nurb::bezt, Nurb::bp, CU_BEZIER, CU_NURBS, BezTriple::f1, BezTriple::f3, fabsf, BezTriple::h1, BezTriple::h2, KNOTSU, Nurb::knotsu, MEM_freeN(), MEM_malloc_arrayN(), Nurb::pntsu, Nurb::pntsv, swap_v3_v3(), BezTriple::tilt, BPoint::tilt, Nurb::type, and BezTriple::vec.
Referenced by make_segment_exec(), and switch_direction_exec().
Definition at line 609 of file curve.cc.
References Nurb::bezt, Nurb::bp, KNOTSU, Nurb::knotsu, KNOTSV, Nurb::knotsv, len, MEM_malloc_arrayN(), MEM_mallocN(), Nurb::pntsu, and Nurb::pntsv.
Referenced by BKE_nurbList_duplicate(), ED_curve_editnurb_load(), ED_curve_editnurb_make(), ED_curve_join_objects_exec(), undocurve_from_editcurve(), and undocurve_to_editcurve().
| void BKE_nurb_free | ( | Nurb * | nu | ) |
Definition at line 571 of file curve.cc.
References Nurb::bezt, Nurb::bp, Nurb::knotsu, Nurb::knotsv, and MEM_freeN().
Referenced by BKE_nurbList_free(), delete_nurb(), ed_curve_delete_selected(), ed_surf_delete_selected(), make_segment_exec(), and merge_2_nurb().
| void BKE_nurb_handle_calc | ( | BezTriple * | bezt, |
| BezTriple * | prev, | ||
| BezTriple * | next, | ||
| bool | is_fcurve, | ||
| char | smoothing ) |
Recalculate the handles of a nurb bezier-triple. Acts based on handle selection with SELECT flag. To use a different flag, use BKE_nurb_handle_calc_ex().
Definition at line 3940 of file curve.cc.
References calchandleNurb_intern(), next, and SELECT.
Referenced by BKE_nurb_handle_calc_simple(), calc_keyHandles(), mask_calc_point_handle(), and points_to_bezier().
| void BKE_nurb_handle_calc_ex | ( | BezTriple * | bezt, |
| BezTriple * | prev, | ||
| BezTriple * | next, | ||
| eBezTriple_Flag__Alias | handle_sel_flag, | ||
| bool | is_fcurve, | ||
| char | smoothing ) |
Variant of BKE_nurb_handle_calc() that allows calculating based on a different select flag.
| handle_sel_flag | The flag (bezt.f1/2/3) value to use to determine selection. Usually SELECT, but may want to use a different one at times (if caller does not operate on selection). |
Definition at line 3946 of file curve.cc.
References calchandleNurb_intern(), and next.
Similar to BKE_nurb_handle_calc but for curves and figures out the previous and next for us.
Definition at line 3987 of file curve.cc.
References BKE_nurb_bezt_get_next(), BKE_nurb_bezt_get_prev(), BKE_nurb_handle_calc(), next, and Nurb::pntsu.
Referenced by adduplicateflagNurb(), and BKE_nurb_handle_calc_simple_auto().
Definition at line 3996 of file curve.cc.
References BKE_nurb_handle_calc_simple(), BezTriple::h1, BezTriple::h2, HD_AUTO, and Nurb::pntsu.
Referenced by BKE_nurbList_handles_recalculate(), and ed_editcurve_addvert().
| void BKE_nurb_handle_smooth_fcurve | ( | BezTriple * | bezt, |
| int | total, | ||
| bool | cyclic ) |
Definition at line 3891 of file curve.cc.
References bezier_handle_calc_smooth_fcurve(), count, i, and is_free_auto_point().
| void BKE_nurb_handles_autocalc | ( | Nurb * | nu, |
| uint8_t | flag ) |
Definition at line 4105 of file curve.cc.
References Nurb::bezt, BKE_nurb_handles_calc(), dist_squared_to_line_v3(), eps, BezTriple::f1, BezTriple::f3, flag, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_FREE, HD_VECT, i, len_squared_v3v3(), Nurb::pntsu, and BezTriple::vec.
Referenced by BKE_nurbList_handles_autocalc().
| void BKE_nurb_handles_calc | ( | Nurb * | nu | ) |
Definition at line 3957 of file curve.cc.
References calchandlesNurb_intern(), and SELECT.
Referenced by BKE_curve_dimension_update(), BKE_curve_transform_ex(), BKE_nurb_handles_autocalc(), BKE_nurb_handles_test(), BKE_nurb_type_convert(), BKE_nurbList_handles_recalculate(), curve_delete_segments(), curve_draw_exec(), curve_pen_modal(), curve_toggle_cyclic(), delete_point_under_mouse(), ED_curve_add_nurbs_primitive(), ed_curve_delete_selected(), ED_curve_join_objects_exec(), ed_editcurve_addvert(), insert_bezt_to_nurb(), make_segment_exec(), move_adjacent_handle(), move_all_selected_points(), nurb_handles_calc__align_selected(), blender::ed::transform::recalcData_curve(), smooth_exec(), and subdividenurb().
| void BKE_nurb_handles_test | ( | Nurb * | nu, |
| const eNurbHandleTest_Mode | handle_mode, | ||
| const bool | use_around_local ) |
Definition at line 4084 of file curve.cc.
References Nurb::bezt, BKE_nurb_bezt_handle_test(), BKE_nurb_handles_calc(), CU_BEZIER, Nurb::pntsu, SELECT, and Nurb::type.
Referenced by blender::ed::transform::createTransCurveVerts(), ED_transverts_update_obedit(), and v3d_editvertex_buts().
| int BKE_nurb_index_from_uv | ( | Nurb * | nu, |
| int | u, | ||
| int | v ) |
Definition at line 890 of file curve.cc.
References CU_NURB_CYCLIC, Nurb::flagu, Nurb::flagv, mod_i(), Nurb::pntsu, Nurb::pntsv, and v.
Referenced by curve_select_shortest_path_surf().
| void BKE_nurb_index_to_uv | ( | Nurb * | nu, |
| int | index, | ||
| int * | r_u, | ||
| int * | r_v ) |
Definition at line 912 of file curve.cc.
References BLI_assert, Nurb::pntsu, and Nurb::pntsv.
Referenced by curve_select_shortest_path_surf().
| void BKE_nurb_knot_alloc_u | ( | Nurb * | nu | ) |
Definition at line 1184 of file curve.cc.
References KNOTSU, Nurb::knotsu, and MEM_calloc_arrayN().
| void BKE_nurb_knot_calc_u | ( | Nurb * | nu | ) |
Definition at line 1189 of file curve.cc.
References makeknots().
Referenced by adduplicateflagNurb(), BKE_nurb_type_convert(), blo_do_versions_300(), curve_delete_segments(), curve_draw_exec(), curve_toggle_cyclic(), ED_curve_add_nurbs_primitive(), ed_curve_delete_selected(), ed_editcurve_addvert(), ed_editcurve_extrude(), ed_editnurb_extrude_flag(), ed_surf_delete_selected(), extrude_vertices_from_selected_endpoints(), insert_bp_to_nurb(), make_segment_exec(), merge_2_nurb(), blender::io::alembic::AbcNurbsReader::readObjectData(), and subdividenurb().
| void BKE_nurb_knot_calc_v | ( | Nurb * | nu | ) |
Definition at line 1194 of file curve.cc.
References makeknots().
Referenced by adduplicateflagNurb(), blo_do_versions_300(), curve_delete_segments(), curve_toggle_cyclic(), ED_curve_add_nurbs_primitive(), ed_editnurb_extrude_flag(), ed_editnurb_spin(), ed_surf_delete_selected(), merge_2_nurb(), blender::io::alembic::AbcNurbsReader::readObjectData(), and subdividenurb().
| void BKE_nurb_makeCurve | ( | const Nurb * | nu, |
| float * | coord_array, | ||
| float * | tilt_array, | ||
| float * | radius_array, | ||
| float * | weight_array, | ||
| int | resolu, | ||
| int | stride ) |
| coord_array | Has to be (3 * 4 * pntsu * resolu) in size and zero-ed |
| tilt_array | set when non-NULL |
| radius_array | set when non-NULL |
Definition at line 1467 of file curve.cc.
References basisNurb(), Nurb::bp, CU_NURB_CYCLIC, eps, Nurb::flagu, i, KNOTSU, Nurb::knotsu, len, madd_v3_v3fl(), MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), Nurb::orderu, Nurb::pntsu, POINTER_OFFSET, BPoint::radius, SEGMENTSU, sum(), BPoint::tilt, BPoint::vec, BPoint::weight, and zero_v3().
Referenced by BKE_curve_bevelList_make(), BKE_nurb_calc_length(), curve_to_displist(), and evaluate_surface_object().
| void BKE_nurb_makeFaces | ( | const Nurb * | nu, |
| float * | coord_array, | ||
| int | rowstride, | ||
| int | resolu, | ||
| int | resolv ) |
| coord_array | has to be (3 * 4 * resolu * resolv) in size, and zero-ed. |
Definition at line 1275 of file curve.cc.
References basisNurb(), Nurb::bp, CU_NURB_CYCLIC, Nurb::flagu, Nurb::flagv, i, in, KNOTSU, Nurb::knotsu, KNOTSV, Nurb::knotsv, len, madd_v3_v3fl(), MEM_calloc_arrayN(), MEM_freeN(), MEM_malloc_arrayN(), Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, sum(), v, BPoint::vec, and zero_v3().
Referenced by evaluate_surface_object().
| bool BKE_nurb_order_clamp_u | ( | Nurb * | nu | ) |
Definition at line 4794 of file curve.cc.
References max_ii(), Nurb::orderu, and Nurb::pntsu.
Referenced by adduplicateflagNurb(), curve_delete_segments(), ed_curve_delete_selected(), ED_curve_editnurb_load(), and ed_surf_delete_selected().
| bool BKE_nurb_order_clamp_v | ( | Nurb * | nu | ) |
Definition at line 4804 of file curve.cc.
References max_ii(), Nurb::orderv, and Nurb::pntsv.
Referenced by adduplicateflagNurb(), curve_delete_segments(), and ed_surf_delete_selected().
| void BKE_nurb_points_add | ( | Nurb * | nu, |
| int | number ) |
Be sure to call BKE_nurb_knot_calc_u / BKE_nurb_knot_calc_v after this.
Definition at line 863 of file curve.cc.
References Nurb::bp, i, MEM_recallocN, Nurb::pntsu, and BPoint::radius.
| void BKE_nurb_project_2d | ( | Nurb * | nu | ) |
Definition at line 684 of file curve.cc.
References Nurb::bezt, Nurb::bp, CU_BEZIER, Nurb::pntsu, Nurb::pntsv, Nurb::type, BezTriple::vec, and BPoint::vec.
Referenced by BKE_curve_dimension_update(), BKE_curve_nurbs_vert_coords_apply(), BKE_curve_nurbs_vert_coords_apply_with_mat4(), ED_curve_add_nurbs_primitive(), ed_editnurb_translate_flag(), ED_transverts_update_obedit(), and v3d_editvertex_buts().
| bool BKE_nurb_type_convert | ( | Nurb * | nu, |
| short | type, | ||
| bool | use_handles, | ||
| const char ** | r_err_msg ) |
Definition at line 4814 of file curve.cc.
References Nurb::bezt, BKE_nurb_handles_calc(), BKE_nurb_knot_calc_u(), Nurb::bp, copy_v3_v3(), CU_BEZIER, CU_NURB_BEZIER, CU_NURB_CYCLIC, CU_NURBS, CU_POLY, ELEM, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, Nurb::flagu, BezTriple::h1, BezTriple::h2, HD_VECT, Nurb::knotsu, Nurb::knotsv, MEM_calloc_arrayN(), MEM_freeN(), MEM_SAFE_FREE, Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, BezTriple::radius, BPoint::radius, Nurb::type, BezTriple::vec, BPoint::vec, BezTriple::weight, and BPoint::weight.
Referenced by set_spline_type_exec().
| bool BKE_nurb_valid_message | ( | const int | pnts, |
| const short | order, | ||
| const short | flag, | ||
| const short | type, | ||
| const bool | is_surf, | ||
| const int | dir, | ||
| char * | message_dst, | ||
| const size_t | maxncpy ) |
Definition at line 4722 of file curve.cc.
References AtLeastTwoPointsRequired, BLI_snprintf(), BLI_strncpy(), flag, MorePointsForBezierRequired, MorePointsThanOrderRequired, MoreRowsForBezierRequired, nurb_check_valid(), RPT_, status, and Valid.
Definition at line 674 of file curve.cc.
References BKE_nurb_duplicate(), BKE_nurbList_free(), BLI_addtail(), and LISTBASE_FOREACH.
Referenced by BKE_vfontdata_char_copy(), curve_copy_data(), evaluate_curve_type_object(), and evaluate_surface_object().
| void BKE_nurbList_flag_set | ( | ListBase * | editnurb, |
| uint8_t | flag, | ||
| bool | set ) |
Definition at line 4341 of file curve.cc.
References CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, flag, LISTBASE_FOREACH, and SET_FLAG_FROM_TEST.
Referenced by do_lasso_select_curve(), do_nurbs_box_select(), ED_curve_add_nurbs_primitive(), ED_curve_editnurb_select_pick(), nurbscurve_circle_select(), and select_row_exec().
| bool BKE_nurbList_flag_set_from_flag | ( | ListBase * | editnurb, |
| uint8_t | from_flag, | ||
| uint8_t | flag ) |
Set flag for every point that already has from_flag set.
Definition at line 4376 of file curve.cc.
References CU_BEZIER, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, flag, i, LISTBASE_FOREACH, and SET_FLAG_FROM_TEST.
Referenced by do_lasso_select_curve(), do_nurbs_box_select(), and nurbscurve_circle_select().
| void BKE_nurbList_free | ( | ListBase * | lb | ) |
Definition at line 597 of file curve.cc.
References BKE_nurb_free(), BLI_listbase_clear(), and LISTBASE_FOREACH_MUTABLE.
Referenced by BKE_curve_editNurb_free(), BKE_curve_minmax(), BKE_nurbList_duplicate(), BKE_object_free_curve_cache(), blender::nodes::node_geo_string_to_curves_cc::create_curve_instances(), curve_delete_segments(), curve_free_data(), ED_curve_editnurb_load(), ED_curve_editnurb_make(), knifeproject_poly_from_object(), separate_exec(), undocurve_free_data(), undocurve_to_editcurve(), and vfont_to_curve().
| void BKE_nurbList_handles_autocalc | ( | ListBase * | editnurb, |
| uint8_t | flag ) |
Definition at line 4186 of file curve.cc.
References BKE_nurb_handles_autocalc(), flag, and LISTBASE_FOREACH.
| void BKE_nurbList_handles_recalculate | ( | ListBase * | editnurb, |
| const bool | calc_length, | ||
| const uint8_t | flag ) |
Definition at line 4284 of file curve.cc.
References BKE_nurb_handle_calc_simple_auto(), BKE_nurb_handles_calc(), copy_v3_v3(), CU_BEZIER, dist_ensure_v3_v3fl(), BezTriple::f1, BezTriple::f3, flag, len_v3v3(), LISTBASE_FOREACH, and BezTriple::vec.
Referenced by curve_normals_make_consistent_exec().
| void BKE_nurbList_handles_set | ( | ListBase * | editnurb, |
| eNurbHandleTest_Mode | handle_mode, | ||
| char | code ) |
| code |
Definition at line 4193 of file curve.cc.
References BKE_nurb_bezt_handle_test_calc_flag(), CU_BEZIER, ELEM, flag, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_AUTO, HD_FREE, HD_VECT, LISTBASE_FOREACH, nurb_handles_calc__align_selected(), and SELECT.
Referenced by set_handle_type_exec().
Definition at line 511 of file curve.cc.
References copy_v3_v3(), CU_BEZIER, and LISTBASE_FOREACH.
Referenced by give_parvert().
| int BKE_nurbList_verts_count | ( | const ListBase * | nurb | ) |
Definition at line 537 of file curve.cc.
References LISTBASE_FOREACH.
Referenced by BKE_curve_nurbs_key_vert_coords_alloc(), BKE_curve_nurbs_vert_coords_alloc(), and curve_surf_to_softbody().
| int BKE_nurbList_verts_count_without_handles | ( | const ListBase * | nurb | ) |
Definition at line 553 of file curve.cc.
References LISTBASE_FOREACH.
Referenced by BKE_object_as_kdtree().
|
static |
Definition at line 1867 of file curve.cc.
References fabsf, M_PI_2, safe_acosf(), sinf, and sqrtf.
Referenced by make_bevel_list_2D(), and make_bevel_list_segment_2D().
Definition at line 710 of file curve.cc.
References add_v3_v3v3(), Nurb::bezt, Nurb::bp, CU_BEZIER, max, min, minmax_v3v3_v3(), Nurb::pntsu, Nurb::pntsv, BezTriple::radius, BPoint::radius, sub_v3_v3v3(), Nurb::type, BezTriple::vec, and BPoint::vec.
Referenced by calc_nurblist_bounds().
|
static |
Definition at line 5083 of file curve.cc.
References BLI_listbase_is_empty(), calc_nurb_minmax(), LISTBASE_FOREACH, max, and min.
Referenced by BKE_curve_minmax().
|
static |
Definition at line 3062 of file curve.cc.
References BezTriple::auto_handle_type, BLI_assert, e, ELEM, eps, BezTriple::f1, FCURVE_SMOOTH_NONE, BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_ALIGN_DOUBLESIDE, HD_AUTO, HD_AUTO_ANIM, HD_AUTOTYPE_LOCKED_FINAL, HD_AUTOTYPE_NORMAL, HD_FREE, HD_VECT, len, len_v3(), len_v3v3(), madd_v3_v3v3fl(), next, p2_h1, p2_h2, sub_v3_v3v3(), and BezTriple::vec.
Referenced by BKE_nurb_handle_calc(), BKE_nurb_handle_calc_ex(), and calchandlesNurb_intern().
|
static |
Definition at line 3302 of file curve.cc.
References Nurb::bezt, calchandleNurb_intern(), CU_BEZIER, CU_NURB_CYCLIC, Nurb::flagu, next, Nurb::pntsu, and Nurb::type.
Referenced by BKE_curve_nurbs_vert_coords_apply(), BKE_curve_nurbs_vert_coords_apply_with_mat4(), and BKE_nurb_handles_calc().
|
static |
Definition at line 1112 of file curve.cc.
References CU_NURB_BEZIER, CU_NURB_CYCLIC, CU_NURB_ENDPOINT, flag, i, is_cyclic(), and min_ii().
Referenced by makeknots().
|
static |
Definition at line 208 of file curve.cc.
References Curve::actbox, Curve::batch_cache, Curve::bevel_profile, BKE_curveprofile_blend_read(), BLI_strlen_utf8_ex(), BLO_read_float_array(), BLO_read_pointer_array(), BLO_read_string(), BLO_read_struct, BLO_read_struct_array, BLO_read_struct_list, CLAMP, CU_TEXSPACE_FLAG_AUTO_EVALUATED, Curve::editfont, Curve::editnurb, ListBase::first, KNOTSU, KNOTSV, ListBase::last, Curve::len_char32, Curve::linewidth, LISTBASE_FOREACH, Curve::mat, MAXTEXTBOX, MEM_calloc_arrayN(), MEM_freeN(), Curve::nurb, OB_FONT, Curve::ob_type, Curve::str, Curve::strinfo, Curve::tb, Curve::texspace_flag, Curve::totbox, Curve::totcol, UNLIKELY, Curve::vfont, TextBox::w, and Curve::wordspace.
|
static |
Definition at line 161 of file curve.cc.
References Curve::batch_cache, Curve::bevel_profile, BKE_curveprofile_blend_write(), BKE_id_blend_write(), BLO_write_float_array(), BLO_write_id_struct, BLO_write_pointer_array(), BLO_write_string(), BLO_write_struct, BLO_write_struct_array, CU_BEZIER, Curve::editfont, Curve::editnurb, Curve::id, KNOTSU, KNOTSV, Curve::len_char32, LISTBASE_FOREACH, Curve::mat, Curve::nurb, OB_FONT, Curve::ob_type, Curve::str, Curve::strinfo, Curve::tb, Curve::totbox, and Curve::totcol.
|
static |
Definition at line 88 of file curve.cc.
References Curve::batch_cache, Curve::bevel_profile, BKE_curveprofile_copy(), BKE_id_copy_in_lib(), BKE_nurbList_duplicate(), BLI_listbase_clear(), Curve::editfont, Curve::editnurb, flag, Curve::id, Key::id, Curve::key, LIB_ID_COPY_SHAPEKEY, Curve::mat, MEM_dupallocN(), Curve::nurb, Curve::str, Curve::strinfo, and Curve::tb.
|
static |
Definition at line 336 of file curve.cc.
References MEM_freeN(), and CVKeyIndex::orig_cv.
Referenced by BKE_curve_editNurb_keyIndex_delCV(), and BKE_curve_editNurb_keyIndex_free().
|
static |
Definition at line 144 of file curve.cc.
References Curve::bevobj, BKE_LIB_FOREACHID_PROCESS_IDSUPER, data, i, IDWALK_CB_NOP, IDWALK_CB_USER, Curve::key, Curve::mat, Curve::taperobj, Curve::textoncurve, Curve::totcol, Curve::vfont, Curve::vfontb, Curve::vfontbi, and Curve::vfonti.
|
static |
Definition at line 122 of file curve.cc.
References Curve::bevel_profile, BKE_curve_batch_cache_free(), BKE_curve_editfont_free(), BKE_curve_editNurb_free(), BKE_curveprofile_free(), BKE_nurbList_free(), Curve::edit_data_from_original, Curve::mat, MEM_SAFE_FREE, Curve::nurb, Curve::str, Curve::strinfo, and Curve::tb.
|
static |
Definition at line 79 of file curve.cc.
References BLI_assert, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
Referenced by BKE_curve_init().
|
static |
Definition at line 1721 of file curve.cc.
References float, i, normalize_v3(), and POINTER_OFFSET.
Referenced by BKE_curve_bevelList_make().
|
static |
Definition at line 3386 of file curve.cc.
References MEM_freeN().
Referenced by bezier_handle_calc_smooth_fcurve(), and tridiagonal_solve_with_limits().
|
static |
Definition at line 3886 of file curve.cc.
References BezTriple::auto_handle_type, BEZT_IS_AUTOH, and HD_AUTOTYPE_NORMAL.
Referenced by BKE_nurb_handle_smooth_fcurve().
|
static |
Definition at line 2436 of file curve.cc.
References angle(), atan2f, BevList::bevpoints, bisect_v3_v3v3v3(), calc_bevel_sin_cos(), BevPoint::cosa, cosf, BevPoint::dir, float, M_PI_2, BevList::nr, BevList::poly, BevPoint::quat, BevPoint::sina, sinf, BevPoint::vec, and vec_to_quat().
Referenced by BKE_curve_bevelList_make().
|
static |
Definition at line 2374 of file curve.cc.
References bevel_list_apply_tilt(), bevel_list_smooth(), CU_TWIST_MINIMUM, CU_TWIST_TANGENT, make_bevel_list_3D_minimum_twist(), make_bevel_list_3D_tangent(), make_bevel_list_3D_zup(), and smooth_iter().
Referenced by BKE_curve_bevelList_make().
|
static |
Definition at line 2203 of file curve.cc.
References angle(), angle_normalized_v3v3(), axis_angle_to_quat(), bevel_list_calc_bisect(), BevList::bevpoints, cross_v3_v3v3(), DEG2RADF, BevPoint::dir, float, is_cyclic(), minimum_twist_between_two_points(), mul_qt_qtqt(), mul_qt_v3(), normalize_v3(), BevList::nr, BevList::poly, BevPoint::quat, and vec_to_quat().
Referenced by make_bevel_list_3D().
|
static |
Definition at line 2324 of file curve.cc.
References bevel_list_calc_bisect(), bevel_list_flip_tangents(), BevList::bevpoints, copy_v3_v3(), cross_v3_v3v3(), BevPoint::dir, normalize_v3(), BevList::nr, BevPoint::quat, BevPoint::tan, and tri_to_quat().
Referenced by make_bevel_list_3D().
|
static |
Definition at line 2174 of file curve.cc.
References bevel_list_calc_bisect(), BevList::bevpoints, BevPoint::dir, BevList::nr, BevPoint::quat, and vec_to_quat().
Referenced by make_bevel_list_3D().
|
static |
Definition at line 2420 of file curve.cc.
References BevList::bevpoints, calc_bevel_sin_cos(), BevPoint::cosa, make_bevel_list_segment_3D(), BevPoint::sina, and BevPoint::vec.
Referenced by BKE_curve_bevelList_make().
|
static |
Definition at line 2396 of file curve.cc.
References axis_angle_to_quat(), BevList::bevpoints, copy_v3_v3(), BevPoint::dir, mul_qt_qtqt(), normalize_qt(), normalize_v3(), BevPoint::quat, sub_v3_v3v3(), BevPoint::tilt, BevPoint::vec, and vec_to_quat().
Referenced by BKE_curve_bevelList_make(), and make_bevel_list_segment_2D().
|
static |
Definition at line 1152 of file curve.cc.
References BKE_nurb_check_valid_u(), BKE_nurb_check_valid_v(), calcknots(), CU_NURB_CUSTOM, CU_NURBS, Nurb::flagu, Nurb::flagv, KNOTSU, Nurb::knotsu, KNOTSV, Nurb::knotsv, MEM_calloc_arrayN(), MEM_freeN(), Nurb::orderu, Nurb::orderv, Nurb::pntsu, Nurb::pntsv, and Nurb::type.
Referenced by BKE_nurb_knot_calc_u(), and BKE_nurb_knot_calc_v().
Definition at line 2187 of file curve.cc.
References angle(), angle_normalized_v3v3(), axis_angle_to_quat(), copy_qt_qt(), cross_v3_v3v3(), BevPoint::dir, mul_qt_qtqt(), and BevPoint::quat.
Referenced by make_bevel_list_3D_minimum_twist().
|
static |
Definition at line 4689 of file curve.cc.
References AtLeastTwoPointsRequired, CU_NURB_BEZIER, CU_NURB_CYCLIC, CU_NURB_ENDPOINT, CU_NURBS, flag, MorePointsForBezierRequired, MorePointsThanOrderRequired, MoreRowsForBezierRequired, and Valid.
Referenced by BKE_nurb_check_valid_u(), BKE_nurb_check_valid_v(), and BKE_nurb_valid_message().
|
static |
Definition at line 3980 of file curve.cc.
References BKE_nurb_handles_calc(), and nurbList_handles_swap_select().
Referenced by BKE_nurbList_handles_set().
|
static |
Workaround BKE_nurb_handles_calc logic that makes unselected align to the selected handle.
Definition at line 3966 of file curve.cc.
References Nurb::bezt, BezTriple::f1, BezTriple::f3, i, Nurb::pntsu, and SELECT.
Referenced by nurb_handles_calc__align_selected().
|
static |
Definition at line 1915 of file curve.cc.
References Nurb::bezt, CU_NURB_CYCLIC, Nurb::flagu, float, KEY_CU_EASE, key_curve_position_weights(), next, Nurb::pntsu, POINTER_OFFSET, BezTriple::radius, Nurb::radius_interp, BezTriple::tilt, Nurb::tilt_interp, and BezTriple::weight.
Referenced by BKE_curve_bevelList_make().
|
static |
Definition at line 3430 of file curve.cc.
References all(), allocate_arrays(), b, bezier_lock_unknown(), bezier_relax_direction(), bezier_restore_equation(), BLI_tridiagonal_solve_cyclic(), free_arrays(), and i.
Referenced by bezier_handle_calc_smooth_fcurve().
|
static |
Definition at line 1852 of file curve.cc.
References BevelSort::left.
Referenced by BKE_curve_bevelList_make().
Definition at line 5499 of file curve.cc.
Referenced by BKE_curve_batch_cache_dirty_tag(), and DRW_module_init().
Definition at line 5500 of file curve.cc.
Referenced by BKE_curve_batch_cache_free(), and DRW_module_init().
| IDTypeInfo IDType_ID_CU_LEGACY |