Cleanup: match argument names in function & declaration
This commit is contained in:
parent
bb172dae61
commit
c5ad937f53
@ -139,8 +139,8 @@ template<typename ChannelStorageType> class ColorTheme4;
|
||||
|
||||
/* Forward declaration of precision conversion methods. */
|
||||
|
||||
BLI_INLINE ColorTheme4<float> BLI_color_convert_to_theme4f(const ColorTheme4<uint8_t> &srgb4b);
|
||||
BLI_INLINE ColorTheme4<uint8_t> BLI_color_convert_to_theme4b(const ColorTheme4<float> &srgb4f);
|
||||
BLI_INLINE ColorTheme4<float> BLI_color_convert_to_theme4f(const ColorTheme4<uint8_t> &theme4b);
|
||||
BLI_INLINE ColorTheme4<uint8_t> BLI_color_convert_to_theme4b(const ColorTheme4<float> &theme4f);
|
||||
|
||||
template<eAlpha Alpha>
|
||||
class ColorSceneLinear4f final : public ColorRGBA<float, eSpace::SceneLinear, Alpha> {
|
||||
|
@ -244,11 +244,11 @@ bool BLO_write_is_undo(BlendWriter *writer);
|
||||
void *BLO_read_get_new_data_address(BlendDataReader *reader, const void *old_address);
|
||||
void *BLO_read_get_new_data_address_no_us(BlendDataReader *reader,
|
||||
const void *old_address,
|
||||
size_t data_size);
|
||||
size_t expected_size);
|
||||
void *BLO_read_get_new_packed_address(BlendDataReader *reader, const void *old_address);
|
||||
void *BLO_read_struct_array_with_size(BlendDataReader *reader,
|
||||
const void *old_address,
|
||||
size_t data_size);
|
||||
size_t expected_size);
|
||||
|
||||
#define BLO_read_data_address(reader, ptr_p) \
|
||||
*((void **)ptr_p) = BLO_read_get_new_data_address((reader), *(ptr_p))
|
||||
|
@ -96,7 +96,9 @@ void ED_slider_allow_overshoot_set(tSlider *slider, bool lower, bool upper);
|
||||
/**
|
||||
* Set the soft limits for the slider, which are applied until the user enables overshooting.
|
||||
*/
|
||||
void ED_slider_factor_bounds_set(tSlider *slider, float lower_bound, float upper_bound);
|
||||
void ED_slider_factor_bounds_set(tSlider *slider,
|
||||
float factor_bound_lower,
|
||||
float factor_upper_bound);
|
||||
|
||||
bool ED_slider_allow_increments_get(const tSlider *slider);
|
||||
void ED_slider_allow_increments_set(tSlider *slider, bool value);
|
||||
|
@ -736,17 +736,17 @@ void ED_view3d_dist_range_get(const View3D *v3d, float r_dist_range[2]);
|
||||
bool ED_view3d_clip_range_get(const Depsgraph *depsgraph,
|
||||
const View3D *v3d,
|
||||
const RegionView3D *rv3d,
|
||||
float *r_clipsta,
|
||||
float *r_clipend,
|
||||
float *r_clip_start,
|
||||
float *r_clip_end,
|
||||
bool use_ortho_factor);
|
||||
bool ED_view3d_viewplane_get(Depsgraph *depsgraph,
|
||||
const View3D *v3d,
|
||||
const RegionView3D *rv3d,
|
||||
int winxi,
|
||||
int winyi,
|
||||
int winx,
|
||||
int winy,
|
||||
rctf *r_viewplane,
|
||||
float *r_clipsta,
|
||||
float *r_clipend,
|
||||
float *r_clip_start,
|
||||
float *r_clip_end,
|
||||
float *r_pixsize);
|
||||
|
||||
/**
|
||||
@ -770,7 +770,7 @@ void ED_view3d_calc_camera_border_size(const Scene *scene,
|
||||
bool ED_view3d_calc_render_border(
|
||||
const Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, rcti *rect);
|
||||
|
||||
void ED_view3d_clipping_calc_from_boundbox(float clip[4][4], const BoundBox *clipbb, bool is_flip);
|
||||
void ED_view3d_clipping_calc_from_boundbox(float clip[4][4], const BoundBox *bb, bool is_flip);
|
||||
void ED_view3d_clipping_calc(
|
||||
BoundBox *bb, float planes[4][4], const ARegion *region, const Object *ob, const rcti *rect);
|
||||
/**
|
||||
@ -1048,20 +1048,20 @@ void ED_view3d_update_viewmat(Depsgraph *depsgraph,
|
||||
const rcti *rect,
|
||||
bool offscreen);
|
||||
bool ED_view3d_quat_from_axis_view(char view, char view_axis_roll, float r_quat[4]);
|
||||
bool ED_view3d_quat_to_axis_view(const float viewquat[4],
|
||||
bool ED_view3d_quat_to_axis_view(const float quat[4],
|
||||
float epsilon,
|
||||
char *r_view,
|
||||
char *r_view_axis_rotation);
|
||||
char *r_view_axis_roll);
|
||||
/**
|
||||
* A version of #ED_view3d_quat_to_axis_view that updates `viewquat`
|
||||
* A version of #ED_view3d_quat_to_axis_view that updates `quat`
|
||||
* if it's within `epsilon` to an axis-view.
|
||||
*
|
||||
* \note Include the special case function since most callers need to perform these operations.
|
||||
*/
|
||||
bool ED_view3d_quat_to_axis_view_and_reset_quat(float viewquat[4],
|
||||
bool ED_view3d_quat_to_axis_view_and_reset_quat(float quat[4],
|
||||
float epsilon,
|
||||
char *r_view,
|
||||
char *r_view_axis_rotation);
|
||||
char *r_view_axis_roll);
|
||||
|
||||
char ED_view3d_lock_view_from_index(int index);
|
||||
char ED_view3d_axis_view_opposite(char view);
|
||||
|
@ -818,7 +818,7 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot)
|
||||
void ED_view3d_cursor3d_position(bContext *C,
|
||||
const int mval[2],
|
||||
const bool use_depth,
|
||||
float cursor_co[3])
|
||||
float r_cursor_co[3])
|
||||
{
|
||||
ARegion *region = CTX_wm_region(C);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
@ -832,13 +832,13 @@ void ED_view3d_cursor3d_position(bContext *C,
|
||||
return;
|
||||
}
|
||||
|
||||
ED_view3d_calc_zfac_ex(rv3d, cursor_co, &flip);
|
||||
ED_view3d_calc_zfac_ex(rv3d, r_cursor_co, &flip);
|
||||
|
||||
/* Reset the depth based on the view offset (we _know_ the offset is in front of us). */
|
||||
if (flip) {
|
||||
negate_v3_v3(cursor_co, rv3d->ofs);
|
||||
negate_v3_v3(r_cursor_co, rv3d->ofs);
|
||||
/* re initialize, no need to check flip again */
|
||||
ED_view3d_calc_zfac(rv3d, cursor_co);
|
||||
ED_view3d_calc_zfac(rv3d, r_cursor_co);
|
||||
}
|
||||
|
||||
if (use_depth) { /* maybe this should be accessed some other way */
|
||||
@ -849,15 +849,15 @@ void ED_view3d_cursor3d_position(bContext *C,
|
||||
/* Ensure the depth buffer is updated for #ED_view3d_autodist. */
|
||||
ED_view3d_depth_override(depsgraph, region, v3d, nullptr, V3D_DEPTH_NO_GPENCIL, nullptr);
|
||||
|
||||
if (ED_view3d_autodist(region, v3d, mval, cursor_co, nullptr)) {
|
||||
if (ED_view3d_autodist(region, v3d, mval, r_cursor_co, nullptr)) {
|
||||
depth_used = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (depth_used == false) {
|
||||
float depth_pt[3];
|
||||
copy_v3_v3(depth_pt, cursor_co);
|
||||
ED_view3d_win_to_3d_int(v3d, region, depth_pt, mval, cursor_co);
|
||||
copy_v3_v3(depth_pt, r_cursor_co);
|
||||
ED_view3d_win_to_3d_int(v3d, region, depth_pt, mval, r_cursor_co);
|
||||
}
|
||||
}
|
||||
|
||||
@ -865,8 +865,8 @@ void ED_view3d_cursor3d_position_rotation(bContext *C,
|
||||
const int mval[2],
|
||||
const bool use_depth,
|
||||
enum eV3DCursorOrient orientation,
|
||||
float cursor_co[3],
|
||||
float cursor_quat[4])
|
||||
float r_cursor_co[3],
|
||||
float r_cursor_quat[4])
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
@ -878,23 +878,23 @@ void ED_view3d_cursor3d_position_rotation(bContext *C,
|
||||
return;
|
||||
}
|
||||
|
||||
ED_view3d_cursor3d_position(C, mval, use_depth, cursor_co);
|
||||
ED_view3d_cursor3d_position(C, mval, use_depth, r_cursor_co);
|
||||
|
||||
if (orientation == V3D_CURSOR_ORIENT_NONE) {
|
||||
/* pass */
|
||||
}
|
||||
else if (orientation == V3D_CURSOR_ORIENT_VIEW) {
|
||||
copy_qt_qt(cursor_quat, rv3d->viewquat);
|
||||
cursor_quat[0] *= -1.0f;
|
||||
copy_qt_qt(r_cursor_quat, rv3d->viewquat);
|
||||
r_cursor_quat[0] *= -1.0f;
|
||||
}
|
||||
else if (orientation == V3D_CURSOR_ORIENT_XFORM) {
|
||||
float mat[3][3];
|
||||
ED_transform_calc_orientation_from_type(C, mat);
|
||||
mat3_to_quat(cursor_quat, mat);
|
||||
mat3_to_quat(r_cursor_quat, mat);
|
||||
}
|
||||
else if (orientation == V3D_CURSOR_ORIENT_GEOM) {
|
||||
copy_qt_qt(cursor_quat, rv3d->viewquat);
|
||||
cursor_quat[0] *= -1.0f;
|
||||
copy_qt_qt(r_cursor_quat, rv3d->viewquat);
|
||||
r_cursor_quat[0] *= -1.0f;
|
||||
|
||||
const float mval_fl[2] = {float(mval[0]), float(mval[1])};
|
||||
float ray_no[3];
|
||||
@ -927,16 +927,16 @@ void ED_view3d_cursor3d_position_rotation(bContext *C,
|
||||
nullptr) != 0)
|
||||
{
|
||||
if (use_depth) {
|
||||
copy_v3_v3(cursor_co, ray_co);
|
||||
copy_v3_v3(r_cursor_co, ray_co);
|
||||
}
|
||||
|
||||
/* Math normal (Z). */
|
||||
{
|
||||
float tquat[4];
|
||||
float z_src[3] = {0, 0, 1};
|
||||
mul_qt_v3(cursor_quat, z_src);
|
||||
mul_qt_v3(r_cursor_quat, z_src);
|
||||
rotation_between_vecs_to_quat(tquat, z_src, ray_no);
|
||||
mul_qt_qtqt(cursor_quat, tquat, cursor_quat);
|
||||
mul_qt_qtqt(r_cursor_quat, tquat, r_cursor_quat);
|
||||
}
|
||||
|
||||
/* Match object matrix (X). */
|
||||
@ -961,7 +961,7 @@ void ED_view3d_cursor3d_position_rotation(bContext *C,
|
||||
for (int axis = 0; axis < 2; axis++) {
|
||||
float tan_src[3] = {0, 0, 0};
|
||||
tan_src[axis] = 1.0f;
|
||||
mul_qt_v3(cursor_quat, tan_src);
|
||||
mul_qt_v3(r_cursor_quat, tan_src);
|
||||
|
||||
for (int axis_sign = 0; axis_sign < 2; axis_sign++) {
|
||||
float tquat_test[4];
|
||||
@ -974,7 +974,7 @@ void ED_view3d_cursor3d_position_rotation(bContext *C,
|
||||
negate_v3(tan_src);
|
||||
}
|
||||
}
|
||||
mul_qt_qtqt(cursor_quat, tquat_best, cursor_quat);
|
||||
mul_qt_qtqt(r_cursor_quat, tquat_best, r_cursor_quat);
|
||||
}
|
||||
}
|
||||
ED_transform_snap_object_context_destroy(snap_context);
|
||||
|
@ -114,8 +114,8 @@ void ED_view3d_dist_range_get(const View3D *v3d, float r_dist_range[2])
|
||||
bool ED_view3d_clip_range_get(const Depsgraph *depsgraph,
|
||||
const View3D *v3d,
|
||||
const RegionView3D *rv3d,
|
||||
float *r_clipsta,
|
||||
float *r_clipend,
|
||||
float *r_clip_start,
|
||||
float *r_clip_end,
|
||||
const bool use_ortho_factor)
|
||||
{
|
||||
CameraParams params;
|
||||
@ -129,11 +129,11 @@ bool ED_view3d_clip_range_get(const Depsgraph *depsgraph,
|
||||
params.clip_end *= fac;
|
||||
}
|
||||
|
||||
if (r_clipsta) {
|
||||
*r_clipsta = params.clip_start;
|
||||
if (r_clip_start) {
|
||||
*r_clip_start = params.clip_start;
|
||||
}
|
||||
if (r_clipend) {
|
||||
*r_clipend = params.clip_end;
|
||||
if (r_clip_end) {
|
||||
*r_clip_end = params.clip_end;
|
||||
}
|
||||
|
||||
return params.is_ortho;
|
||||
|
Loading…
Reference in New Issue
Block a user