Cleanup: spelling in comments

Also update viewport comments.
This commit is contained in:
Campbell Barton 2022-02-04 16:06:15 +11:00
parent 39a1b51efd
commit 5a4eadc2e7
7 changed files with 13 additions and 14 deletions

View File

@ -130,9 +130,9 @@ bool BKE_collection_object_add(struct Main *bmain,
struct Collection *collection,
struct Object *ob);
/**
* Same as #BKE_collection_object_add, but uncondionnaly adds the object to the given collection.
* Same as #BKE_collection_object_add, but unconditionally adds the object to the given collection.
*
* NOTE: required in certain cases, like do-versionning or complex ID management tasks.
* NOTE: required in certain cases, like do-versioning or complex ID management tasks.
*/
bool BKE_collection_object_add_notest(struct Main *bmain,
struct Collection *collection,

View File

@ -34,7 +34,7 @@
#include "MEM_guardedalloc.h"
/* General note on iterating vers/loops/edges/polys and end mode.
/* General note on iterating verts/loops/edges/polys and end mode.
*
* The edit mesh pointer is set for both final and cage meshes in both cases when there are
* modifiers applied and not. This helps consistency of checks in the draw manager, where the

View File

@ -1036,7 +1036,7 @@ static void draw_rotation_guide(const RegionView3D *rv3d)
negate_v3_v3(o, rv3d->ofs);
GPU_blend(GPU_BLEND_ALPHA);
GPU_depth_mask(false); /* don't overwrite zbuf */
GPU_depth_mask(false); /* Don't overwrite the Z-buffer. */
GPUVertFormat *format = immVertexFormat();
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);

View File

@ -254,7 +254,7 @@ bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3])
}
}
else {
/* If there's no selection, lastofs is unmodified and last value since static */
/* If there's no selection, `lastofs` is unmodified and last value since static. */
is_set = calculateTransformCenter(C, V3D_AROUND_CENTER_MEDIAN, lastofs, NULL);
}
@ -300,7 +300,7 @@ void viewops_data_create(bContext *C,
if (viewops_flag & VIEWOPS_FLAG_DEPTH_NAVIGATE) {
float fallback_depth_pt[3];
view3d_operator_needs_opengl(C); /* needed for zbuf drawing */
view3d_operator_needs_opengl(C); /* Needed for Z-buffer drawing. */
negate_v3_v3(fallback_depth_pt, rv3d->ofs);
@ -356,8 +356,8 @@ void viewops_data_create(bContext *C,
if (viewops_flag & VIEWOPS_FLAG_DEPTH_NAVIGATE) {
if (vod->use_dyn_ofs) {
if (rv3d->is_persp) {
float my_origin[3]; /* original G.vd->ofs */
float my_pivot[3]; /* view */
float my_origin[3]; /* Original #RegionView3D.ofs. */
float my_pivot[3]; /* View pivot. */
float dvec[3];
/* locals for dist correction */

View File

@ -205,7 +205,7 @@ static void view3d_ndof_orbit(const struct wmNDOFMotionData *ndof,
/* Perform the orbital rotation */
angle = ndof->dt * rot[1];
/* update the onscreen doo-dad */
/* Update the onscreen axis-angle indicator. */
rv3d->rot_angle = angle;
rv3d->rot_axis[0] = 0;
rv3d->rot_axis[1] = 0;
@ -222,7 +222,7 @@ static void view3d_ndof_orbit(const struct wmNDOFMotionData *ndof,
/* transform rotation axis from view to world coordinates */
mul_qt_v3(view_inv, axis);
/* update the onscreen doo-dad */
/* Update the onscreen axis-angle indicator. */
rv3d->rot_angle = angle;
copy_v3_v3(rv3d->rot_axis, axis);
@ -251,7 +251,7 @@ void view3d_ndof_fly(const wmNDOFMotionData *ndof,
float view_inv[4];
invert_qt_qt_normalized(view_inv, rv3d->viewquat);
rv3d->rot_angle = 0.0f; /* disable onscreen rotation doo-dad */
rv3d->rot_angle = 0.0f; /* Disable onscreen rotation indicator. */
if (has_translate) {
/* ignore real 'dist' since fly has its own speed settings,

View File

@ -469,7 +469,6 @@ static int viewzoom_exec(bContext *C, wmOperator *op)
if (delta < 0) {
const float step = 1.2f;
/* this min and max is also in viewmove() */
if (use_cam_zoom) {
view_zoom_to_window_xy_camera(scene, depsgraph, v3d, region, step, zoom_xy);
}

View File

@ -580,11 +580,11 @@ typedef struct TransInfo {
/** Mouse side of the current frame, 'L', 'R' or 'B' */
char frame_side;
/** copy from G.vd, prevents feedback. */
/** copy from #RegionView3D, prevents feedback. */
float viewmat[4][4];
/** and to make sure we don't have to. */
float viewinv[4][4];
/** access G.vd from other space types. */
/** Access #RegionView3D from other space types. */
float persmat[4][4];
float persinv[4][4];
short persp;