Cleanup: Rename 'TRACKBALLSIZE' to 'V3D_OP_TRACKBALLSIZE'

This commit is contained in:
Germano Cavalcante 2022-02-03 09:52:41 -03:00
parent 1963ad52ce
commit b4e06bd7d4
3 changed files with 3 additions and 3 deletions

View File

@ -114,7 +114,7 @@ void view3d_operator_properties_common(wmOperatorType *ot, const enum eV3D_OpPro
void calctrackballvec(const rcti *rect, const int event_xy[2], float r_dir[3])
{
const float radius = TRACKBALLSIZE;
const float radius = V3D_OP_TRACKBALLSIZE;
const float t = radius / (float)M_SQRT2;
const float size[2] = {BLI_rcti_size_x(rect), BLI_rcti_size_y(rect)};
/* Aspect correct so dragging in a non-square view doesn't squash the direction.

View File

@ -27,7 +27,7 @@
* Size of the sphere being dragged for trackball rotation within the view bounds.
* also affects speed (smaller is faster).
*/
#define TRACKBALLSIZE (1.1f)
#define V3D_OP_TRACKBALLSIZE (1.1f)
struct ARegion;
struct bContext;

View File

@ -201,7 +201,7 @@ static void viewrotate_apply(ViewOpsData *vod, const int event_xy[2])
sub_v3_v3v3(dvec, newvec, vod->init.trackvec);
angle = (len_v3(dvec) / (2.0f * TRACKBALLSIZE)) * (float)M_PI;
angle = (len_v3(dvec) / (2.0f * V3D_OP_TRACKBALLSIZE)) * (float)M_PI;
/* Before applying the sensitivity this is rotating 1:1,
* where the cursor would match the surface of a sphere in the view. */