Cleanup: spelling
This commit is contained in:
@@ -375,7 +375,7 @@ static int brush_undo_preserve_cb(LibraryIDLinkCallbackData *cb_data)
|
||||
|
||||
static void brush_undo_preserve(BlendLibReader *reader, ID *id_new, ID *id_old)
|
||||
{
|
||||
/* Whole Brush is preserved across undos. */
|
||||
/* Whole Brush is preserved across undoes. */
|
||||
BKE_lib_id_swap(NULL, id_new, id_old);
|
||||
|
||||
/* `id_new` now has content from `id_old`, we need to ensure those old ID pointers are valid.
|
||||
|
||||
@@ -127,7 +127,7 @@ static void palette_blend_read_data(BlendDataReader *reader, ID *id)
|
||||
|
||||
static void palette_undo_preserve(BlendLibReader *UNUSED(reader), ID *id_new, ID *id_old)
|
||||
{
|
||||
/* Whole Palette is preserved across undos, and it has no extra pointer, simple. */
|
||||
/* Whole Palette is preserved across undoes, and it has no extra pointer, simple. */
|
||||
/* Note: We do not care about potential internal references to self here, Palette has none. */
|
||||
/* Note: We do not swap IDProperties, as dealing with potential ID pointers in those would be
|
||||
* fairly delicate. */
|
||||
|
||||
@@ -287,7 +287,7 @@ void BKE_undosys_stack_clear(UndoStack *ustack)
|
||||
|
||||
void BKE_undosys_stack_clear_active(UndoStack *ustack)
|
||||
{
|
||||
/* Remove active and all following undos. */
|
||||
/* Remove active and all following undoes. */
|
||||
UndoStep *us = ustack->step_active;
|
||||
|
||||
if (us) {
|
||||
@@ -517,7 +517,7 @@ UndoPushReturn BKE_undosys_step_push_with_type(UndoStack *ustack,
|
||||
retval |= UNDO_PUSH_RET_OVERRIDE_CHANGED;
|
||||
}
|
||||
|
||||
/* Remove all undos after (also when 'ustack->step_active == NULL'). */
|
||||
/* Remove all undoes after (also when 'ustack->step_active == NULL'). */
|
||||
while (ustack->steps.last != ustack->step_active) {
|
||||
UndoStep *us_iter = ustack->steps.last;
|
||||
undosys_step_free_and_unlink(ustack, us_iter);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "BLI_strict_flags.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
/* Copyright 2001, softSurfer (www.softsurfer.com)
|
||||
/* Copyright 2001, softSurfer (http://www.softsurfer.com)
|
||||
* This code may be freely used and modified for any purpose
|
||||
* providing that this copyright notice is included with it.
|
||||
* SoftSurfer makes no warranty for this code, and cannot be held
|
||||
|
||||
@@ -1500,7 +1500,7 @@ template<typename T> static void re_delaunay_triangulate(CDTArrangement<T> *cdt,
|
||||
cse = ss;
|
||||
}
|
||||
}
|
||||
/* Add diagonals necessary to make abc a triangle. */
|
||||
/* Add diagonals necessary to make `abc` a triangle. */
|
||||
CDTEdge<T> *ebc = nullptr;
|
||||
CDTEdge<T> *eca = nullptr;
|
||||
if (!exists_edge(b, c)) {
|
||||
|
||||
@@ -2403,8 +2403,8 @@ static void inside_shape_callback(void *userdata,
|
||||
* how likely we think it is that it is inside.
|
||||
* This is done by casting some rays from just on the positive side of a test
|
||||
* face in various directions and summing the parity of crossing faces of each face.
|
||||
* The BVHtree \a tree contains all the triangles of \a tm and can be used for
|
||||
* fast raycasting.
|
||||
*
|
||||
* \param tree: Contains all the triangles of \a tm and can be used for fast ray-casting.
|
||||
*/
|
||||
static void test_tri_inside_shapes(const IMesh &tm,
|
||||
std::function<int(int)> shape_fn,
|
||||
@@ -2424,7 +2424,7 @@ static void test_tri_inside_shapes(const IMesh &tm,
|
||||
return;
|
||||
}
|
||||
double3 test_point = calc_point_inside_tri_db(tri_test);
|
||||
/* Offset the test point a tiny bit in the tri_test normal direcction. */
|
||||
/* Offset the test point a tiny bit in the tri_test normal direction. */
|
||||
tri_test.populate_plane(false);
|
||||
double3 norm = tri_test.plane->norm.normalized();
|
||||
const double offset_amount = 1e-5;
|
||||
@@ -2436,8 +2436,8 @@ static void test_tri_inside_shapes(const IMesh &tm,
|
||||
}
|
||||
/* Try six test rays almost along orthogonal axes.
|
||||
* Perturb their directions slightly to make it less likely to hit a seam.
|
||||
* Raycast assumes they have unit length, so use r1 near 1 and
|
||||
* ra near 0.5, and rb near .01, but normalized so sqrt(r1^2 + ra^2 + rb^2) == 1. */
|
||||
* Ray-cast assumes they have unit length, so use r1 near 1 and
|
||||
* ra near 0.5, and rb near .01, but normalized so `sqrt(r1^2 + ra^2 + rb^2) == 1`. */
|
||||
constexpr int num_rays = 6;
|
||||
constexpr float r1 = 0.9987025295199663f;
|
||||
constexpr float ra = 0.04993512647599832f;
|
||||
|
||||
@@ -3928,9 +3928,11 @@ static void lib_link_all(FileData *fd, Main *bmain)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Checks to perform after `lib_link_all`.
|
||||
* Those operations cannot perfom properly in a split bmain case, since some data from other
|
||||
* bmain's (aka libraries) may not have been processed yet. */
|
||||
/**
|
||||
* Checks to perform after `lib_link_all`.
|
||||
* Those operations cannot perform properly in a split bmain case, since some data from other
|
||||
* bmain's (aka libraries) may not have been processed yet.
|
||||
*/
|
||||
static void after_liblink_merged_bmain_process(Main *bmain)
|
||||
{
|
||||
/* We only expect a merged Main here, not a split one. */
|
||||
|
||||
@@ -1657,7 +1657,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
||||
if (!DNA_struct_elem_find(fd->filesdna, "Brush", "float", "falloff_angle")) {
|
||||
for (Brush *br = bmain->brushes.first; br; br = br->id.next) {
|
||||
br->falloff_angle = DEG2RADF(80);
|
||||
/* These flags are used for new feautres. They are not related to falloff_angle */
|
||||
/* These flags are used for new features. They are not related to `falloff_angle`. */
|
||||
br->flag &= ~(BRUSH_INVERT_TO_SCRAPE_FILL | BRUSH_ORIGINAL_PLANE |
|
||||
BRUSH_GRAB_ACTIVE_VERTEX | BRUSH_SCENE_SPACING | BRUSH_FRONTFACE_FALLOFF);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/*----------- bmop error system ----------*/
|
||||
|
||||
/* pushes an error onto the bmesh error stack.
|
||||
* if msg is null, then the default message for the errorcode is used.*/
|
||||
* if msg is null, then the default message for the `errcode` is used. */
|
||||
void BMO_error_raise(BMesh *bm, BMOperator *owner, int errcode, const char *msg);
|
||||
|
||||
/* gets the topmost error from the stack.
|
||||
|
||||
@@ -802,7 +802,7 @@ void BM_edge_calc_rotate(BMEdge *e, const bool ccw, BMLoop **r_l1, BMLoop **r_l2
|
||||
/* we know this will work */
|
||||
BM_edge_face_pair(e, &fa, &fb);
|
||||
|
||||
/* so we can use ccw variable correctly,
|
||||
/* so we can use `ccw` variable correctly,
|
||||
* otherwise we could use the edges verts direct */
|
||||
BM_edge_ordered_verts(e, &v1, &v2);
|
||||
|
||||
@@ -886,7 +886,7 @@ bool BM_edge_rotate_check_degenerate(BMEdge *e, BMLoop *l1, BMLoop *l2)
|
||||
/* verts from the loops passed */
|
||||
|
||||
BMVert *v1, *v2;
|
||||
/* these are the opposite verts - the verts that _would_ be used if 'ccw' was inverted*/
|
||||
/* These are the opposite verts - the verts that _would_ be used if `ccw` was inverted. */
|
||||
BMVert *v1_alt, *v2_alt;
|
||||
|
||||
/* this should have already run */
|
||||
@@ -1070,7 +1070,7 @@ BMEdge *BM_edge_rotate(BMesh *bm, BMEdge *e, const bool ccw, const short check_f
|
||||
BM_face_normal_flip(bm, fb);
|
||||
|
||||
if (ccw) {
|
||||
/* needed otherwise ccw toggles direction */
|
||||
/* Needed otherwise `ccw` toggles direction */
|
||||
e_new->l = e_new->l->radial_next;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1394,7 +1394,7 @@ static BMOpDefine bmo_duplicate_def = {
|
||||
/* slots_out */
|
||||
{{"geom_orig.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE | BM_FACE}},
|
||||
{"geom.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE | BM_FACE}},
|
||||
/* facemap maps from source faces to dupe
|
||||
/* face_map maps from source faces to dupe
|
||||
* faces, and from dupe faces to source faces */
|
||||
{"vert_map.out", BMO_OP_SLOT_MAPPING, {(int)BMO_OP_SLOT_SUBTYPE_MAP_ELEM}},
|
||||
{"edge_map.out", BMO_OP_SLOT_MAPPING, {(int)BMO_OP_SLOT_SUBTYPE_MAP_ELEM}},
|
||||
|
||||
@@ -143,7 +143,7 @@ void bmesh_disk_vert_replace(BMEdge *e, BMVert *v_dst, BMVert *v_src)
|
||||
*
|
||||
* The loop cycle keeps track of a faces vertices and edges. It should be noted that the
|
||||
* direction of a loop cycle is either CW or CCW depending on the face normal, and is
|
||||
* not oriented to the faces editedges.
|
||||
* not oriented to the faces edit-edges.
|
||||
*
|
||||
* Functions relating to this cycle:
|
||||
* - bmesh_cycle_XXX family of functions.
|
||||
|
||||
@@ -235,7 +235,7 @@ typedef struct BoundVert {
|
||||
/** Is this boundvert the side of the custom profile's start. */
|
||||
bool is_profile_start;
|
||||
char _pad[3];
|
||||
/** Length of seam starting from current boundvert to next boundvert with ccw ordering. */
|
||||
/** Length of seam starting from current boundvert to next boundvert with CCW ordering. */
|
||||
int seam_len;
|
||||
/** Same as seam_len but defines length of sharp edges. */
|
||||
int sharp_len;
|
||||
@@ -1961,7 +1961,7 @@ static bool make_unit_square_map(const float va[3],
|
||||
/**
|
||||
* Like make_unit_square_map, but this one makes a matrix that transforms the
|
||||
* (1,1,1) corner of a unit cube into an arbitrary corner with corner vert d
|
||||
* and verts around it a, b, c (in ccw order, viewed from d normal dir).
|
||||
* and verts around it a, b, c (in CCW order, viewed from d normal dir).
|
||||
* The matrix mat is calculated to map:
|
||||
* (1,0,0) -> va
|
||||
* (0,1,0) -> vb
|
||||
@@ -1969,9 +1969,9 @@ static bool make_unit_square_map(const float va[3],
|
||||
* (1,1,1) -> vd
|
||||
* We want M to make M*A=B where A has the left side above, as columns
|
||||
* and B has the right side as columns - both extended into homogeneous coords.
|
||||
* So M = B*(Ainverse). Doing Ainverse by hand gives the code below.
|
||||
* The cols of M are 1/2{va-vb+vc-vd}, 1/2{-va+vb-vc+vd}, 1/2{-va-vb+vc+vd},
|
||||
* and 1/2{va+vb+vc-vd}
|
||||
* So `M = B*(Ainverse)`. Doing `Ainverse` by hand gives the code below.
|
||||
* The cols of M are `1/2{va-vb+vc-vd}`, `1/2{-va+vb-vc+vd}`, `1/2{-va-vb+vc+vd}`,
|
||||
* and `1/2{va+vb+vc-vd}`
|
||||
* and Blender matrices have cols at m[i][*].
|
||||
*/
|
||||
static void make_unit_cube_map(
|
||||
@@ -6378,7 +6378,7 @@ static bool bev_rebuild_polygon(BMesh *bm, BevelParams *bp, BMFace *f)
|
||||
go_ccw = (e->fnext != f);
|
||||
}
|
||||
else {
|
||||
go_ccw = true; /* Going ccw around bv to trace this corner. */
|
||||
go_ccw = true; /* Going CCW around bv to trace this corner. */
|
||||
}
|
||||
}
|
||||
else if (eprev->prev == e) {
|
||||
@@ -7230,17 +7230,17 @@ static void set_profile_spacing(BevelParams *bp, ProfileSpacing *pro_spacing, bo
|
||||
* B
|
||||
* </pre>
|
||||
*
|
||||
* where edges are A, B, and C, following a face around vertices a, b, c, d.
|
||||
* th1 is angle abc and th2 is angle bcd;
|
||||
* where edges are A, B, and C, following a face around vertices `a, b, c, d`.
|
||||
* `th1` is angle `abc` and th2 is angle `bcd`;
|
||||
* and the argument `EdgeHalf eb` is B, going from b to c.
|
||||
* In general case, edge offset specs for A, B, C have
|
||||
* the form ka*t, kb*t, kc*t where ka, kb, kc are some factors
|
||||
* the form `ka*t`, `kb*t`, `kc*t` where `ka`, `kb`, `kc` are some factors
|
||||
* (may be 0) and t is the current bp->offset.
|
||||
* We want to calculate t at which the clone of B parallel
|
||||
* to it collapses. This can be calculated using trig.
|
||||
* Another case of geometry collision that can happen is
|
||||
* When B slides along A because A is un-beveled.
|
||||
* Then it might collide with a. Similarly for B sliding along C.
|
||||
* Then it might collide with a. Similarly for B sliding along C.
|
||||
*/
|
||||
static float geometry_collide_offset(BevelParams *bp, EdgeHalf *eb)
|
||||
{
|
||||
|
||||
@@ -1706,7 +1706,7 @@ void DRW_draw_render_loop_offscreen(struct Depsgraph *depsgraph,
|
||||
if (draw_background) {
|
||||
/* HACK(fclem): In this case we need to make sure the final alpha is 1.
|
||||
* We use the blend mode to ensure that. A better way to fix that would
|
||||
* be to do that in the colormanagmeent shader. */
|
||||
* be to do that in the color-management shader. */
|
||||
GPU_offscreen_bind(ofs, false);
|
||||
GPU_clear_color(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
/* Premult Alpha over black background. */
|
||||
|
||||
@@ -2744,7 +2744,7 @@ static int image_flip_exec(bContext *C, wmOperator *op)
|
||||
|
||||
ED_image_undo_push_end();
|
||||
|
||||
/* force GPU reupload, all image is invalid. */
|
||||
/* force GPU re-upload, all image is invalid. */
|
||||
BKE_image_free_gputextures(ima);
|
||||
|
||||
WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima);
|
||||
|
||||
@@ -56,7 +56,7 @@ static enum eTextViewContext_LineFlag report_line_data(TextViewContext *tvc,
|
||||
int shade = (tvc->iter_tmp % 2) ? 4 : -4;
|
||||
UI_GetThemeColorShade4ubv(bg_id, shade, bg);
|
||||
|
||||
/* Don't show icon on subsequent rows of multirow report. */
|
||||
/* Don't show icon on subsequent rows of multi-row report. */
|
||||
*r_icon = (tvc->iter_char_begin != 0) ? ICON_NONE : UI_icon_from_report_type(report->type);
|
||||
|
||||
int icon_fg_id = UI_text_colorid_from_report_type(report->type);
|
||||
|
||||
@@ -314,7 +314,7 @@ struct MemFile *ED_undosys_stack_memfile_get_active(UndoStack *ustack)
|
||||
* If the last undo step is a memfile one, find the first #MemFileChunk matching given ID
|
||||
* (using its session UUID), and tag it as "changed in the future".
|
||||
*
|
||||
* Since non-memfile undos cannot automatically set this flag in the previous step as done with
|
||||
* Since non-memfile undoes cannot automatically set this flag in the previous step as done with
|
||||
* memfile ones, this has to be called manually by relevant undo code.
|
||||
*
|
||||
* \note Only current known case for this is undoing a switch from Object to Sculpt mode (see
|
||||
|
||||
@@ -183,7 +183,7 @@ void ED_editors_exit(Main *bmain, bool do_undo_system)
|
||||
return;
|
||||
}
|
||||
|
||||
/* frees all editmode undos */
|
||||
/* Frees all edit-mode undoes. */
|
||||
if (do_undo_system && G_MAIN->wm.first) {
|
||||
wmWindowManager *wm = G_MAIN->wm.first;
|
||||
/* normally we don't check for NULL undo stack,
|
||||
|
||||
@@ -102,11 +102,11 @@ typedef enum ID_Type {
|
||||
/* Deprecated. */
|
||||
#define ID_SCRN MAKE_ID2('S', 'N')
|
||||
|
||||
/* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */
|
||||
/* NOTE: Fake IDs, needed for `g.sipo->blocktype` or outliner. */
|
||||
#define ID_SEQ MAKE_ID2('S', 'Q')
|
||||
/* constraint */
|
||||
#define ID_CO MAKE_ID2('C', 'O')
|
||||
/* pose (action channel, used to be ID_AC in code, so we keep code for backwards compat) */
|
||||
/* pose (action channel, used to be ID_AC in code, so we keep code for backwards compatible). */
|
||||
#define ID_PO MAKE_ID2('A', 'C')
|
||||
/* used in outliner... */
|
||||
#define ID_NLA MAKE_ID2('N', 'L')
|
||||
|
||||
@@ -1471,8 +1471,8 @@ static int rna_property_override_diff_propptr(Main *bmain,
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* We could also use is_diff_pointer, but then we potentially lose the gt/lt info -
|
||||
* and don't think performances are critical here for now anyway... */
|
||||
/* We could also use is_diff_pointer, but then we potentially lose the greater-than/less-than
|
||||
* info - and don't think performances are critical here for now anyway. */
|
||||
return !RNA_struct_equals(bmain, propptr_a, propptr_b, mode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -630,7 +630,7 @@ static void boxsample(ImBuf *ibuf,
|
||||
const short imapextend)
|
||||
{
|
||||
/* Sample box, performs clip. minx etc are in range 0.0 - 1.0 .
|
||||
* Enlarge with antialiased edges of pixels.
|
||||
* Enlarge with anti-aliased edges of pixels.
|
||||
* If variable 'imaprepeat' has been set, the
|
||||
* clipped-away parts are sampled as well.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user