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-04-17 09:50:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 09:52:59 +0300
commita54bdd76cb34005d07a65c2c3a8198b7b8e8c95a (patch)
treec30e2477cc3c12b1dd046f4fd12c728114c94563 /source/blender
parent223f9310955f6b0d6f1089c16802a57e20fcadb3 (diff)
ClangFormat: format '#if 0' code
Previous cleanups didn't account for space after '#'.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/mesh_runtime.c12
-rw-r--r--source/blender/blenkernel/intern/smoke.c2
-rw-r--r--source/blender/blenkernel/intern/sound.c65
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.c6
-rw-r--r--source/blender/bmesh/operators/bmo_inset.c7
-rw-r--r--source/blender/compositor/intern/COM_Debug.cpp9
-rw-r--r--source/blender/editors/interface/interface_icons.c8
-rw-r--r--source/blender/editors/interface/interface_ops.c6
-rw-r--r--source/blender/editors/physics/physics_fluid.c12
-rw-r--r--source/blender/editors/space_text/text_ops.c7
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c2
-rw-r--r--source/blender/gpu/intern/gpu_context.cpp3
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c3
-rw-r--r--source/blender/makesrna/intern/rna_curve.c5
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c6
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c5
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c6
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c72
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c22
-rw-r--r--source/blender/makesrna/intern/rna_object.c6
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c2
-rw-r--r--source/blender/makesrna/intern/rna_pose.c6
-rw-r--r--source/blender/makesrna/intern/rna_rna.c30
-rw-r--r--source/blender/makesrna/intern/rna_scene.c12
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c9
-rw-r--r--source/blender/makesrna/intern/rna_ui.c3
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c43
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c2
-rw-r--r--source/blender/modifiers/intern/MOD_ocean.c2
-rw-r--r--source/blender/physics/intern/BPH_mass_spring.cpp10
-rw-r--r--source/blender/physics/intern/implicit_blender.c59
-rw-r--r--source/blender/physics/intern/implicit_eigen.cpp12
33 files changed, 284 insertions, 174 deletions
diff --git a/source/blender/blenkernel/intern/mesh_runtime.c b/source/blender/blenkernel/intern/mesh_runtime.c
index dea64e64377..8d482a961b6 100644
--- a/source/blender/blenkernel/intern/mesh_runtime.c
+++ b/source/blender/blenkernel/intern/mesh_runtime.c
@@ -285,9 +285,15 @@ char *BKE_mesh_runtime_debug_info(Mesh *me_eval)
# if 0
const char *tstr;
switch (me_eval->type) {
- case DM_TYPE_CDDM: tstr = "DM_TYPE_CDDM"; break;
- case DM_TYPE_CCGDM: tstr = "DM_TYPE_CCGDM"; break;
- default: tstr = "UNKNOWN"; break;
+ case DM_TYPE_CDDM:
+ tstr = "DM_TYPE_CDDM";
+ break;
+ case DM_TYPE_CCGDM:
+ tstr = "DM_TYPE_CCGDM";
+ break;
+ default:
+ tstr = "UNKNOWN";
+ break;
}
BLI_dynstr_appendf(dynstr, " 'type': '%s',\n", tstr);
# endif
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 23cdf802c81..50c72f5a57f 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -2453,7 +2453,7 @@ static void update_flowsfluids(
EmissionMap em_temp = {NULL};
float sample_size = 1.0f / (float)(subframes + 1);
# if 0
- float prev_frame_pos = sample_size * (float)(subframe+1);
+ float prev_frame_pos = sample_size * (float)(subframe + 1);
# endif
float sdt = dt * sample_size;
int hires_multiplier = 1;
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 383542fa335..b521aa2f954 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -391,27 +391,26 @@ void BKE_sound_load(struct Main *bmain, bSound *sound)
/* XXX unused currently */
# if 0
- switch (sound->type)
- {
+ switch (sound->type) {
case SOUND_TYPE_FILE:
# endif
- {
- char fullpath[FILE_MAX];
-
- /* load sound */
- PackedFile *pf = sound->packedfile;
-
- /* don't modify soundact->sound->name, only change a copy */
- BLI_strncpy(fullpath, sound->name, sizeof(fullpath));
- BLI_path_abs(fullpath, ID_BLEND_PATH(bmain, &sound->id));
-
- /* but we need a packed file then */
- if (pf)
- sound->handle = AUD_Sound_bufferFile((unsigned char *)pf->data, pf->size);
- /* or else load it from disk */
- else
- sound->handle = AUD_Sound_file(fullpath);
- }
+ {
+ char fullpath[FILE_MAX];
+
+ /* load sound */
+ PackedFile *pf = sound->packedfile;
+
+ /* don't modify soundact->sound->name, only change a copy */
+ BLI_strncpy(fullpath, sound->name, sizeof(fullpath));
+ BLI_path_abs(fullpath, ID_BLEND_PATH(bmain, &sound->id));
+
+ /* but we need a packed file then */
+ if (pf)
+ sound->handle = AUD_Sound_bufferFile((unsigned char *)pf->data, pf->size);
+ /* or else load it from disk */
+ else
+ sound->handle = AUD_Sound_file(fullpath);
+ }
/* XXX unused currently */
# if 0
break;
@@ -426,23 +425,23 @@ void BKE_sound_load(struct Main *bmain, bSound *sound)
break;
}
# endif
- if (sound->flags & SOUND_FLAGS_MONO) {
- void *handle = AUD_Sound_rechannel(sound->handle, AUD_CHANNELS_MONO);
- AUD_Sound_free(sound->handle);
- sound->handle = handle;
- }
+ if (sound->flags & SOUND_FLAGS_MONO) {
+ void *handle = AUD_Sound_rechannel(sound->handle, AUD_CHANNELS_MONO);
+ AUD_Sound_free(sound->handle);
+ sound->handle = handle;
+ }
- if (sound->flags & SOUND_FLAGS_CACHING) {
- sound->cache = AUD_Sound_cache(sound->handle);
- }
+ if (sound->flags & SOUND_FLAGS_CACHING) {
+ sound->cache = AUD_Sound_cache(sound->handle);
+ }
- if (sound->cache)
- sound->playback_handle = sound->cache;
- else
- sound->playback_handle = sound->handle;
+ if (sound->cache)
+ sound->playback_handle = sound->cache;
+ else
+ sound->playback_handle = sound->handle;
- BKE_sound_update_sequencer(bmain, sound);
- }
+ BKE_sound_update_sequencer(bmain, sound);
+}
}
AUD_Device *BKE_sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume)
diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c
index 6f363e51b49..3f2c93f570e 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.c
+++ b/source/blender/bmesh/intern/bmesh_polygon.c
@@ -1432,7 +1432,8 @@ void BM_mesh_calc_tessellation(BMesh *bm, BMLoop *(*looptris)[3], int *r_looptri
else if (efa->len == 3) {
# if 0
int j;
- BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, j) {
+ BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, j)
+ {
looptris[i][j] = l;
}
i += 1;
@@ -1450,7 +1451,8 @@ void BM_mesh_calc_tessellation(BMesh *bm, BMLoop *(*looptris)[3], int *r_looptri
BMLoop *ltmp[4];
int j;
BLI_array_grow_items(looptris, 2);
- BM_ITER_ELEM_INDEX (l, &liter, efa, BM_LOOPS_OF_FACE, j) {
+ BM_ITER_ELEM_INDEX(l, &liter, efa, BM_LOOPS_OF_FACE, j)
+ {
ltmp[j] = l;
}
diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c
index 724b974c50f..0bb81779ed0 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -190,10 +190,9 @@ static void bm_loop_customdata_merge(BMesh *bm,
# if 0
&&
/* check if the data ends up diverged */
- (CustomData_data_equals(
- type,
- BM_ELEM_CD_GET_VOID_P(l_a_inner, offset),
- BM_ELEM_CD_GET_VOID_P(l_b_inner, offset)) == false)
+ (CustomData_data_equals(type,
+ BM_ELEM_CD_GET_VOID_P(l_a_inner, offset),
+ BM_ELEM_CD_GET_VOID_P(l_b_inner, offset)) == false)
# endif
) {
/* no need to allocate a temp block:
diff --git a/source/blender/compositor/intern/COM_Debug.cpp b/source/blender/compositor/intern/COM_Debug.cpp
index 67ac350de83..b977154db1a 100644
--- a/source/blender/compositor/intern/COM_Debug.cpp
+++ b/source/blender/compositor/intern/COM_Debug.cpp
@@ -315,10 +315,13 @@ bool DebugInfo::graphviz_system(const ExecutionSystem *system, char *str, int ma
# if 0
for (ExecutionSystem::Operations::const_iterator it = system->m_operations.begin();
- it != system->m_operations.end(); ++it)
- {
+ it != system->m_operations.end();
+ ++it) {
NodeOperation *op = *it;
- len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "// OPERATION: %s\r\n", node->getbNode()->typeinfo->ui_name);
+ len += snprintf(str + len,
+ maxlen > len ? maxlen - len : 0,
+ "// OPERATION: %s\r\n",
+ node->getbNode()->typeinfo->ui_name);
}
# endif
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 3ab6f9aa5e9..4b66461e186 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -731,9 +731,11 @@ static void init_internal_icons(void)
bbuf = IMB_loadiffname(iconfilestr, IB_rect, NULL);
if (bbuf && (bbuf->x < ICON_IMAGE_W || bbuf->y < ICON_IMAGE_H)) {
- printf("\n***WARNING***\n"
- "Icons file '%s' too small.\n"
- "Using built-in Icons instead\n", iconfilestr);
+ printf(
+ "\n***WARNING***\n"
+ "Icons file '%s' too small.\n"
+ "Using built-in Icons instead\n",
+ iconfilestr);
IMB_freeImBuf(bbuf);
bbuf = NULL;
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 537a1d4c851..768cc32aeb5 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -1125,8 +1125,7 @@ static void ui_editsource_active_but_clear(void)
static bool ui_editsource_uibut_match(uiBut *but_a, uiBut *but_b)
{
# if 0
- printf("matching buttons: '%s' == '%s'\n",
- but_a->drawstr, but_b->drawstr);
+ printf("matching buttons: '%s' == '%s'\n", but_a->drawstr, but_b->drawstr);
# endif
/* this just needs to be a 'good-enough' comparison so we can know beyond
@@ -1153,8 +1152,7 @@ void UI_editsource_active_but_test(uiBut *but)
int lineno = -1;
# if 0
- printf("comparing buttons: '%s' == '%s'\n",
- but->drawstr, ui_editsource_info->but_orig.drawstr);
+ printf("comparing buttons: '%s' == '%s'\n", but->drawstr, ui_editsource_info->but_orig.drawstr);
# endif
PyC_FileAndNum_Safe(&fn, &lineno);
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 2769d1a9dc3..65fb58efe6d 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -185,16 +185,18 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char
}
fprintf(file, " CHANNEL %s =\n", str);
- for (i=0; i < channelSize; i++) {
+ for (i = 0; i < channelSize; i++) {
fprintf(file, " ");
- for (j=0;j <= entries;j++) { // also print time value
- fprintf(file, " %f ", channel[i*(entries + 1) + j]);
- if (j == entries-1) { fprintf(file, " "); }
+ for (j = 0; j <= entries; j++) { // also print time value
+ fprintf(file, " %f ", channel[i * (entries + 1) + j]);
+ if (j == entries - 1) {
+ fprintf(file, " ");
+ }
}
fprintf(file, "\n");
}
- fprintf(file, " ;\n");
+ fprintf(file, " ;\n");
}
# endif
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index c069fc600e8..f2fdffb15c8 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -689,9 +689,9 @@ static int text_refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUS
for (con = pchan->constraints.first; con; con = con->next) {
if (con->type == CONSTRAINT_TYPE_PYTHON) {
bPythonConstraint *data = con->data;
- if (data->text == text) BPY_pyconstraint_update(ob, con);
+ if (data->text == text)
+ BPY_pyconstraint_update(ob, con);
update = 1;
-
}
}
}
@@ -699,7 +699,8 @@ static int text_refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUS
for (con = ob->constraints.first; con; con = con->next) {
if (con->type == CONSTRAINT_TYPE_PYTHON) {
bPythonConstraint *data = con->data;
- if (data->text == text) BPY_pyconstraint_update(ob, con);
+ if (data->text == text)
+ BPY_pyconstraint_update(ob, con);
update = 1;
}
}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 4610111aafa..2c831c0877c 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -967,7 +967,7 @@ static void draw_rotation_guide(const RegionView3D *rv3d)
immVertex3fv(pos, end);
# if 0
- color[3] = 0.2f + fabsf(rv3d->rot_angle); /* modulate opacity with angle */
+ color[3] = 0.2f + fabsf(rv3d->rot_angle); /* modulate opacity with angle */
/* ^^ neat idea, but angle is frame-rate dependent, so it's usually close to 0.2 */
# endif
diff --git a/source/blender/gpu/intern/gpu_context.cpp b/source/blender/gpu/intern/gpu_context.cpp
index 8e489fbac39..4bfc44327c2 100644
--- a/source/blender/gpu/intern/gpu_context.cpp
+++ b/source/blender/gpu/intern/gpu_context.cpp
@@ -49,7 +49,8 @@ extern "C" {
extern int BLI_thread_is_main(void); /* Blender-specific function */
}
-static bool thread_is_main() {
+static bool thread_is_main()
+{
/* "main" here means the GL context's thread */
return BLI_thread_is_main();
}
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index b1a2ec32a88..160634307f9 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -788,7 +788,8 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "max_spring_extensions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxspringlen");
RNA_def_property_range(prop, 1.0, 1000.0);
- RNA_def_property_ui_text(prop, "Maximum Spring Extension", "Maximum extension before spring gets cut");
+ RNA_def_property_ui_text(
+ prop, "Maximum Spring Extension", "Maximum extension before spring gets cut");
# endif
}
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 448ea1387f4..2e021d7ae15 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -1311,10 +1311,11 @@ static void rna_def_charinfo(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_WRAP);
RNA_def_property_ui_text(prop, "Wrap", "");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data"); */
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
+ * /
# endif
- prop = RNA_def_property(srna, "use_small_caps", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_small_caps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_CHINFO_SMALLCAPS);
RNA_def_property_ui_text(prop, "Small Caps", "");
RNA_def_property_ui_icon(prop, ICON_SMALL_CAPS, 0);
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index d8a687fdb84..f4026b5025c 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -1518,12 +1518,12 @@ static void rna_def_fmodifier(BlenderRNA *brna)
RNA_def_struct_refine_func(srna, "rna_FModifierType_refine");
RNA_def_struct_ui_text(srna, "F-Modifier", "Modifier for values of F-Curve");
-# if 0 /* XXX not used yet */
- /* name */
+# if 0 /* XXX not used yet */
+ /* name */
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_ui_text(prop, "Name", "Short description of F-Curve Modifier");
-# endif /* XXX not used yet */
+# endif /* XXX not used yet */
/* type */
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 076f0d8b85a..d1ae46a74f7 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -1665,8 +1665,9 @@ static void rna_def_modifier_gpencilarmature(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_multi_modifier", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
RNA_def_property_ui_text(
- prop, "Multi Modifier",
- "Use same input as previous modifier, and mix results using overall vgroup");
+ prop,
+ "Multi Modifier",
+ "Use same input as previous modifier, and mix results using overall vgroup");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_dependency_update");
# endif
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index a4ad07af6b7..c76e243e100 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -1030,7 +1030,8 @@ static void rna_MeshPoly_vertices_set(PointerRNA *ptr, const int *values)
/* disabling, some importers don't know the total material count when assigning materials */
# if 0
-static void rna_MeshPoly_material_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_MeshPoly_material_index_range(
+ PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
{
Mesh *me = rna_mesh(ptr);
*min = 0;
@@ -3041,7 +3042,8 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Texture Space Location", "Texture space location");
RNA_def_property_editable_func(prop, "rna_Mesh_texspace_editable");
- RNA_def_property_float_funcs(prop, "rna_Mesh_texspace_loc_get", "rna_Mesh_texspace_loc_set", NULL);
+ RNA_def_property_float_funcs(
+ prop, "rna_Mesh_texspace_loc_get", "rna_Mesh_texspace_loc_set", NULL);
RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
# endif
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 860c2c3ba89..1a986da1a94 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1049,8 +1049,10 @@ static const EnumPropertyItem *rna_DataTransferModifier_layers_select_src_itemf(
# if 0 /* XXX Don't think we want this in modifier version... */
if (BKE_object_pose_armature_get(ob_src)) {
- RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_SELECT);
- RNA_enum_items_add_value(&item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_DEFORM);
+ RNA_enum_items_add_value(
+ &item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_SELECT);
+ RNA_enum_items_add_value(
+ &item, &totitem, rna_enum_dt_layers_select_src_items, DT_LAYERS_VGROUP_SRC_BONE_DEFORM);
}
# endif
@@ -1373,16 +1375,28 @@ static PropertyRNA *rna_def_property_subdivision_common(StructRNA *srna, const c
"Smooth, keep corners",
"UVs are smoothed, corners on discontinuous boundary are kept sharp"},
# if 0
- {SUBSURF_UV_SMOOTH_PRESERVE_CORNERS_AND_JUNCTIONS, "PRESERVE_CORNERS_AND_JUNCTIONS", 0,
- "Smooth, keep corners+junctions", "UVs are smoothed, corners on discontinuous boundary and "
+ {SUBSURF_UV_SMOOTH_PRESERVE_CORNERS_AND_JUNCTIONS,
+ "PRESERVE_CORNERS_AND_JUNCTIONS",
+ 0,
+ "Smooth, keep corners+junctions",
+ "UVs are smoothed, corners on discontinuous boundary and "
"junctions of 3 or more regions are kept sharp"},
- {SUBSURF_UV_SMOOTH_PRESERVE_CORNERS_JUNCTIONS_AND_CONCAVE, "PRESERVE_CORNERS_JUNCTIONS_AND_CONCAVE", 0,
- "Smooth, keep corners+junctions+concave", "UVs are smoothed, corners on discontinuous boundary, "
+ {SUBSURF_UV_SMOOTH_PRESERVE_CORNERS_JUNCTIONS_AND_CONCAVE,
+ "PRESERVE_CORNERS_JUNCTIONS_AND_CONCAVE",
+ 0,
+ "Smooth, keep corners+junctions+concave",
+ "UVs are smoothed, corners on discontinuous boundary, "
"junctions of 3 or more regions and darts and concave corners are kept sharp"},
- {SUBSURF_UV_SMOOTH_PRESERVE_BOUNDARIES, "PRESERVE_BOUNDARIES", 0,
- "Smooth, keep corners", "UVs are smoothed, boundaries are kept sharp"},
- {SUBSURF_UV_SMOOTH_ALL, "PRESERVE_BOUNDARIES", 0,
- "Smooth all", "UVs and boundaries are smoothed"},
+ {SUBSURF_UV_SMOOTH_PRESERVE_BOUNDARIES,
+ "PRESERVE_BOUNDARIES",
+ 0,
+ "Smooth, keep corners",
+ "UVs are smoothed, boundaries are kept sharp"},
+ {SUBSURF_UV_SMOOTH_ALL,
+ "PRESERVE_BOUNDARIES",
+ 0,
+ "Smooth all",
+ "UVs and boundaries are smoothed"},
# endif
{0, NULL, 0, NULL, NULL},
};
@@ -2956,9 +2970,9 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna)
PropertyRNA *prop;
# if 0
static const EnumPropertyItem prop_mode_items[] = {
- {0, "VOLUME", 0, "Volume", "Bind to volume inside cage mesh"},
- {1, "SURFACE", 0, "Surface", "Bind to surface of cage mesh"},
- {0, NULL, 0, NULL, NULL},
+ {0, "VOLUME", 0, "Volume", "Bind to volume inside cage mesh"},
+ {1, "SURFACE", 0, "Surface", "Bind to surface of cage mesh"},
+ {0, NULL, 0, NULL, NULL},
};
# endif
@@ -4109,7 +4123,8 @@ static void rna_def_modifier_screw(BlenderRNA *brna)
# if 0
prop = RNA_def_property(srna, "use_angle_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_SCREW_OBJECT_ANGLE);
- RNA_def_property_ui_text(prop, "Object Angle", "Use the angle between the objects rather than the fixed angle");
+ RNA_def_property_ui_text(
+ prop, "Object Angle", "Use the angle between the objects rather than the fixed angle");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
# endif
}
@@ -4643,8 +4658,11 @@ static void rna_def_modifier_ocean(BlenderRNA *brna)
"Displace",
"Displace existing geometry according to simulation"},
# if 0
- {MOD_OCEAN_GEOM_SIM_ONLY, "SIM_ONLY", 0, "Sim Only",
- "Leaves geometry unchanged, but still runs simulation (to be used from texture)"},
+ {MOD_OCEAN_GEOM_SIM_ONLY,
+ "SIM_ONLY",
+ 0,
+ "Sim Only",
+ "Leaves geometry unchanged, but still runs simulation (to be used from texture)"},
# endif
{0, NULL, 0, NULL, NULL},
};
@@ -5457,10 +5475,15 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");
# if 0
- prop = RNA_def_enum(srna, "layers_shapekey_select_src", rna_enum_dt_layers_select_src_items, DT_LAYERS_ALL_SRC,
- "Source Layers Selection", "Which layers to transfer, in case of multi-layers types");
+ prop = RNA_def_enum(srna,
+ "layers_shapekey_select_src",
+ rna_enum_dt_layers_select_src_items,
+ DT_LAYERS_ALL_SRC,
+ "Source Layers Selection",
+ "Which layers to transfer, in case of multi-layers types");
RNA_def_property_enum_sdna(prop, NULL, "layers_select_src[DT_MULTILAYER_INDEX_SHAPEKEY]");
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf");
+ RNA_def_property_enum_funcs(
+ prop, NULL, NULL, "rna_DataTransferModifier_layers_select_src_itemf");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
# endif
@@ -5498,10 +5521,15 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");
# if 0
- prop = RNA_def_enum(srna, "layers_shapekey_select_dst", rna_enum_dt_layers_select_dst_items, DT_LAYERS_NAME_DST,
- "Destination Layers Matching", "How to match source and destination layers");
+ prop = RNA_def_enum(srna,
+ "layers_shapekey_select_dst",
+ rna_enum_dt_layers_select_dst_items,
+ DT_LAYERS_NAME_DST,
+ "Destination Layers Matching",
+ "How to match source and destination layers");
RNA_def_property_enum_sdna(prop, NULL, "layers_select_dst[DT_MULTILAYER_INDEX_SHAPEKEY]");
- RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf");
+ RNA_def_property_enum_funcs(
+ prop, NULL, NULL, "rna_DataTransferModifier_layers_select_dst_itemf");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
# endif
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index fb0ee247598..8a064bd065d 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -4990,7 +4990,7 @@ static void def_sh_script(StructRNA *srna)
RNA_def_function_ui_description(func, "Find a socket by name");
parm = RNA_def_string(func, "name", NULL, 0, "Socket name", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- /*parm =*/ RNA_def_boolean(func, "is_output", false, "Output", "Whether the socket is an output");
+ /*parm =*/RNA_def_boolean(func, "is_output", false, "Output", "Whether the socket is an output");
parm = RNA_def_pointer(func, "result", "NodeSocket", "", "");
RNA_def_function_return(func, parm);
@@ -5001,7 +5001,7 @@ static void def_sh_script(StructRNA *srna)
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_enum(func, "type", node_socket_type_items, SOCK_FLOAT, "Type", "");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- /*parm =*/ RNA_def_boolean(func, "is_output", false, "Output", "Whether the socket is an output");
+ /*parm =*/RNA_def_boolean(func, "is_output", false, "Output", "Whether the socket is an output");
parm = RNA_def_pointer(func, "result", "NodeSocket", "", "");
RNA_def_function_return(func, parm);
@@ -5335,11 +5335,11 @@ static void def_cmp_image(StructRNA *srna)
# if 0
static const EnumPropertyItem type_items[] = {
- {IMA_SRC_FILE, "IMAGE", 0, "Image", ""},
- {IMA_SRC_MOVIE, "MOVIE", "Movie", ""},
- {IMA_SRC_SEQUENCE, "SEQUENCE", "Sequence", ""},
- {IMA_SRC_GENERATED, "GENERATED", "Generated", ""},
- {0, NULL, 0, NULL, NULL},
+ {IMA_SRC_FILE, "IMAGE", 0, "Image", ""},
+ {IMA_SRC_MOVIE, "MOVIE", "Movie", ""},
+ {IMA_SRC_SEQUENCE, "SEQUENCE", "Sequence", ""},
+ {IMA_SRC_GENERATED, "GENERATED", "Generated", ""},
+ {0, NULL, 0, NULL, NULL},
};
# endif
@@ -6891,9 +6891,11 @@ static void def_cmp_bokehblur(StructRNA *srna)
prop = RNA_def_property(srna, "f_stop", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "custom3");
RNA_def_property_range(prop, 0.0f, 128.0f);
- RNA_def_property_ui_text(prop, "F-stop",
- "Amount of focal blur, 128=infinity=perfect focus, half the value doubles "
- "the blur radius");
+ RNA_def_property_ui_text(
+ prop,
+ "F-stop",
+ "Amount of focal blur, 128=infinity=perfect focus, half the value doubles "
+ "the blur radius");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
# endif
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index b36e6490e5f..6aed3003ab9 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -2521,8 +2521,10 @@ static void rna_def_object(BlenderRNA *brna)
/* FIXME: this is not a single field any more! (drotAxis and drotAngle) */
RNA_def_property_float_sdna(prop, NULL, "dquat");
RNA_def_property_float_array_default(prop, rna_default_axis_angle);
- RNA_def_property_ui_text(prop, "Delta Rotation (Axis Angle)",
- "Extra rotation added to the rotation of the object (when using Axis-Angle rotations)");
+ RNA_def_property_ui_text(
+ prop,
+ "Delta Rotation (Axis Angle)",
+ "Extra rotation added to the rotation of the object (when using Axis-Angle rotations)");
RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update");
# endif
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 7862671b867..63ccc10afb2 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -439,8 +439,8 @@ static void rna_Object_shape_key_remove(Object *ob,
}
# if 0
-static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int *indices, int totindex,
- float weight, int assignmode)
+static void rna_Mesh_assign_verts_to_group(
+ Object *ob, bDeformGroup *group, int *indices, int totindex, float weight, int assignmode)
{
if (ob->type != OB_MESH) {
BKE_report(reports, RPT_ERROR, "Object should be of mesh type");
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 157d011eb72..4cafa42c9fc 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -537,7 +537,7 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point
if (ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE) {
Curve *cu = ob->data;
cu->flag |= (CU_PATH | CU_3D);
- do_curvebuts(B_CU3D); /* all curves too */
+ do_curvebuts(B_CU3D); /* all curves too */
}
# endif
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 4b764529562..5f652777481 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -461,8 +461,10 @@ static void rna_pose_bgroup_name_index_get(PointerRNA *ptr, char *value, int ind
grp = BLI_findlink(&pose->agroups, index - 1);
- if (grp) BLI_strncpy(value, grp->name, sizeof(grp->name));
- else value[0] = '\0';
+ if (grp)
+ BLI_strncpy(value, grp->name, sizeof(grp->name));
+ else
+ value[0] = '\0';
}
static int rna_pose_bgroup_name_index_length(PointerRNA *ptr, int index)
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index aa5ea62657b..16897a2b4d6 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -1685,11 +1685,19 @@ int rna_property_override_diff_default(Main *bmain,
# if 0
if (rna_path) {
- printf("Checking %s, %s [%d] vs %s [%d]; is_id: %d, diffing: %d; "
- "insert: %d (could be used: %d, do_create: %d)\n",
- rna_path, propname_a ? propname_a : "", idx_a, propname_b ? propname_b : "", idx_b,
- is_id, is_valid_for_diffing, is_valid_for_insertion,
- (RNA_property_override_flag(prop_a) & PROPOVERRIDE_STATIC_INSERTION) != 0, do_create);
+ printf(
+ "Checking %s, %s [%d] vs %s [%d]; is_id: %d, diffing: %d; "
+ "insert: %d (could be used: %d, do_create: %d)\n",
+ rna_path,
+ propname_a ? propname_a : "",
+ idx_a,
+ propname_b ? propname_b : "",
+ idx_b,
+ is_id,
+ is_valid_for_diffing,
+ is_valid_for_insertion,
+ (RNA_property_override_flag(prop_a) & PROPOVERRIDE_STATIC_INSERTION) != 0,
+ do_create);
}
# endif
@@ -3045,11 +3053,17 @@ void RNA_def_rna(BlenderRNA *brna)
prop = RNA_def_property(srna, "structs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Struct");
- RNA_def_property_collection_funcs(prop, "rna_BlenderRNA_structs_begin", "rna_iterator_listbase_next",
- "rna_iterator_listbase_end", "rna_iterator_listbase_get",
+ RNA_def_property_collection_funcs(prop,
+ "rna_BlenderRNA_structs_begin",
+ "rna_iterator_listbase_next",
+ "rna_iterator_listbase_end",
+ "rna_iterator_listbase_get",
/* included for speed, can be removed */
# if 0
- NULL, NULL, NULL, NULL);
+ NULL,
+ NULL,
+ NULL,
+ NULL);
# else
"rna_BlenderRNA_structs_length",
"rna_BlenderRNA_structs_lookup_int",
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index c80abb239a3..e14f499e714 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -6080,7 +6080,8 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "seq_rend_type");
RNA_def_property_enum_items(prop, rna_enum_shading_type_items);
/* XXX Label and tooltips are obviously wrong! */
- RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view");
+ RNA_def_property_ui_text(
+ prop, "Sequencer Preview Shading", "Method to draw in the sequencer view");
# endif
prop = RNA_def_property(srna, "use_sequencer_gl_textured_solid", PROP_BOOLEAN, PROP_NONE);
@@ -7314,7 +7315,8 @@ void RNA_def_scene(BlenderRNA *brna)
# if 0 /* XXX: Is this actually needed? */
prop = RNA_def_property(srna, "use_frame_drop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_FRAME_DROP);
- RNA_def_property_ui_text(prop, "Frame Dropping", "Play back dropping frames if frame display is too slow");
+ RNA_def_property_ui_text(
+ prop, "Frame Dropping", "Play back dropping frames if frame display is too slow");
RNA_def_property_update(prop, NC_SCENE, NULL);
# endif
@@ -7455,8 +7457,10 @@ void RNA_def_scene(BlenderRNA *brna)
# if 0 /* XXX: Is this actually needed? */
prop = RNA_def_property(srna, "use_audio_sync", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
- RNA_def_property_ui_text(prop, "Audio Sync",
- "Play back and sync with audio clock, dropping frames if frame display is too slow");
+ RNA_def_property_ui_text(
+ prop,
+ "Audio Sync",
+ "Play back and sync with audio clock, dropping frames if frame display is too slow");
RNA_def_property_update(prop, NC_SCENE, NULL);
# endif
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index a00d4c99455..01ea7471b29 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -729,7 +729,10 @@ static int rna_Sequence_input_count_get(PointerRNA *ptr)
static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
{
Sequence *seq = (Sequence *)(ptr->data);
- BLI_split_dirfile(value, seq->strip->dir, seq->strip->stripdata->name, sizeof(seq->strip->dir),
+ BLI_split_dirfile(value,
+ seq->strip->dir,
+ seq->strip->stripdata->name,
+ sizeof(seq->strip->dir),
sizeof(seq->strip->stripdata->name));
}
@@ -1954,8 +1957,8 @@ static void rna_def_effect_inputs(StructRNA *srna, int count)
}
# if 0
- if (count == 3) { // not used by any effects (perhaps one day plugins?)
- prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
+ if (count == 3) { // not used by any effects (perhaps one day plugins?)
+ prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "seq3");
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 1941f1bc1b2..dd378c60c72 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -1171,7 +1171,8 @@ static void rna_def_ui_layout(BlenderRNA *brna)
# if 0
prop = RNA_def_property(srna, "keep_aspect", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_funcs(prop, "rna_UILayout_keep_aspect_get", "rna_UILayout_keep_aspect_set");
+ RNA_def_property_boolean_funcs(
+ prop, "rna_UILayout_keep_aspect_get", "rna_UILayout_keep_aspect_set");
# endif
prop = RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_UNSIGNED);
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index d8e13fda114..e9ea8e6c838 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -878,30 +878,49 @@ void RNA_api_ui_layout(StructRNA *srna)
api_ui_item_op_common(func);
parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_boolean(func, "value", false, "", "Value of the property to call the operator with");
- RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); */
+ parm = RNA_def_boolean(
+ func, "value", false, "", "Value of the property to call the operator with");
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
+ * /
- func = RNA_def_function(srna, "operator_int", "uiItemIntO");
+ func = RNA_def_function(srna, "operator_int", "uiItemIntO");
api_ui_item_op_common(func);
parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "",
- "Value of the property to call the operator with", INT_MIN, INT_MAX);
- RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); */
+ parm = RNA_def_int(func,
+ "value",
+ 0,
+ INT_MIN,
+ INT_MAX,
+ "",
+ "Value of the property to call the operator with",
+ INT_MIN,
+ INT_MAX);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
+ * /
- func = RNA_def_function(srna, "operator_float", "uiItemFloatO");
+ func = RNA_def_function(srna, "operator_float", "uiItemFloatO");
api_ui_item_op_common(func);
parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "",
- "Value of the property to call the operator with", -FLT_MAX, FLT_MAX);
- RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); */
+ parm = RNA_def_float(func,
+ "value",
+ 0,
+ -FLT_MAX,
+ FLT_MAX,
+ "",
+ "Value of the property to call the operator with",
+ -FLT_MAX,
+ FLT_MAX);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
+ * /
- func = RNA_def_function(srna, "operator_string", "uiItemStringO");
+ func = RNA_def_function(srna, "operator_string", "uiItemStringO");
api_ui_item_op_common(func);
parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_string(func, "value", NULL, 0, "", "Value of the property to call the operator with");
+ parm = RNA_def_string(
+ func, "value", NULL, 0, "", "Value of the property to call the operator with");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
# endif
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 5a017e96fa7..54a880293ad 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -5128,7 +5128,7 @@ static void rna_def_userdef_input(BlenderRNA *brna)
prop = RNA_def_boolean(srna, "use_ndof", true, "", "");
# else
prop = RNA_def_boolean(srna, "use_ndof", false, "", "");
-# endif /* WITH_INPUT_NDOF */
+# endif /* WITH_INPUT_NDOF */
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c
index 983ea7b4309..ce1554b7e33 100644
--- a/source/blender/modifiers/intern/MOD_ocean.c
+++ b/source/blender/modifiers/intern/MOD_ocean.c
@@ -132,7 +132,7 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla
{
#ifdef WITH_OCEANSIM
# if 0
- const OceanModifierData *omd = (const OceanModifierData *) md;
+ const OceanModifierData *omd = (const OceanModifierData *)md;
# endif
OceanModifierData *tomd = (OceanModifierData *)target;
diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp
index d035a8cc7af..8eb22bd57ad 100644
--- a/source/blender/physics/intern/BPH_mass_spring.cpp
+++ b/source/blender/physics/intern/BPH_mass_spring.cpp
@@ -480,13 +480,15 @@ BLI_INLINE void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s)
BPH_mass_spring_get_motion_state(data, s->mn, x_mn, v);
BKE_sim_debug_data_add_dot(clmd->debug_data, x_kl, 0.9, 0.9, 0.9, "target", 7980, s->kl);
- BKE_sim_debug_data_add_line(clmd->debug_data, x_kl, x_mn, 0.8, 0.8, 0.8, "target", 7981, s->kl);
+ BKE_sim_debug_data_add_line(
+ clmd->debug_data, x_kl, x_mn, 0.8, 0.8, 0.8, "target", 7981, s->kl);
copy_v3_v3(d, s->target);
- BKE_sim_debug_data_add_vector(clmd->debug_data, x_kl, d, 0.8, 0.8, 0.2, "target", 7982, s->kl);
+ BKE_sim_debug_data_add_vector(
+ clmd->debug_data, x_kl, d, 0.8, 0.8, 0.2, "target", 7982, s->kl);
-// copy_v3_v3(d, s->target_ij);
-// BKE_sim_debug_data_add_vector(clmd->debug_data, x, d, 1, 0.4, 0.4, "target", 7983, s->kl);
+ // copy_v3_v3(d, s->target_ij);
+ // BKE_sim_debug_data_add_vector(clmd->debug_data, x, d, 1, 0.4, 0.4, "target", 7983, s->kl);
}
# endif
#endif
diff --git a/source/blender/physics/intern/implicit_blender.c b/source/blender/physics/intern/implicit_blender.c
index 622a7093fd4..b81dcd70d88 100644
--- a/source/blender/physics/intern/implicit_blender.c
+++ b/source/blender/physics/intern/implicit_blender.c
@@ -126,7 +126,7 @@ static void print_fvector(float m3[3])
// long float vector float (*)[3]
///////////////////////////
/* print long vector on console: for debug output */
-DO_INLINE void print_lfvector(float(*fLongVector)[3], unsigned int verts)
+DO_INLINE void print_lfvector(float (*fLongVector)[3], unsigned int verts)
{
unsigned int i = 0;
for (i = 0; i < verts; i++) {
@@ -325,9 +325,9 @@ static void print_bfmatrix(fmatrix3x3 *m)
for (j = 0; j < 3; ++j) {
for (i = 0; i < 3; ++i) {
-// if (t[k + i + (l + j) * size] != 0.0f) {
-// printf("warning: overwriting value at %d, %d\n", m[q].r, m[q].c);
-// }
+ // if (t[k + i + (l + j) * size] != 0.0f) {
+ // printf("warning: overwriting value at %d, %d\n", m[q].r, m[q].c);
+ // }
if (k == l) {
t[k + i + (k + j) * size] += m[q].m[i][j];
}
@@ -412,7 +412,6 @@ DO_INLINE void inverse_fmatrix(float to[3][3], float from[3][3])
*/
}
}
-
}
# endif
@@ -534,8 +533,7 @@ static void print_bfmatrix(fmatrix3x3 *m3)
{
unsigned int i = 0;
- for (i = 0; i < m3[0].vcount + m3[0].scount; i++)
- {
+ for (i = 0; i < m3[0].vcount + m3[0].scount; i++) {
print_fmatrix(m3[i].m);
}
}
@@ -769,7 +767,7 @@ DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
}
# if 0 /* this version of the CG algorithm does not work very well with partial constraints (where S has non-zero elements) */
-static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S)
+static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S)
{
// Solves for unknown X in equation AX=B
unsigned int conjgrad_loopcount = 0, conjgrad_looplimit = 100;
@@ -831,7 +829,8 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z
del_lfvector(r);
// printf("W/O conjgrad_loopcount: %d\n", conjgrad_loopcount);
- return conjgrad_loopcount < conjgrad_looplimit; // true means we reached desired accuracy in given time - ie stable
+ return conjgrad_loopcount <
+ conjgrad_looplimit; // true means we reached desired accuracy in given time - ie stable
}
# endif
@@ -937,22 +936,27 @@ DO_INLINE void BuildPPinv(fmatrix3x3 *lA, fmatrix3x3 *P, fmatrix3x3 *Pinv)
unsigned int i = 0;
// Take only the diagonal blocks of A
-// #pragma omp parallel for private(i) if (lA[0].vcount > CLOTH_OPENMP_LIMIT)
+ // #pragma omp parallel for private(i) if (lA[0].vcount > CLOTH_OPENMP_LIMIT)
for (i = 0; i < lA[0].vcount; i++) {
// block diagonalizer
cp_fmatrix(P[i].m, lA[i].m);
inverse_fmatrix(Pinv[i].m, P[i].m);
-
}
}
# if 0
// version 1.3
-static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S, fmatrix3x3 *P, fmatrix3x3 *Pinv)
+static int cg_filtered_pre(lfVector *dv,
+ fmatrix3x3 *lA,
+ lfVector *lB,
+ lfVector *z,
+ fmatrix3x3 *S,
+ fmatrix3x3 *P,
+ fmatrix3x3 *Pinv)
{
unsigned int numverts = lA[0].vcount, iterations = 0, conjgrad_looplimit = 100;
float delta0 = 0, deltaNew = 0, deltaOld = 0, alpha = 0;
- float conjgrad_epsilon = 0.0001; // 0.2 is dt for steps=5
+ float conjgrad_epsilon = 0.0001; // 0.2 is dt for steps=5
lfVector *r = create_lfvector(numverts);
lfVector *p = create_lfvector(numverts);
lfVector *s = create_lfvector(numverts);
@@ -978,8 +982,7 @@ static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector
double start = PIL_check_seconds_timer();
# endif
- while ((deltaNew > delta0) && (iterations < conjgrad_looplimit))
- {
+ while ((deltaNew > delta0) && (iterations < conjgrad_looplimit)) {
iterations++;
mul_bfmatrix_lfvector(s, lA, p);
@@ -1001,7 +1004,6 @@ static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector
add_lfvector_lfvectorS(p, h, p, deltaNew / deltaOld, numverts);
filter(p, S);
-
}
# ifdef DEBUG_TIME
@@ -1021,7 +1023,14 @@ static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector
# endif
// version 1.4
-static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector *z, fmatrix3x3 *S, fmatrix3x3 *P, fmatrix3x3 *Pinv, fmatrix3x3 *bigI)
+static int cg_filtered_pre(lfVector *dv,
+ fmatrix3x3 *lA,
+ lfVector *lB,
+ lfVector *z,
+ fmatrix3x3 *S,
+ fmatrix3x3 *P,
+ fmatrix3x3 *Pinv,
+ fmatrix3x3 *bigI)
{
unsigned int numverts = lA[0].vcount, iterations = 0, conjgrad_looplimit = 100;
float delta0 = 0, deltaNew = 0, deltaOld = 0, alpha = 0, tol = 0;
@@ -1084,8 +1093,7 @@ static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector
tol = (0.01 * 0.2);
- while ((deltaNew > delta0 * tol * tol) && (iterations < conjgrad_looplimit))
- {
+ while ((deltaNew > delta0 * tol * tol) && (iterations < conjgrad_looplimit)) {
iterations++;
mul_bfmatrix_lfvector(s, lA, p);
@@ -1107,7 +1115,6 @@ static int cg_filtered_pre(lfVector *dv, fmatrix3x3 *lA, lfVector *lB, lfVector
add_lfvector_lfvectorS(p, h, p, deltaNew / deltaOld, numverts);
filter(p, S);
-
}
# ifdef DEBUG_TIME
@@ -1542,13 +1549,18 @@ BLI_INLINE void dfdx_spring(float to[3][3], const float dir[3], float length, fl
/* unused */
# if 0
-BLI_INLINE void dfdx_damp(float to[3][3], const float dir[3], float length, const float vel[3], float rest, float damping)
+BLI_INLINE void dfdx_damp(float to[3][3],
+ const float dir[3],
+ float length,
+ const float vel[3],
+ float rest,
+ float damping)
{
// inner spring damping vel is the relative velocity of the endpoints.
// return (I-outerprod(dir, dir)) * (-damping * -(dot(dir, vel)/Max(length, rest)));
mul_fvectorT_fvector(to, dir, dir);
sub_fmatrix_fmatrix(to, I, to);
- mul_fmatrix_S(to, (-damping * -(dot_v3v3(dir, vel) / MAX2(length, rest))));
+ mul_fmatrix_S(to, (-damping * -(dot_v3v3(dir, vel) / MAX2(length, rest))));
}
# endif
@@ -1618,8 +1630,7 @@ BLI_INLINE bool spring_length(Implicit_Data *data,
# if 0
if (length > L) {
if ((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) &&
- ( ((length - L) * 100.0f / L) > clmd->sim_parms->maxspringlen))
- {
+ (((length - L) * 100.0f / L) > clmd->sim_parms->maxspringlen)) {
// cut spring!
s->flags |= CSPRING_FLAG_DEACTIVATE;
return false;
diff --git a/source/blender/physics/intern/implicit_eigen.cpp b/source/blender/physics/intern/implicit_eigen.cpp
index 2b9761f0ccc..cfa3d653961 100644
--- a/source/blender/physics/intern/implicit_eigen.cpp
+++ b/source/blender/physics/intern/implicit_eigen.cpp
@@ -867,13 +867,18 @@ BLI_INLINE void dfdx_spring(float to[3][3], const float dir[3], float length, fl
/* unused */
# if 0
-BLI_INLINE void dfdx_damp(float to[3][3], const float dir[3], float length, const float vel[3], float rest, float damping)
+BLI_INLINE void dfdx_damp(float to[3][3],
+ const float dir[3],
+ float length,
+ const float vel[3],
+ float rest,
+ float damping)
{
// inner spring damping vel is the relative velocity of the endpoints.
// return (I-outerprod(dir, dir)) * (-damping * -(dot(dir, vel)/Max(length, rest)));
mul_fvectorT_fvector(to, dir, dir);
sub_fmatrix_fmatrix(to, I, to);
- mul_fmatrix_S(to, (-damping * -(dot_v3v3(dir, vel) / MAX2(length, rest))));
+ mul_fmatrix_S(to, (-damping * -(dot_v3v3(dir, vel) / MAX2(length, rest))));
}
# endif
@@ -940,8 +945,7 @@ BLI_INLINE bool spring_length(Implicit_Data *data,
# if 0
if (length > L) {
if ((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) &&
- ( ((length - L) * 100.0f / L) > clmd->sim_parms->maxspringlen))
- {
+ (((length - L) * 100.0f / L) > clmd->sim_parms->maxspringlen)) {
// cut spring!
s->flags |= CSPRING_FLAG_DEACTIVATE;
return false;