diff options
Diffstat (limited to 'source/blender')
27 files changed, 70 insertions, 70 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 38ae0461c84..411de80ddbc 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -295,11 +295,11 @@ void DM_init(DerivedMesh *dm, DerivedMeshType type, int numVerts, int numEdges, dm->dirty = 0; /* don't use CustomData_reset(...); because we dont want to touch customdata */ - fill_vn_i(dm->vertData.typemap, CD_NUMTYPES, -1); - fill_vn_i(dm->edgeData.typemap, CD_NUMTYPES, -1); - fill_vn_i(dm->faceData.typemap, CD_NUMTYPES, -1); - fill_vn_i(dm->loopData.typemap, CD_NUMTYPES, -1); - fill_vn_i(dm->polyData.typemap, CD_NUMTYPES, -1); + copy_vn_i(dm->vertData.typemap, CD_NUMTYPES, -1); + copy_vn_i(dm->edgeData.typemap, CD_NUMTYPES, -1); + copy_vn_i(dm->faceData.typemap, CD_NUMTYPES, -1); + copy_vn_i(dm->loopData.typemap, CD_NUMTYPES, -1); + copy_vn_i(dm->polyData.typemap, CD_NUMTYPES, -1); } void DM_from_template(DerivedMesh *dm, DerivedMesh *source, DerivedMeshType type, @@ -1276,7 +1276,7 @@ static void calc_weightpaint_vert_array(Object *ob, DerivedMesh *dm, int const d else { weightpaint_color(col, dm_wcinfo, 0.0f); } - fill_vn_i((int *)r_wtcol_v, numVerts, *((int *)col)); + copy_vn_i((int *)r_wtcol_v, numVerts, *((int *)col)); } } diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index add6bb0fd0b..eced263d493 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1091,7 +1091,7 @@ static void layerDefault_mcol(void *data, int count) static void layerDefault_origindex(void *data, int count) { - fill_vn_i((int *)data, count, ORIGINDEX_NONE); + copy_vn_i((int *)data, count, ORIGINDEX_NONE); } static void layerInterp_bweight( @@ -1542,7 +1542,7 @@ static void CustomData_external_free(CustomData *data) void CustomData_reset(CustomData *data) { memset(data, 0, sizeof(*data)); - fill_vn_i(data->typemap, CD_NUMTYPES, -1); + copy_vn_i(data->typemap, CD_NUMTYPES, -1); } void CustomData_free(CustomData *data, int totelem) diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index 72133cf6460..88885da474b 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -982,7 +982,7 @@ void BKE_defvert_extract_vgroup_to_vertweights( } } else { - fill_vn_fl(r_weights, num_verts, invert_vgroup ? 1.0f : 0.0f); + copy_vn_fl(r_weights, num_verts, invert_vgroup ? 1.0f : 0.0f); } } @@ -1008,7 +1008,7 @@ void BKE_defvert_extract_vgroup_to_edgeweights( MEM_freeN(tmp_weights); } else { - fill_vn_fl(r_weights, num_edges, 0.0f); + copy_vn_fl(r_weights, num_edges, 0.0f); } } @@ -1031,7 +1031,7 @@ void BKE_defvert_extract_vgroup_to_loopweights( MEM_freeN(tmp_weights); } else { - fill_vn_fl(r_weights, num_loops, 0.0f); + copy_vn_fl(r_weights, num_loops, 0.0f); } } @@ -1060,7 +1060,7 @@ void BKE_defvert_extract_vgroup_to_polyweights( MEM_freeN(tmp_weights); } else { - fill_vn_fl(r_weights, num_polys, 0.0f); + copy_vn_fl(r_weights, num_polys, 0.0f); } } diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 40f3022c192..5230634fe4c 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -1968,7 +1968,7 @@ static void statvis_calc_thickness( BLI_assert(min <= max); - fill_vn_fl(face_dists, em->bm->totface, max); + copy_vn_fl(face_dists, em->bm->totface, max); if (use_jit) { int j; @@ -2223,7 +2223,7 @@ static void statvis_calc_sharp( (void)vertexCos; /* TODO */ - fill_vn_fl(vert_angles, em->bm->totvert, -M_PI); + copy_vn_fl(vert_angles, em->bm->totvert, -M_PI); /* first assign float values to verts */ BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) { diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.c index f3e2f395002..36b8a3264e9 100644 --- a/source/blender/blenkernel/intern/mesh_remap.c +++ b/source/blender/blenkernel/intern/mesh_remap.c @@ -707,7 +707,7 @@ void BKE_mesh_remap_calc_edges_from_dm( BLI_space_transform_apply_normal(space_transform, v2_no); } - fill_vn_fl(weights, (int)numedges_src, 0.0f); + copy_vn_fl(weights, (int)numedges_src, 0.0f); /* We adjust our ray-casting grid to ray_radius (the smaller, the more rays are cast), * with lower/upper bounds. */ @@ -1916,7 +1916,7 @@ void BKE_mesh_remap_calc_polys_from_dm( BLI_space_transform_apply_normal(space_transform, tmp_no); } - fill_vn_fl(weights, (int)numpolys_src, 0.0f); + copy_vn_fl(weights, (int)numpolys_src, 0.0f); if (UNLIKELY((size_t)mp->totloop > tmp_poly_size)) { tmp_poly_size = (size_t)mp->totloop; diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index 82a2b9c9ab2..04c2baa5359 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -308,7 +308,7 @@ void dist_ensure_v2_v2fl(float v1[2], const float v2[2], const float dist); void axis_sort_v3(const float axis_values[3], int r_axis_order[3]); /***************************** Array Functions *******************************/ -/* attempted to follow fixed length vertex functions. names could be improved*/ +/* follow fixed length vector function conventions. */ double dot_vn_vn(const float *array_src_a, const float *array_src_b, const int size) ATTR_WARN_UNUSED_RESULT; double len_squared_vn(const float *array, const int size) ATTR_WARN_UNUSED_RESULT; float normalize_vn_vn(float *array_tar, const float *array_src, const int size); @@ -329,11 +329,11 @@ void sub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_ void msub_vn_vn(float *array_tar, const float *array_src, const float f, const int size); void msub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const float f, const int size); void interp_vn_vn(float *array_tar, const float *array_src, const float t, const int size); -void fill_vn_i(int *array_tar, const int size, const int val); -void fill_vn_short(short *array_tar, const int size, const short val); -void fill_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val); -void fill_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val); -void fill_vn_fl(float *array_tar, const int size, const float val); +void copy_vn_i(int *array_tar, const int size, const int val); +void copy_vn_short(short *array_tar, const int size, const short val); +void copy_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val); +void copy_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val); +void copy_vn_fl(float *array_tar, const int size, const float val); /**************************** Inline Definitions ******************************/ diff --git a/source/blender/blenlib/intern/astar.c b/source/blender/blenlib/intern/astar.c index b7b41d2497e..311d6dd89ae 100644 --- a/source/blender/blenlib/intern/astar.c +++ b/source/blender/blenlib/intern/astar.c @@ -229,7 +229,7 @@ bool BLI_astar_graph_solve( r_solution->steps = 0; prev_nodes[node_index_src] = -1; BLI_BITMAP_SET_ALL(done_nodes, false, as_graph->node_num); - fill_vn_fl(g_costs, as_graph->node_num, FLT_MAX); + copy_vn_fl(g_costs, as_graph->node_num, FLT_MAX); g_costs[node_index_src] = 0.0f; g_steps[node_index_src] = 0; diff --git a/source/blender/blenlib/intern/math_interp.c b/source/blender/blenlib/intern/math_interp.c index 67850463fe2..b45d8b4c13b 100644 --- a/source/blender/blenlib/intern/math_interp.c +++ b/source/blender/blenlib/intern/math_interp.c @@ -112,10 +112,10 @@ BLI_INLINE void bicubic_interpolation(const unsigned char *byte_buffer, const fl /* sample area entirely outside image? */ if (ceil(u) < 0 || floor(u) > width - 1 || ceil(v) < 0 || floor(v) > height - 1) { if (float_output) { - fill_vn_fl(float_output, components, 0.0f); + copy_vn_fl(float_output, components, 0.0f); } if (byte_output) { - fill_vn_uchar(byte_output, components, 0); + copy_vn_uchar(byte_output, components, 0); } return; } @@ -281,7 +281,7 @@ BLI_INLINE void bilinear_interpolation(const unsigned char *byte_buffer, const f /* sample area entirely outside image? */ if (x2 < 0 || x1 > width - 1 || y2 < 0 || y1 > height - 1) { - fill_vn_fl(float_output, components, 0.0f); + copy_vn_fl(float_output, components, 0.0f); return; } @@ -323,7 +323,7 @@ BLI_INLINE void bilinear_interpolation(const unsigned char *byte_buffer, const f /* sample area entirely outside image? */ if (x2 < 0 || x1 > width - 1 || y2 < 0 || y1 > height - 1) { - fill_vn_uchar(byte_output, components, 0); + copy_vn_uchar(byte_output, components, 0); return; } diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 8f536bfe75c..88eccd60352 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -876,7 +876,7 @@ float normalize_vn_vn(float *array_tar, const float *array_src, const int size) mul_vn_vn_fl(array_tar, array_src, size, 1.0f / d_sqrt); } else { - fill_vn_fl(array_tar, size, 0.0f); + copy_vn_fl(array_tar, size, 0.0f); d_sqrt = 0.0f; } return d_sqrt; @@ -1051,7 +1051,7 @@ void interp_vn_vn(float *array_tar, const float *array_src, const float t, const } } -void fill_vn_i(int *array_tar, const int size, const int val) +void copy_vn_i(int *array_tar, const int size, const int val) { int *tar = array_tar + (size - 1); int i = size; @@ -1060,7 +1060,7 @@ void fill_vn_i(int *array_tar, const int size, const int val) } } -void fill_vn_short(short *array_tar, const int size, const short val) +void copy_vn_short(short *array_tar, const int size, const short val) { short *tar = array_tar + (size - 1); int i = size; @@ -1069,7 +1069,7 @@ void fill_vn_short(short *array_tar, const int size, const short val) } } -void fill_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val) +void copy_vn_ushort(unsigned short *array_tar, const int size, const unsigned short val) { unsigned short *tar = array_tar + (size - 1); int i = size; @@ -1078,7 +1078,7 @@ void fill_vn_ushort(unsigned short *array_tar, const int size, const unsigned sh } } -void fill_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val) +void copy_vn_uchar(unsigned char *array_tar, const int size, const unsigned char val) { unsigned char *tar = array_tar + (size - 1); int i = size; @@ -1087,7 +1087,7 @@ void fill_vn_uchar(unsigned char *array_tar, const int size, const unsigned char } } -void fill_vn_fl(float *array_tar, const int size, const float val) +void copy_vn_fl(float *array_tar, const int size, const float val) { float *tar = array_tar + (size - 1); int i = size; diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 734dc33ea24..72a320281fe 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -845,7 +845,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main) Object *ob; for (ob = main->object.first; ob; ob = ob->id.next) { if (is_zero_v3(ob->dscale)) { - fill_vn_fl(ob->dscale, 3, 1.0f); + copy_vn_fl(ob->dscale, 3, 1.0f); } } } diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c index 169af6f62c3..30ac76ab7e1 100644 --- a/source/blender/bmesh/intern/bmesh_interp.c +++ b/source/blender/bmesh/intern/bmesh_interp.c @@ -1057,7 +1057,7 @@ LinkNode *BM_vert_loop_groups_data_layer_create( mul_vn_fl(lf->data_weights, lf->data_len, 1.0f / lwc.weight_accum); } else { - fill_vn_fl(lf->data_weights, lf->data_len, 1.0f / (float)lf->data_len); + copy_vn_fl(lf->data_weights, lf->data_len, 1.0f / (float)lf->data_len); } BLI_linklist_prepend_arena(&groups, lf, lwc.arena); diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c index 09c7b932b7a..6d3b738a462 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c +++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c @@ -190,7 +190,7 @@ void BM_mesh_decimate_dissolve_ex( /* prepare for cleanup */ BM_mesh_elem_index_ensure(bm, BM_VERT); vert_reverse_lookup = MEM_mallocN(sizeof(int) * bm->totvert, __func__); - fill_vn_i(vert_reverse_lookup, bm->totvert, -1); + copy_vn_i(vert_reverse_lookup, bm->totvert, -1); for (i = 0; i < vinput_len; i++) { BMVert *v = vinput_arr[i]; vert_reverse_lookup[BM_elem_index_get(v)] = i; diff --git a/source/blender/bmesh/tools/bmesh_path.c b/source/blender/bmesh/tools/bmesh_path.c index 8ae3507a738..6633803414b 100644 --- a/source/blender/bmesh/tools/bmesh_path.c +++ b/source/blender/bmesh/tools/bmesh_path.c @@ -126,7 +126,7 @@ LinkNode *BM_mesh_calc_path_vert( verts_prev = MEM_callocN(sizeof(*verts_prev) * totvert, __func__); cost = MEM_mallocN(sizeof(*cost) * totvert, __func__); - fill_vn_fl(cost, totvert, 1e20f); + copy_vn_fl(cost, totvert, 1e20f); /* * Arrays are now filled as follows: @@ -252,7 +252,7 @@ LinkNode *BM_mesh_calc_path_edge( edges_prev = MEM_callocN(sizeof(*edges_prev) * totedge, "SeamPathPrevious"); cost = MEM_mallocN(sizeof(*cost) * totedge, "SeamPathCost"); - fill_vn_fl(cost, totedge, 1e20f); + copy_vn_fl(cost, totedge, 1e20f); /* * Arrays are now filled as follows: @@ -378,7 +378,7 @@ LinkNode *BM_mesh_calc_path_face( faces_prev = MEM_callocN(sizeof(*faces_prev) * totface, __func__); cost = MEM_mallocN(sizeof(*cost) * totface, __func__); - fill_vn_fl(cost, totface, 1e20f); + copy_vn_fl(cost, totface, 1e20f); /* * Arrays are now filled as follows: diff --git a/source/blender/editors/sculpt_paint/paint_vertex_proj.c b/source/blender/editors/sculpt_paint/paint_vertex_proj.c index ae729248f7e..c939eb6df35 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex_proj.c +++ b/source/blender/editors/sculpt_paint/paint_vertex_proj.c @@ -186,7 +186,7 @@ static void vpaint_proj_dm_map_cosnos_update(struct VertProjHandle *vp_handle, /* highly unlikely this will become unavailable once painting starts (perhaps with animated modifiers) */ if (LIKELY(dm->foreachMappedVert)) { - fill_vn_fl(vp_handle->dists_sq, me->totvert, FLT_MAX); + copy_vn_fl(vp_handle->dists_sq, me->totvert, FLT_MAX); dm->foreachMappedVert(dm, vpaint_proj_dm_map_cosnos_update__map_cb, &vp_update, DM_FOREACH_USE_NORMAL); } diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 87fe29325bc..1f8a69adba0 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -199,7 +199,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float bool has_skinradius = false; PointerRNA data_ptr; - fill_vn_fl(median, NBR_TRANSFORM_PROPERTIES, 0.0f); + copy_vn_fl(median, NBR_TRANSFORM_PROPERTIES, 0.0f); tot = totedgedata = totcurvedata = totlattdata = totcurvebweight = 0; /* make sure we got storage */ diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 3cf0c53d564..7d80044762c 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -6017,7 +6017,7 @@ static bool createEdgeSlideVerts(TransInfo *t) loop_dir = MEM_callocN(sizeof(float) * 3 * loop_nr, "sv loop_dir"); loop_maxdist = MEM_mallocN(sizeof(float) * loop_nr, "sv loop_maxdist"); - fill_vn_fl(loop_maxdist, loop_nr, -1.0f); + copy_vn_fl(loop_maxdist, loop_nr, -1.0f); BM_ITER_MESH (e, &iter, bm, BM_EDGES_OF_MESH) { if (BM_elem_flag_test(e, BM_ELEM_SELECT)) { diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 8aa26c32413..9efbc1bc549 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -2124,7 +2124,7 @@ static struct TransIslandData *editmesh_islands_info_calc(BMEditMesh *em, int *r vert_map = MEM_mallocN(sizeof(*vert_map) * bm->totvert, __func__); /* we shouldn't need this, but with incorrect selection flushing * its possible we have a selected vertex thats not in a face, for now best not crash in that case. */ - fill_vn_i(vert_map, bm->totvert, -1); + copy_vn_i(vert_map, bm->totvert, -1); BM_mesh_elem_table_ensure(bm, htype); ele_array = (htype == BM_FACE) ? (void **)bm->ftable : (void **)bm->etable; diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index 050631362b4..effb45a61ab 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -73,14 +73,14 @@ void initNumInput(NumInput *n) { n->idx_max = 0; n->unit_sys = USER_UNIT_NONE; - fill_vn_i(n->unit_type, NUM_MAX_ELEMENTS, B_UNIT_NONE); + copy_vn_i(n->unit_type, NUM_MAX_ELEMENTS, B_UNIT_NONE); n->unit_use_radians = false; n->flag = 0; - fill_vn_short(n->val_flag, NUM_MAX_ELEMENTS, 0); + copy_vn_short(n->val_flag, NUM_MAX_ELEMENTS, 0); zero_v3(n->val); - fill_vn_fl(n->val_org, NUM_MAX_ELEMENTS, 0.0f); - fill_vn_fl(n->val_inc, NUM_MAX_ELEMENTS, 1.0f); + copy_vn_fl(n->val_org, NUM_MAX_ELEMENTS, 0.0f); + copy_vn_fl(n->val_inc, NUM_MAX_ELEMENTS, 1.0f); n->idx = 0; n->str[0] = '\0'; diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 2ec7fe677ae..37070a37c05 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -2120,7 +2120,7 @@ static int uv_mouse_select(bContext *C, const float co[2], bool extend, bool loo /* mark 1 vertex as being hit */ hitv = BLI_array_alloca(hitv, hit.efa->len); hituv = BLI_array_alloca(hituv, hit.efa->len); - fill_vn_i(hitv, hit.efa->len, 0xFFFFFFFF); + copy_vn_i(hitv, hit.efa->len, 0xFFFFFFFF); hitv[hit.lindex] = BM_elem_index_get(hit.l->v); hituv[hit.lindex] = hit.luv->uv; @@ -2137,7 +2137,7 @@ static int uv_mouse_select(bContext *C, const float co[2], bool extend, bool loo /* mark 2 edge vertices as being hit */ hitv = BLI_array_alloca(hitv, hit.efa->len); hituv = BLI_array_alloca(hituv, hit.efa->len); - fill_vn_i(hitv, hit.efa->len, 0xFFFFFFFF); + copy_vn_i(hitv, hit.efa->len, 0xFFFFFFFF); hitv[hit.lindex] = BM_elem_index_get(hit.l->v); hitv[(hit.lindex + 1) % hit.efa->len] = BM_elem_index_get(hit.l->next->v); diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 4d58642e9c4..62097635296 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -454,7 +454,7 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image) if (bitspersample == 32) { if (chan == 3 && spp == 3) /* fill alpha if only RGB TIFF */ - fill_vn_fl(fbuf, ibuf->x, 1.0f); + copy_vn_fl(fbuf, ibuf->x, 1.0f); else if (chan >= spp) /* for grayscale, duplicate first channel into G and B */ success |= TIFFReadScanline(image, fbuf, row, 0); else @@ -464,7 +464,7 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image) } else if (bitspersample == 16) { if (chan == 3 && spp == 3) /* fill alpha if only RGB TIFF */ - fill_vn_ushort(sbuf, ibuf->x, 65535); + copy_vn_ushort(sbuf, ibuf->x, 65535); else if (chan >= spp) /* for grayscale, duplicate first channel into G and B */ success |= TIFFReadScanline(image, fbuf, row, 0); else diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 92f8ad62924..8bb3e9c265b 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1387,7 +1387,7 @@ static void rna_Object_boundbox_get(PointerRNA *ptr, float *values) memcpy(values, bb->vec, sizeof(bb->vec)); } else { - fill_vn_fl(values, sizeof(bb->vec) / sizeof(float), 0.0f); + copy_vn_fl(values, sizeof(bb->vec) / sizeof(float), 0.0f); } } diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 8ebee0dc1b4..44660b15c3c 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -364,22 +364,22 @@ static void dm_merge_transform( /* set origindex */ index_orig = result->getVertDataArray(result, CD_ORIGINDEX); if (index_orig) { - fill_vn_i(index_orig + cap_verts_index, cap_nverts, ORIGINDEX_NONE); + copy_vn_i(index_orig + cap_verts_index, cap_nverts, ORIGINDEX_NONE); } index_orig = result->getEdgeDataArray(result, CD_ORIGINDEX); if (index_orig) { - fill_vn_i(index_orig + cap_edges_index, cap_nedges, ORIGINDEX_NONE); + copy_vn_i(index_orig + cap_edges_index, cap_nedges, ORIGINDEX_NONE); } index_orig = result->getPolyDataArray(result, CD_ORIGINDEX); if (index_orig) { - fill_vn_i(index_orig + cap_polys_index, cap_npolys, ORIGINDEX_NONE); + copy_vn_i(index_orig + cap_polys_index, cap_npolys, ORIGINDEX_NONE); } index_orig = result->getLoopDataArray(result, CD_ORIGINDEX); if (index_orig) { - fill_vn_i(index_orig + cap_loops_index, cap_nloops, ORIGINDEX_NONE); + copy_vn_i(index_orig + cap_loops_index, cap_nloops, ORIGINDEX_NONE); } } @@ -525,7 +525,7 @@ static DerivedMesh *arrayModifier_doArray( if (use_merge) { /* Will need full_doubles_map for handling merge */ full_doubles_map = MEM_mallocN(sizeof(int) * result_nverts, "mod array doubles map"); - fill_vn_i(full_doubles_map, result_nverts, -1); + copy_vn_i(full_doubles_map, result_nverts, -1); } /* copy customdata to original geometry */ diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c index 295f303974d..162f45b4e91 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.c +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c @@ -391,7 +391,7 @@ static void smooth_verts( smooth_weights); } else { - fill_vn_fl(smooth_weights, (int)numVerts, 1.0f); + copy_vn_fl(smooth_weights, (int)numVerts, 1.0f); } if (csmd->flag & MOD_CORRECTIVESMOOTH_PIN_BOUNDARY) { diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c index 50b1404a8e5..5ebb3f98f6c 100644 --- a/source/blender/modifiers/intern/MOD_skin.c +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -1801,7 +1801,7 @@ static void skin_set_orig_indices(DerivedMesh *dm) totpoly = dm->getNumPolys(dm); orig = CustomData_add_layer(&dm->polyData, CD_ORIGINDEX, CD_CALLOC, NULL, totpoly); - fill_vn_i(orig, totpoly, ORIGINDEX_NONE); + copy_vn_i(orig, totpoly, ORIGINDEX_NONE); } /* diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index c96080d8cf9..fdba8e54a98 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -298,7 +298,7 @@ static DerivedMesh *applyModifier( /* save doing 2 loops here... */ #if 0 - fill_vn_i(edge_users, numEdges, INVALID_UNUSED); + copy_vn_i(edge_users, numEdges, INVALID_UNUSED); #endif for (eidx = 0, ed = orig_medge; eidx < numEdges; eidx++, ed++) { @@ -505,7 +505,7 @@ static DerivedMesh *applyModifier( unsigned int i; vert_lens = MEM_mallocN(sizeof(float) * numVerts, "vert_lens"); - fill_vn_fl(vert_lens, (int)numVerts, FLT_MAX); + copy_vn_fl(vert_lens, (int)numVerts, FLT_MAX); for (i = 0; i < numEdges; i++) { const float ed_len_sq = len_squared_v3v3(mvert[medge[i].v1].co, mvert[medge[i].v2].co); vert_lens[medge[i].v1] = min_ff(vert_lens[medge[i].v1], ed_len_sq); @@ -672,7 +672,7 @@ static DerivedMesh *applyModifier( float *vert_lens_sq = MEM_mallocN(sizeof(float) * numVerts, "vert_lens"); const float offset = fabsf(smd->offset) * smd->offset_clamp; const float offset_sq = offset * offset; - fill_vn_fl(vert_lens_sq, (int)numVerts, FLT_MAX); + copy_vn_fl(vert_lens_sq, (int)numVerts, FLT_MAX); for (i = 0; i < numEdges; i++) { const float ed_len = len_squared_v3v3(mvert[medge[i].v1].co, mvert[medge[i].v2].co); vert_lens_sq[medge[i].v1] = min_ff(vert_lens_sq[medge[i].v1], ed_len); diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index 67905f8e340..91e2a635400 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -1858,7 +1858,7 @@ static PyObject *Matrix_zero(MatrixObject *self) if (BaseMath_Prepare_ForWrite(self) == -1) return NULL; - fill_vn_fl(self->matrix, self->num_col * self->num_row, 0.0f); + copy_vn_fl(self->matrix, self->num_col * self->num_row, 0.0f); if (BaseMath_WriteCallback(self) == -1) return NULL; diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index a33b55c35dc..3d7a505eb12 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -76,7 +76,7 @@ static PyObject *Vector_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return NULL; } - fill_vn_fl(vec, size, 0.0f); + copy_vn_fl(vec, size, 0.0f); break; case 1: if ((size = mathutils_array_parse_alloc(&vec, 2, PyTuple_GET_ITEM(args, 0), "mathutils.Vector()")) == -1) { @@ -142,7 +142,7 @@ static PyObject *C_Vector_Fill(PyObject *cls, PyObject *args) return NULL; } - fill_vn_fl(vec, size, fill); + copy_vn_fl(vec, size, fill); return Vector_CreatePyObject_alloc(vec, size, (PyTypeObject *)cls); } @@ -339,7 +339,7 @@ static PyObject *Vector_zero(VectorObject *self) if (BaseMath_Prepare_ForWrite(self) == -1) return NULL; - fill_vn_fl(self->vec, self->size, 0.0f); + copy_vn_fl(self->vec, self->size, 0.0f); if (BaseMath_WriteCallback(self) == -1) return NULL; @@ -426,7 +426,7 @@ static PyObject *Vector_resize(VectorObject *self, PyObject *value) /* If the vector has increased in length, set all new elements to 0.0f */ if (size > self->size) { - fill_vn_fl(self->vec + self->size, size - self->size, 0.0f); + copy_vn_fl(self->vec + self->size, size - self->size, 0.0f); } self->size = size; @@ -465,7 +465,7 @@ static PyObject *Vector_resized(VectorObject *self, PyObject *value) return NULL; } - fill_vn_fl(vec, size, 0.0f); + copy_vn_fl(vec, size, 0.0f); memcpy(vec, self->vec, self->size * sizeof(float)); return Vector_CreatePyObject_alloc(vec, size, NULL); @@ -2236,7 +2236,7 @@ static int Vector_length_set(VectorObject *self, PyObject *value) return -1; } if (param == 0.0) { - fill_vn_fl(self->vec, self->size, 0.0f); + copy_vn_fl(self->vec, self->size, 0.0f); return 0; } @@ -3030,7 +3030,7 @@ PyObject *Vector_CreatePyObject( memcpy(self->vec, vec, size * sizeof(float)); } else { /* new empty */ - fill_vn_fl(self->vec, size, 0.0f); + copy_vn_fl(self->vec, size, 0.0f); if (size == 4) { /* do the homogeneous thing */ self->vec[3] = 1.0f; } |