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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-09-12 11:58:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-09-12 11:59:44 +0300
commita22c2ceb0feed60942a59f0ebaa26d351b784ed8 (patch)
tree8f733ce296f1a157905266cd547865e114cad913
parent1e2f2f27e9f2bcac470330070a10e0d82f9a50a0 (diff)
Cleanup: line breaks with comments
-rw-r--r--source/blender/avi/intern/avi_options.c4
-rw-r--r--source/blender/blenkernel/intern/curve.c4
-rw-r--r--source/blender/blenkernel/intern/mesh_convert.c8
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.c4
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp4
-rw-r--r--source/blender/makesrna/intern/makesrna.c4
-rw-r--r--source/blender/makesrna/intern/rna_define.c4
-rw-r--r--source/blender/modifiers/intern/MOD_shrinkwrap.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_proc.c146
-rw-r--r--source/blender/windowmanager/intern/wm_operator_type.c4
11 files changed, 97 insertions, 93 deletions
diff --git a/source/blender/avi/intern/avi_options.c b/source/blender/avi/intern/avi_options.c
index 4f7e26c874c..65db8c19397 100644
--- a/source/blender/avi/intern/avi_options.c
+++ b/source/blender/avi/intern/avi_options.c
@@ -42,8 +42,8 @@ AviError AVI_set_compress_option(
(void)stream; /* unused */
- if (movie->header->TotalFrames !=
- 0) { /* Can't change params after we have already started writing frames */
+ if (movie->header->TotalFrames != 0) {
+ /* Can't change params after we have already started writing frames. */
return AVI_ERROR_OPTION;
}
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 5f9a726d34a..0080eb1a9d7 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -2145,8 +2145,8 @@ static void tilt_bezpart(BezTriple *prevbezt,
for (a = 0; a < resolu; a++, fac += dfac) {
if (tilt_array) {
- if (nu->tilt_interp ==
- KEY_CU_EASE) { /* May as well support for tilt also 2.47 ease interp */
+ if (nu->tilt_interp == KEY_CU_EASE) {
+ /* May as well support for tilt also 2.47 ease interp. */
*tilt_array = prevbezt->tilt +
(bezt->tilt - prevbezt->tilt) * (3.0f * fac * fac - 2.0f * fac * fac * fac);
}
diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c
index e072a37acee..0a991ee36c8 100644
--- a/source/blender/blenkernel/intern/mesh_convert.c
+++ b/source/blender/blenkernel/intern/mesh_convert.c
@@ -265,9 +265,11 @@ int BKE_mesh_nurbs_displist_to_mdata(Object *ob,
const float *data;
int a, b, ofs, vertcount, startvert, totvert = 0, totedge = 0, totloop = 0, totpoly = 0;
int p1, p2, p3, p4, *index;
- const bool conv_polys = ((CU_DO_2DFILL(cu) ==
- false) || /* 2d polys are filled with DL_INDEX3 displists */
- (ob->type == OB_SURF)); /* surf polys are never filled */
+ const bool conv_polys = (
+ /* 2d polys are filled with DL_INDEX3 displists */
+ (CU_DO_2DFILL(cu) == false) ||
+ /* surf polys are never filled */
+ (ob->type == OB_SURF));
/* count */
dl = dispbase->first;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index e9d4af447e0..c4363813e36 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5339,8 +5339,8 @@ static void lib_link_object(FileData *fd, Main *main)
eModifierType_Smoke);
if (smd && (smd->type == MOD_SMOKE_TYPE_DOMAIN) && smd->domain) {
- smd->domain->flags |=
- MOD_SMOKE_FILE_LOAD; /* flag for refreshing the simulation after loading */
+ /* Flag for refreshing the simulation after loading. */
+ smd->domain->flags |= MOD_SMOKE_FILE_LOAD;
}
}
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index 788edc348d9..58a7d423d67 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -1026,8 +1026,8 @@ bool BM_select_history_active_get(BMesh *bm, BMEditSelection *ese)
ese->next = ese->prev = NULL;
if (ese_last) {
- if (ese_last->htype ==
- BM_FACE) { /* if there is an active face, use it over the last selected face */
+ /* If there is an active face, use it over the last selected face. */
+ if (ese_last->htype == BM_FACE) {
if (efa) {
ese->ele = (BMElem *)efa;
}
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 48af823f8f5..5ed2af0c11d 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -239,8 +239,8 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
g_context = NULL;
g_program = NULL;
- if (clewInit() !=
- CLEW_SUCCESS) { /* this will check for errors and skip if already initialized */
+ /* This will check for errors and skip if already initialized. */
+ if (clewInit() != CLEW_SUCCESS) {
return;
}
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index f531eb7f494..2d4da942610 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -629,8 +629,8 @@ static char *rna_def_property_get_func(
if (prop->type == PROP_FLOAT) {
if (IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
- if (prop->subtype !=
- PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */
+ /* Colors are an exception. these get translated. */
+ if (prop->subtype != PROP_COLOR_GAMMA) {
CLOG_ERROR(&LOG,
"%s.%s is a '%s' but wrapped as type '%s'.",
srna->identifier,
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 8fc3bee83e6..758fbd07f85 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -2445,8 +2445,8 @@ void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, cons
/* silent is for internal use */
if (DefRNA.silent == 0) {
if (dp->dnatype && *dp->dnatype && IS_DNATYPE_FLOAT_COMPAT(dp->dnatype) == 0) {
- if (prop->subtype !=
- PROP_COLOR_GAMMA) { /* colors are an exception. these get translated */
+ /* Colors are an exception. these get translated. */
+ if (prop->subtype != PROP_COLOR_GAMMA) {
CLOG_ERROR(&LOG,
"%s.%s is a '%s' but wrapped as type '%s'.",
srna->identifier,
diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c
index 4bca48852a2..b8d0b19b7bf 100644
--- a/source/blender/modifiers/intern/MOD_shrinkwrap.c
+++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c
@@ -65,8 +65,8 @@ static void requiredDataMask(Object *UNUSED(ob),
if ((smd->shrinkType == MOD_SHRINKWRAP_PROJECT) &&
(smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL)) {
- r_cddata_masks->vmask |=
- CD_MASK_MVERT; /* XXX Really? These should always be present, always... */
+ /* XXX Really? These should always be present, always... */
+ r_cddata_masks->vmask |= CD_MASK_MVERT;
}
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c
index b0b646dfd16..5c3b0dc7f55 100644
--- a/source/blender/nodes/texture/nodes/node_texture_proc.c
+++ b/source/blender/nodes/texture/nodes/node_texture_proc.c
@@ -165,83 +165,84 @@ static void voronoi_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short th
tex->ns_outscale = tex_input_value(in[I + 4], p, thread);
tex->noisesize = tex_input_value(in[I + 5], p, thread);
}
-ProcDef(voronoi)
+ProcDef(voronoi);
- /* --- BLEND -- */
- static bNodeSocketTemplate blend_inputs[] = {COMMON_INPUTS, {-1, 0, ""}};
-ProcNoInputs(blend) ProcDef(blend)
+/* --- BLEND -- */
+static bNodeSocketTemplate blend_inputs[] = {COMMON_INPUTS, {-1, 0, ""}};
+ProcNoInputs(blend);
+ProcDef(blend);
- /* -- MAGIC -- */
- static bNodeSocketTemplate magic_inputs[] = {
- COMMON_INPUTS,
- {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
- {-1, 0, ""}};
+/* -- MAGIC -- */
+static bNodeSocketTemplate magic_inputs[] = {
+ COMMON_INPUTS,
+ {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
+ {-1, 0, ""}};
static void magic_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
{
tex->turbul = tex_input_value(in[I + 0], p, thread);
}
-ProcDef(magic)
-
- /* --- MARBLE --- */
- static bNodeSocketTemplate marble_inputs[] = {
- COMMON_INPUTS,
- {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
- {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
- {-1, 0, ""}};
+ProcDef(magic);
+
+/* --- MARBLE --- */
+static bNodeSocketTemplate marble_inputs[] = {
+ COMMON_INPUTS,
+ {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
+ {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
+ {-1, 0, ""}};
static void marble_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
{
tex->noisesize = tex_input_value(in[I + 0], p, thread);
tex->turbul = tex_input_value(in[I + 1], p, thread);
}
-ProcDef(marble)
+ProcDef(marble);
- /* --- CLOUDS --- */
- static bNodeSocketTemplate clouds_inputs[] = {
- COMMON_INPUTS,
- {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
- {-1, 0, ""}};
+/* --- CLOUDS --- */
+static bNodeSocketTemplate clouds_inputs[] = {
+ COMMON_INPUTS,
+ {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
+ {-1, 0, ""}};
static void clouds_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
{
tex->noisesize = tex_input_value(in[I + 0], p, thread);
}
-ProcDef(clouds)
-
- /* --- DISTORTED NOISE --- */
- static bNodeSocketTemplate distnoise_inputs[] = {
- COMMON_INPUTS,
- {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
- {SOCK_FLOAT, 1, N_("Distortion"), 1.00f, 0.0f, 0.0f, 0.0f, 0.0000f, 10.0f, PROP_UNSIGNED},
- {-1, 0, ""}};
+ProcDef(clouds);
+
+/* --- DISTORTED NOISE --- */
+static bNodeSocketTemplate distnoise_inputs[] = {
+ COMMON_INPUTS,
+ {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
+ {SOCK_FLOAT, 1, N_("Distortion"), 1.00f, 0.0f, 0.0f, 0.0f, 0.0000f, 10.0f, PROP_UNSIGNED},
+ {-1, 0, ""}};
static void distnoise_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
{
tex->noisesize = tex_input_value(in[I + 0], p, thread);
tex->dist_amount = tex_input_value(in[I + 1], p, thread);
}
-ProcDef(distnoise)
-
- /* --- WOOD --- */
- static bNodeSocketTemplate wood_inputs[] = {
- COMMON_INPUTS,
- {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
- {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
- {-1, 0, ""}};
+ProcDef(distnoise);
+
+/* --- WOOD --- */
+static bNodeSocketTemplate wood_inputs[] = {
+ COMMON_INPUTS,
+ {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
+ {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
+ {-1, 0, ""}};
static void wood_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
{
tex->noisesize = tex_input_value(in[I + 0], p, thread);
tex->turbul = tex_input_value(in[I + 1], p, thread);
}
-ProcDef(wood)
-
- /* --- MUSGRAVE --- */
- static bNodeSocketTemplate musgrave_inputs[] = {
- COMMON_INPUTS,
- {SOCK_FLOAT, 1, N_("H"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
- {SOCK_FLOAT, 1, N_("Lacunarity"), 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, PROP_UNSIGNED},
- {SOCK_FLOAT, 1, N_("Octaves"), 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 8.0f, PROP_UNSIGNED},
-
- {SOCK_FLOAT, 1, N_("iScale"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f, PROP_UNSIGNED},
- {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
- {-1, 0, ""}};
+ProcDef(wood);
+
+/* --- MUSGRAVE --- */
+static bNodeSocketTemplate musgrave_inputs[] = {
+ COMMON_INPUTS,
+ {SOCK_FLOAT, 1, N_("H"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
+ {SOCK_FLOAT, 1, N_("Lacunarity"), 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, PROP_UNSIGNED},
+ {SOCK_FLOAT, 1, N_("Octaves"), 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 8.0f, PROP_UNSIGNED},
+
+ {SOCK_FLOAT, 1, N_("iScale"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f, PROP_UNSIGNED},
+ {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
+ {-1, 0, ""}};
static void musgrave_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
{
tex->mg_H = tex_input_value(in[I + 0], p, thread);
@@ -250,28 +251,29 @@ static void musgrave_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short t
tex->ns_outscale = tex_input_value(in[I + 3], p, thread);
tex->noisesize = tex_input_value(in[I + 4], p, thread);
}
-ProcDef(musgrave)
-
- /* --- NOISE --- */
- static bNodeSocketTemplate noise_inputs[] = {COMMON_INPUTS, {-1, 0, ""}};
-ProcNoInputs(noise) ProcDef(noise)
-
- /* --- STUCCI --- */
- static bNodeSocketTemplate stucci_inputs[] = {
- COMMON_INPUTS,
- {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
- {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
- {-1, 0, ""}};
+ProcDef(musgrave);
+
+/* --- NOISE --- */
+static bNodeSocketTemplate noise_inputs[] = {COMMON_INPUTS, {-1, 0, ""}};
+ProcNoInputs(noise);
+ProcDef(noise);
+
+/* --- STUCCI --- */
+static bNodeSocketTemplate stucci_inputs[] = {
+ COMMON_INPUTS,
+ {SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED},
+ {SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED},
+ {-1, 0, ""}};
static void stucci_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
{
tex->noisesize = tex_input_value(in[I + 0], p, thread);
tex->turbul = tex_input_value(in[I + 1], p, thread);
}
-ProcDef(stucci)
+ProcDef(stucci);
- /* --- */
+/* --- */
- static void init(bNodeTree *UNUSED(ntree), bNode *node)
+static void init(bNodeTree *UNUSED(ntree), bNode *node)
{
Tex *tex = MEM_callocN(sizeof(Tex), "Tex");
node->storage = tex;
@@ -303,9 +305,9 @@ ProcDef(stucci)
#define C outputs_color_only
#define CV outputs_both
-TexDef(TEX_VORONOI, CV, voronoi, "Voronoi") TexDef(TEX_BLEND, C, blend, "Blend")
- TexDef(TEX_MAGIC, C, magic, "Magic") TexDef(TEX_MARBLE, CV, marble, "Marble")
- TexDef(TEX_CLOUDS, CV, clouds, "Clouds") TexDef(TEX_WOOD, CV, wood, "Wood")
- TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave") TexDef(TEX_NOISE, C, noise, "Noise")
- TexDef(TEX_STUCCI, CV, stucci, "Stucci")
- TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise")
+TexDef(TEX_VORONOI, CV, voronoi, "Voronoi") TexDef(TEX_BLEND, C, blend, "Blend");
+TexDef(TEX_MAGIC, C, magic, "Magic") TexDef(TEX_MARBLE, CV, marble, "Marble");
+TexDef(TEX_CLOUDS, CV, clouds, "Clouds") TexDef(TEX_WOOD, CV, wood, "Wood");
+TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave") TexDef(TEX_NOISE, C, noise, "Noise");
+TexDef(TEX_STUCCI, CV, stucci, "Stucci");
+TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise");
diff --git a/source/blender/windowmanager/intern/wm_operator_type.c b/source/blender/windowmanager/intern/wm_operator_type.c
index 96fbac3aecc..e3fe8892515 100644
--- a/source/blender/windowmanager/intern/wm_operator_type.c
+++ b/source/blender/windowmanager/intern/wm_operator_type.c
@@ -227,8 +227,8 @@ void wm_operatortype_free(void)
*/
void WM_operatortype_props_advanced_begin(wmOperatorType *ot)
{
- if (ot_prop_basic_count ==
- -1) { /* Don't do anything if _begin was called before, but not _end */
+ if (ot_prop_basic_count == -1) {
+ /* Don't do anything if _begin was called before, but not _end */
ot_prop_basic_count = RNA_struct_count_properties(ot->srna);
}
}