[Bf-blender-cvs] [a3a6b71a9d2] master: Cleanup: pass const matrices
Campbell Barton
noreply at git.blender.org
Sun Aug 2 09:18:21 CEST 2020
Commit: a3a6b71a9d29d2936bb14eb95f5073d68601cf36
Author: Campbell Barton
Date: Sun Aug 2 17:17:31 2020 +1000
Branches: master
https://developer.blender.org/rBa3a6b71a9d29d2936bb14eb95f5073d68601cf36
Cleanup: pass const matrices
Also order return matrices last.
===================================================================
M source/blender/blenkernel/BKE_armature.h
M source/blender/blenkernel/BKE_curve.h
M source/blender/blenkernel/BKE_gpencil_geom.h
M source/blender/blenkernel/BKE_lattice.h
M source/blender/blenkernel/BKE_mesh.h
M source/blender/blenkernel/BKE_object.h
M source/blender/blenkernel/intern/armature.c
M source/blender/blenkernel/intern/curve.c
M source/blender/blenkernel/intern/gpencil_geom.c
M source/blender/blenkernel/intern/lattice.c
M source/blender/blenkernel/intern/mball_tessellate.c
M source/blender/blenkernel/intern/mesh.c
M source/blender/blenkernel/intern/object.c
M source/blender/blenlib/BLI_uvproject.h
M source/blender/blenlib/intern/uvproject.c
M source/blender/draw/engines/eevee/eevee_render.c
M source/blender/editors/armature/armature_utils.c
M source/blender/editors/include/ED_armature.h
M source/blender/editors/include/ED_view3d.h
M source/blender/editors/include/ED_view3d_offscreen.h
M source/blender/editors/object/object_add.c
M source/blender/editors/space_view3d/view3d_draw.c
M source/blender/editors/space_view3d/view3d_edit.c
M source/blender/editors/space_view3d/view3d_project.c
M source/blender/editors/space_view3d/view3d_utils.c
M source/blender/makesrna/intern/rna_curve_api.c
M source/blender/render/extern/include/RE_pipeline.h
M source/blender/render/intern/source/initrender.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 6fb6675a05a..301aa4538a7 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -123,22 +123,24 @@ void get_objectspace_bone_matrix(struct Bone *bone,
float M_accumulatedMatrix[4][4],
int root,
int posed);
-void vec_roll_to_mat3(const float vec[3], const float roll, float mat[3][3]);
-void vec_roll_to_mat3_normalized(const float nor[3], const float roll, float mat[3][3]);
+void vec_roll_to_mat3(const float vec[3], const float roll, float r_mat[3][3]);
+void vec_roll_to_mat3_normalized(const float nor[3], const float roll, float r_mat[3][3]);
void mat3_to_vec_roll(const float mat[3][3], float r_vec[3], float *r_roll);
void mat3_vec_to_roll(const float mat[3][3], const float vec[3], float *r_roll);
/* Common Conversions Between Co-ordinate Spaces */
-void BKE_armature_mat_world_to_pose(struct Object *ob, float inmat[4][4], float outmat[4][4]);
+void BKE_armature_mat_world_to_pose(struct Object *ob,
+ const float inmat[4][4],
+ float outmat[4][4]);
void BKE_armature_loc_world_to_pose(struct Object *ob, const float inloc[3], float outloc[3]);
void BKE_armature_mat_pose_to_bone(struct bPoseChannel *pchan,
- float inmat[4][4],
+ const float inmat[4][4],
float outmat[4][4]);
void BKE_armature_loc_pose_to_bone(struct bPoseChannel *pchan,
const float inloc[3],
float outloc[3]);
void BKE_armature_mat_bone_to_pose(struct bPoseChannel *pchan,
- float inmat[4][4],
+ const float inmat[4][4],
float outmat[4][4]);
void BKE_armature_mat_pose_to_delta(float delta_mat[4][4],
float pose_mat[4][4],
@@ -147,13 +149,13 @@ void BKE_armature_mat_pose_to_delta(float delta_mat[4][4],
void BKE_armature_mat_pose_to_bone_ex(struct Depsgraph *depsgraph,
struct Object *ob,
struct bPoseChannel *pchan,
- float inmat[4][4],
+ const float inmat[4][4],
float outmat[4][4]);
-void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, float mat[3][3], bool use_compat);
-void BKE_pchan_rot_to_mat3(const struct bPoseChannel *pchan, float mat[3][3]);
-void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, float mat[4][4], bool use_comat);
-void BKE_pchan_to_mat4(const struct bPoseChannel *pchan, float chan_mat[4][4]);
+void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, const float mat[3][3], bool use_compat);
+void BKE_pchan_rot_to_mat3(const struct bPoseChannel *pchan, float r_mat[3][3]);
+void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, const float mat[4][4], bool use_comat);
+void BKE_pchan_to_mat4(const struct bPoseChannel *pchan, float r_mat[4][4]);
void BKE_pchan_calc_mat(struct bPoseChannel *pchan);
/* Simple helper, computes the offset bone matrix. */
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h
index ca41e51984b..3f7b978287d 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -98,15 +98,15 @@ bool BKE_curve_minmax(struct Curve *cu, bool use_radius, float min[3], float max
bool BKE_curve_center_median(struct Curve *cu, float cent[3]);
bool BKE_curve_center_bounds(struct Curve *cu, float cent[3]);
void BKE_curve_transform_ex(struct Curve *cu,
- float mat[4][4],
+ const float mat[4][4],
const bool do_keys,
const bool do_props,
const float unit_scale);
void BKE_curve_transform(struct Curve *cu,
- float mat[4][4],
+ const float mat[4][4],
const bool do_keys,
const bool do_props);
-void BKE_curve_translate(struct Curve *cu, float offset[3], const bool do_keys);
+void BKE_curve_translate(struct Curve *cu, const float offset[3], const bool do_keys);
void BKE_curve_material_index_remove(struct Curve *cu, int index);
bool BKE_curve_material_index_used(struct Curve *cu, int index);
void BKE_curve_material_index_clear(struct Curve *cu);
diff --git a/source/blender/blenkernel/BKE_gpencil_geom.h b/source/blender/blenkernel/BKE_gpencil_geom.h
index 964764d99e7..c97461fb0c8 100644
--- a/source/blender/blenkernel/BKE_gpencil_geom.h
+++ b/source/blender/blenkernel/BKE_gpencil_geom.h
@@ -76,7 +76,7 @@ void BKE_gpencil_stroke_fill_triangulate(struct bGPDstroke *gps);
void BKE_gpencil_stroke_geometry_update(struct bGPDstroke *gps);
void BKE_gpencil_stroke_uv_update(struct bGPDstroke *gps);
-void BKE_gpencil_transform(struct bGPdata *gpd, float mat[4][4]);
+void BKE_gpencil_transform(struct bGPdata *gpd, const float mat[4][4]);
typedef struct GPencilPointCoordinates {
/* This is used when doing "move only origin" in object_data_transform.c.
diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h
index bb23ad63020..fdcea95704f 100644
--- a/source/blender/blenkernel/BKE_lattice.h
+++ b/source/blender/blenkernel/BKE_lattice.h
@@ -67,8 +67,8 @@ void BKE_lattice_minmax_dl(struct Object *ob, struct Lattice *lt, float min[3],
void BKE_lattice_minmax(struct Lattice *lt, float min[3], float max[3]);
void BKE_lattice_center_median(struct Lattice *lt, float cent[3]);
void BKE_lattice_center_bounds(struct Lattice *lt, float cent[3]);
-void BKE_lattice_translate(struct Lattice *lt, float offset[3], bool do_keys);
-void BKE_lattice_transform(struct Lattice *lt, float mat[4][4], bool do_keys);
+void BKE_lattice_translate(struct Lattice *lt, const float offset[3], bool do_keys);
+void BKE_lattice_transform(struct Lattice *lt, const float mat[4][4], bool do_keys);
bool BKE_lattice_is_any_selected(const struct Lattice *lt);
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index b2510be656e..e0bedd20617 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -231,7 +231,7 @@ void BKE_mesh_nomain_to_meshkey(struct Mesh *mesh_src, struct Mesh *mesh_dst, st
/* vertex level transformations & checks (no derived mesh) */
bool BKE_mesh_minmax(const struct Mesh *me, float r_min[3], float r_max[3]);
-void BKE_mesh_transform(struct Mesh *me, float mat[4][4], bool do_keys);
+void BKE_mesh_transform(struct Mesh *me, const float mat[4][4], bool do_keys);
void BKE_mesh_translate(struct Mesh *me, const float offset[3], const bool do_keys);
void BKE_mesh_ensure_navmesh(struct Mesh *me);
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index f2a022c84a3..7f2bdccf3a4 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -144,21 +144,21 @@ struct Object *BKE_object_duplicate(struct Main *bmain,
void BKE_object_obdata_size_init(struct Object *ob, const float scale);
-void BKE_object_scale_to_mat3(struct Object *ob, float mat[3][3]);
-void BKE_object_rot_to_mat3(const struct Object *ob, float mat[3][3], bool use_drot);
-void BKE_object_mat3_to_rot(struct Object *ob, float mat[3][3], bool use_compat);
-void BKE_object_to_mat3(struct Object *ob, float mat[3][3]);
-void BKE_object_to_mat4(struct Object *ob, float mat[4][4]);
+void BKE_object_scale_to_mat3(struct Object *ob, float r_mat[3][3]);
+void BKE_object_rot_to_mat3(const struct Object *ob, float r_mat[3][3], bool use_drot);
+void BKE_object_mat3_to_rot(struct Object *ob, float r_mat[3][3], bool use_compat);
+void BKE_object_to_mat3(struct Object *ob, float r_mat[3][3]);
+void BKE_object_to_mat4(struct Object *ob, float r_mat[4][4]);
void BKE_object_apply_mat4(struct Object *ob,
- float mat[4][4],
+ const float mat[4][4],
const bool use_compat,
const bool use_parent);
void BKE_object_apply_mat4_ex(struct Object *ob,
- float mat[4][4],
+ const float mat[4][4],
struct Object *parent,
- float parentinv[4][4],
+ const float parentinv[4][4],
const bool use_compat);
-void BKE_object_matrix_local_get(struct Object *ob, float mat[4][4]);
+void BKE_object_matrix_local_get(struct Object *ob, float r_mat[4][4]);
bool BKE_object_pose_context_check(const struct Object *ob);
struct Object *BKE_object_pose_armature_get(struct Object *ob);
@@ -188,7 +188,7 @@ struct Base **BKE_object_pose_base_array_get(struct ViewLayer *view_layer,
struct View3D *v3d,
unsigned int *r_bases_len);
-void BKE_object_get_parent_matrix(struct Object *ob, struct Object *par, float parentmat[4][4]);
+void BKE_object_get_parent_matrix(struct Object *ob, struct Object *par, float r_parentmat[4][4]);
void BKE_object_where_is_calc(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob);
void BKE_object_where_is_calc_ex(struct Depsgraph *depsgraph,
struct Scene *scene,
@@ -199,7 +199,7 @@ void BKE_object_where_is_calc_time(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob,
float ctime);
-void BKE_object_where_is_calc_mat4(struct Object *ob, float obmat[4][4]);
+void BKE_object_where_is_calc_mat4(struct Object *ob, float r_obmat[4][4]);
/* possibly belong in own moduke? */
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list