Cleanup: warnings
This commit is contained in:
@@ -269,7 +269,7 @@ static void manipulator_arrow_modal(
|
||||
|
||||
/* first determine if view vector is really close to the direction. If it is, we use
|
||||
* vertical movement to determine offset, just like transform system does */
|
||||
if (RAD2DEG(acos(dot_v3v3(viewvec, arrow->manipulator.matrix_basis[2]))) > 5.0f) {
|
||||
if (RAD2DEGF(acosf(dot_v3v3(viewvec, arrow->manipulator.matrix_basis[2]))) > 5.0f) {
|
||||
/* multiply to projection space */
|
||||
mul_m4_v4(rv3d->persmat, orig_origin);
|
||||
mul_v4_fl(orig_origin, 1.0f / orig_origin[3]);
|
||||
@@ -316,13 +316,13 @@ static void manipulator_arrow_modal(
|
||||
const float plane_offset = dot_v3v3(plane, offset);
|
||||
const float plane_dir = dot_v3v3(plane, arrow->manipulator.matrix_basis[2]);
|
||||
const float fac = (plane_dir != 0.0f) ? (plane_offset / plane_dir) : 0.0f;
|
||||
facdir = (fac < 0.0) ? -1.0 : 1.0;
|
||||
facdir = (fac < 0.0f) ? -1.0f : 1.0f;
|
||||
if (isfinite(fac)) {
|
||||
mul_v3_v3fl(offset, arrow->manipulator.matrix_basis[2], fac);
|
||||
}
|
||||
}
|
||||
else {
|
||||
facdir = (m_diff[1] < 0.0) ? -1.0 : 1.0;
|
||||
facdir = (m_diff[1] < 0.0f) ? -1.0f : 1.0f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmManipulatorGroup *mg
|
||||
const float aspx = (float)scene->r.xsch * scene->r.xasp;
|
||||
const float aspy = (float)scene->r.ysch * scene->r.yasp;
|
||||
const int sensor_fit = BKE_camera_sensor_fit(ca->sensor_fit, aspx, aspy);
|
||||
aspect[0] = (sensor_fit == CAMERA_SENSOR_FIT_HOR) ? 1.0 : aspx / aspy;
|
||||
aspect[0] = (sensor_fit == CAMERA_SENSOR_FIT_HOR) ? 1.0f : aspx / aspy;
|
||||
aspect[1] = (sensor_fit == CAMERA_SENSOR_FIT_HOR) ? aspy / aspx : 1.0f;
|
||||
|
||||
WM_manipulator_set_matrix_location(widget, ob->obmat[3]);
|
||||
|
||||
@@ -638,7 +638,7 @@ void restoreBones(TransInfo *t);
|
||||
|
||||
/*********************** transform_manipulator.c ********** */
|
||||
|
||||
#define MANIPULATOR_AXIS_LINE_WIDTH 2.0
|
||||
#define MANIPULATOR_AXIS_LINE_WIDTH 2.0f
|
||||
|
||||
bool gimbal_axis(struct Object *ob, float gmat[3][3]); /* return 0 when no gimbal for selection */
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ void WM_manipulator_target_property_range_get(
|
||||
}
|
||||
|
||||
int WM_manipulator_target_property_array_length(
|
||||
const wmManipulator *mpr, wmManipulatorProperty *mpr_prop)
|
||||
const wmManipulator *UNUSED(mpr), wmManipulatorProperty *mpr_prop)
|
||||
{
|
||||
if (mpr_prop->custom_func.range_get_fn) {
|
||||
return mpr_prop->type->array_length;
|
||||
|
||||
Reference in New Issue
Block a user