Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-03-12 04:24:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-12 04:34:54 +0300
commit1aebcdbb3a75b8c59ea211bb1ea6cc8573b0ea0f (patch)
treed4bff59a4d7e46fc333078bebe6bdd9ffcca6d0f /source
parent74855969e7b5fd8da71cc62057a0ce8eb3f528f8 (diff)
Cleanup: spelling, clang-format
Diffstat (limited to 'source')
-rw-r--r--source/blender/blendthumb/src/Dll.cpp7
-rw-r--r--source/blender/draw/engines/overlay/overlay_outline.c6
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_antialiasing.c2
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_dof.c2
-rw-r--r--source/blender/draw/engines/workbench/workbench_opaque.c2
-rw-r--r--source/blender/draw/engines/workbench/workbench_shadow.c4
-rw-r--r--source/blender/draw/engines/workbench/workbench_transparent.c10
-rw-r--r--source/blender/editors/gpencil/gpencil_sculpt_paint.c3
-rw-r--r--source/blender/editors/gpencil/gpencil_weight_paint.c18
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c20
-rw-r--r--source/blender/editors/transform/transform_convert_gpencil.c5
-rw-r--r--source/blender/modifiers/intern/MOD_hook.c2
12 files changed, 42 insertions, 39 deletions
diff --git a/source/blender/blendthumb/src/Dll.cpp b/source/blender/blendthumb/src/Dll.cpp
index 89572334937..fec792ebfeb 100644
--- a/source/blender/blendthumb/src/Dll.cpp
+++ b/source/blender/blendthumb/src/Dll.cpp
@@ -159,8 +159,8 @@ struct REGISTRY_ENTRY {
PCWSTR pszKeyName;
PCWSTR pszValueName;
DWORD dwValueType;
- PCWSTR pszData; //These two fields could/should have been a union, but C++
- DWORD dwData; //only lets you initalize the first field in a union.
+ PCWSTR pszData; // These two fields could/should have been a union, but C++
+ DWORD dwData; // only lets you initalize the first field in a union.
};
// Creates a registry key (if needed) and sets the default value of the key
@@ -236,7 +236,8 @@ STDAPI DllRegisterServer()
L"Software\\Classes\\.blend\\",
L"Treatment",
REG_DWORD,
- 0,0}, // doesn't appear to do anything...
+ 0,
+ 0}, // doesn't appear to do anything...
{HKEY_CURRENT_USER,
L"Software\\Classes\\.blend\\ShellEx\\{e357fccd-a995-4576-b01f-234630154e96}",
NULL,
diff --git a/source/blender/draw/engines/overlay/overlay_outline.c b/source/blender/draw/engines/overlay/overlay_outline.c
index e77a0a143a9..0395f6890bd 100644
--- a/source/blender/draw/engines/overlay/overlay_outline.c
+++ b/source/blender/draw/engines/overlay/overlay_outline.c
@@ -33,7 +33,7 @@
#include "overlay_private.h"
-/* Returns the normal plane in ndc space. */
+/* Returns the normal plane in NDC space. */
static void gpencil_depth_plane(Object *ob, float r_plane[4])
{
/* TODO put that into private data. */
@@ -42,11 +42,11 @@ static void gpencil_depth_plane(Object *ob, float r_plane[4])
float *camera_z_axis = viewinv[2];
float *camera_pos = viewinv[3];
- /* Find the normal most likely to represent the gpObject. */
+ /* Find the normal most likely to represent the grease pencil object. */
/* TODO: This does not work quite well if you use
* strokes not aligned with the object axes. Maybe we could try to
* compute the minimum axis of all strokes. But this would be more
- * computationaly heavy and should go into the GPData evaluation. */
+ * computationally heavy and should go into the GPData evaluation. */
BoundBox *bbox = BKE_object_boundbox_get(ob);
/* Convert bbox to matrix */
float mat[4][4], size[3], center[3];
diff --git a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
index 6a8f77699bc..3cd21dfeace 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
@@ -354,7 +354,7 @@ bool workbench_antialiasing_setup(WORKBENCH_Data *vedata)
}
else {
/* TAA is not making a big change to the matrices.
- * Reuse the main view culling by creating a subview. */
+ * Reuse the main view culling by creating a sub-view. */
wpd->view = DRW_view_create_sub(default_view, viewmat, winmat);
}
DRW_view_set_active(wpd->view);
diff --git a/source/blender/draw/engines/workbench/workbench_effect_dof.c b/source/blender/draw/engines/workbench/workbench_effect_dof.c
index 8aa37c6b9fc..9716ccd4b44 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_dof.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_dof.c
@@ -23,7 +23,7 @@
*
* We use a gather approach by sampling a lowres version of the color buffer.
* The process can be summarized like this:
- * - downsample the color buffer using a COC (Circle of Confusion) aware downsample algo.
+ * - down-sample the color buffer using a COC (Circle of Confusion) aware down-sample algorithm.
* - do a gather pass using the COC computed in the previous pass.
* - do a median filter to reduce noise amount.
* - composite on top of main color buffer.
diff --git a/source/blender/draw/engines/workbench/workbench_opaque.c b/source/blender/draw/engines/workbench/workbench_opaque.c
index abb76550b96..08511ca092c 100644
--- a/source/blender/draw/engines/workbench/workbench_opaque.c
+++ b/source/blender/draw/engines/workbench/workbench_opaque.c
@@ -19,7 +19,7 @@
/** \file
* \ingroup draw_engine
*
- * Opaque Pieline:
+ * Opaque Pipeline:
*
* Use deferred shading to render opaque surfaces.
* This decouple the shading cost from scene complexity.
diff --git a/source/blender/draw/engines/workbench/workbench_shadow.c b/source/blender/draw/engines/workbench/workbench_shadow.c
index 8da75942944..efd0ad9134e 100644
--- a/source/blender/draw/engines/workbench/workbench_shadow.c
+++ b/source/blender/draw/engines/workbench/workbench_shadow.c
@@ -23,7 +23,7 @@
*
* Use stencil shadow buffer to cast a sharp shadow over opaque surfaces.
*
- * After the main prepass we render shadow volumes using custom depth & stencil states to
+ * After the main pre-pass we render shadow volumes using custom depth & stencil states to
* set the stencil of shadowed area to anything but 0.
*
* Then the shading pass will shade the areas with stencil not equal 0 differently.
@@ -364,4 +364,4 @@ void workbench_shadow_cache_populate(WORKBENCH_Data *data, Object *ob, const boo
#endif
}
}
-} \ No newline at end of file
+}
diff --git a/source/blender/draw/engines/workbench/workbench_transparent.c b/source/blender/draw/engines/workbench/workbench_transparent.c
index 1e1b751f80d..39aa721a41c 100644
--- a/source/blender/draw/engines/workbench/workbench_transparent.c
+++ b/source/blender/draw/engines/workbench/workbench_transparent.c
@@ -19,15 +19,15 @@
/** \file
* \ingroup draw_engine
*
- * Transparent Pieline:
+ * Transparent Pipeline:
*
- * Use Weight Blended Order Independant Transparency to render transparent surfaces.
+ * Use Weight Blended Order Independent Transparency to render transparent surfaces.
*
* The rendering is broken down in two passes:
* - the accumulation pass where we render all the surfaces and accumulate all the weights.
- * - the resolve pass where we divide the accumulated infos by the weights.
+ * - the resolve pass where we divide the accumulated information by the weights.
*
- * An additional rerender of the transparent surfaces is sometime done in order to have their
+ * An additional re-render of the transparent surfaces is sometime done in order to have their
* correct depth and object ids correctly written.
*/
@@ -177,4 +177,4 @@ void workbench_transparent_draw_depth_pass(WORKBENCH_Data *data)
DRW_draw_pass(psl->transp_accum_infront_ps);
}
}
-} \ No newline at end of file
+}
diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
index 33b08d90751..5db331280f8 100644
--- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c
+++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
@@ -1744,7 +1744,8 @@ static bool gpsculpt_brush_apply_standard(bContext *C, tGP_BrushEditData *gso)
if ((gpf == gpl->actframe) || (gpf->flag & GP_FRAME_SELECT)) {
/* compute multiframe falloff factor */
if (gso->use_multiframe_falloff) {
- /* Faloff depends on distance to active frame (relative to the overall frame range) */
+ /* Falloff depends on distance to active frame
+ * (relative to the overall frame range). */
gso->mf_falloff = BKE_gpencil_multiframe_falloff_calc(
gpf, gpl->actframe->framenum, f_init, f_end, ts->gp_sculpt.cur_falloff);
}
diff --git a/source/blender/editors/gpencil/gpencil_weight_paint.c b/source/blender/editors/gpencil/gpencil_weight_paint.c
index 6b337afa559..c519129cdf7 100644
--- a/source/blender/editors/gpencil/gpencil_weight_paint.c
+++ b/source/blender/editors/gpencil/gpencil_weight_paint.c
@@ -110,7 +110,7 @@ typedef struct tGP_BrushWeightpaintData {
/* Start of new paint */
bool first;
- /* Is multiframe editing enabled, and are we using falloff for that? */
+ /* Is multi-frame editing enabled, and are we using falloff for that? */
bool is_multiframe;
bool use_multiframe_falloff;
@@ -127,10 +127,10 @@ typedef struct tGP_BrushWeightpaintData {
/* - Effect 2D vector */
float dvec[2];
- /* - multiframe falloff factor */
+ /* - multi-frame falloff factor. */
float mf_falloff;
- /* brush geometry (bounding box) */
+ /* brush geometry (bounding box). */
rcti brush_rect;
/* Temp data to save selected points */
@@ -206,7 +206,7 @@ static float brush_influence_calc(tGP_BrushWeightpaintData *gso, const int radiu
float brush_fallof = BKE_brush_curve_strength(brush, distance, (float)radius);
influence *= brush_fallof;
- /* apply multiframe falloff */
+ /* apply multi-frame falloff */
influence *= gso->mf_falloff;
/* return influence */
@@ -585,7 +585,7 @@ static bool gp_weightpaint_brush_apply_to_layers(bContext *C, tGP_BrushWeightpai
/* Active Frame or MultiFrame? */
if (gso->is_multiframe) {
- /* init multiframe falloff options */
+ /* init multi-frame falloff options */
int f_init = 0;
int f_end = 0;
@@ -596,10 +596,10 @@ static bool gp_weightpaint_brush_apply_to_layers(bContext *C, tGP_BrushWeightpai
LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {
/* Always do active frame; Otherwise, only include selected frames */
if ((gpf == gpl->actframe) || (gpf->flag & GP_FRAME_SELECT)) {
- /* compute multiframe falloff factor */
+ /* Compute multi-frame falloff factor. */
if (gso->use_multiframe_falloff) {
- /* Faloff depends on distance to active frame (relative to the overall frame range)
- */
+ /* Falloff depends on distance to active frame
+ * (relative to the overall frame range). */
gso->mf_falloff = BKE_gpencil_multiframe_falloff_calc(
gpf, gpl->actframe->framenum, f_init, f_end, ts->gp_sculpt.cur_falloff);
}
@@ -656,7 +656,7 @@ static void gp_weightpaint_brush_apply(bContext *C, wmOperator *op, PointerRNA *
gso->brush_rect.xmax = mouse[0] + radius;
gso->brush_rect.ymax = mouse[1] + radius;
- /* Calc 2D direction vector and relative angle. */
+ /* Calculate 2D direction vector and relative angle. */
brush_calc_dvec_2d(gso);
changed = gp_weightpaint_brush_apply_to_layers(C, gso);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index bd92193206f..bfbc9b6825b 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1987,7 +1987,7 @@ static bool ed_object_select_pick(bContext *C,
is_obedit = (vc.obedit != NULL);
if (object) {
- /* signal for view3d_opengl_select to skip editmode objects */
+ /* Signal for #view3d_opengl_select to skip edit-mode objects. */
vc.obedit = NULL;
}
@@ -2003,7 +2003,7 @@ static bool ed_object_select_pick(bContext *C,
/* This block uses the control key to make the object selected
* by its center point rather than its contents */
- /* in editmode do not activate */
+ /* In edit-mode do not activate. */
if (obcenter) {
/* note; shift+alt goes to group-flush-selecting */
@@ -2337,11 +2337,11 @@ static int view3d_select_exec(bContext *C, wmOperator *op)
bool toggle = RNA_boolean_get(op->ptr, "toggle");
bool center = RNA_boolean_get(op->ptr, "center");
bool enumerate = RNA_boolean_get(op->ptr, "enumerate");
- /* only force object select for editmode to support vertex parenting,
- * or paint-select to allow pose bone select with vert/face select */
+ /* Only force object select for edit-mode to support vertex parenting,
+ * or paint-select to allow pose bone select with vert/face select. */
bool object = (RNA_boolean_get(op->ptr, "object") &&
(obedit || BKE_paint_select_elem_test(obact) ||
- /* so its possible to select bones in weightpaint mode (LMB select) */
+ /* so its possible to select bones in weight-paint mode (LMB select) */
(obact && (obact->mode & OB_MODE_WEIGHT_PAINT) &&
BKE_object_pose_armature_get(obact))));
@@ -2358,8 +2358,8 @@ static int view3d_select_exec(bContext *C, wmOperator *op)
obact = NULL;
/* ack, this is incorrect but to do this correctly we would need an
- * alternative editmode/objectmode keymap, this copies the functionality
- * from 2.4x where Ctrl+Select in editmode does object select only */
+ * alternative edit-mode/object-mode keymap, this copies the functionality
+ * from 2.4x where Ctrl+Select in edit-mode does object select only. */
center = false;
}
@@ -2493,12 +2493,12 @@ void VIEW3D_OT_select(wmOperatorType *ot)
"center",
0,
"Center",
- "Use the object center when selecting, in editmode used to extend object selection");
+ "Use the object center when selecting, in edit-mode used to extend object selection");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_boolean(
ot->srna, "enumerate", 0, "Enumerate", "List objects under the mouse (object mode only)");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
- prop = RNA_def_boolean(ot->srna, "object", 0, "Object", "Use object selection (editmode only)");
+ prop = RNA_def_boolean(ot->srna, "object", 0, "Object", "Use object selection (edit-mode only)");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_int_vector(ot->srna,
@@ -3286,7 +3286,7 @@ static int view3d_box_select_exec(bContext *C, wmOperator *op)
}
FOREACH_OBJECT_IN_MODE_END;
}
- else { /* no editmode, unified for bones and objects */
+ else { /* No edit-mode, unified for bones and objects. */
if (vc.obact && vc.obact->mode & OB_MODE_SCULPT) {
/* XXX, this is not selection, could be it's own operator. */
changed_multi = ED_sculpt_mask_box_select(
diff --git a/source/blender/editors/transform/transform_convert_gpencil.c b/source/blender/editors/transform/transform_convert_gpencil.c
index 17e69ff38b8..efd7879c8b2 100644
--- a/source/blender/editors/transform/transform_convert_gpencil.c
+++ b/source/blender/editors/transform/transform_convert_gpencil.c
@@ -228,10 +228,11 @@ void createTransGPencil(bContext *C, TransInfo *t)
for (gpf = init_gpf; gpf; gpf = gpf->next) {
if ((gpf == gpl->actframe) || ((gpf->flag & GP_FRAME_SELECT) && (is_multiedit))) {
- /* if multiframe and falloff, recalculate and save value */
+ /* If multi-frame and falloff, recalculate and save value. */
float falloff = 1.0f; /* by default no falloff */
if ((is_multiedit) && (use_multiframe_falloff)) {
- /* Faloff depends on distance to active frame (relative to the overall frame range) */
+ /* Falloff depends on distance to active frame
+ * (relative to the overall frame range). */
falloff = BKE_gpencil_multiframe_falloff_calc(
gpf, gpl->actframe->framenum, f_init, f_end, ts->gp_sculpt.cur_falloff);
}
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index 720ca4ffa13..78d29edfd98 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -316,7 +316,7 @@ static void deformVerts_do(HookModifierData *hmd,
* This should always be true and I don't generally like
* "paranoid" style code like this, but old files can have
* indices that are out of range because old blender did
- * not correct them on exit editmode. - zr
+ * not correct them on exit edit-mode. - zr
*/
if (hmd->force == 0.0f) {