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>2018-08-24 03:26:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-08-24 03:32:57 +0300
commit0cf12dfc14f8312d9fe9db1d512dfb55104f6ac6 (patch)
tree008d2986e3d31ce851749c65272492b49d18647e
parent1c63a3a100414f504b25571fd0b8fd29af42922c (diff)
Cleanup: indentation, style
-rw-r--r--source/blender/blenkernel/intern/colortools.c8
-rw-r--r--source/blender/blenkernel/intern/multires_reshape.c16
-rw-r--r--source/blender/blenkernel/intern/subdiv_foreach.c21
-rw-r--r--source/blender/blenkernel/intern/subdiv_mesh.c16
-rw-r--r--source/blender/blenkernel/intern/tracking_stabilize.c2
-rw-r--r--source/blender/blenkernel/intern/tracking_util.c22
-rw-r--r--source/blender/compositor/nodes/COM_RenderLayersNode.cpp4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder.cc2
-rw-r--r--source/blender/draw/intern/draw_cache.c6
-rw-r--r--source/blender/editors/armature/pose_edit.c13
-rw-r--r--source/blender/python/mathutils/mathutils_noise.c146
11 files changed, 165 insertions, 91 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index ddf11d148cb..c934adc8762 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -962,15 +962,15 @@ static void curvemapping_evaluateRGBF_filmlike(const CurveMapping *cumap, float
* \param black Use instead of cumap->black
* \param bwmul Use instead of cumap->bwmul
*/
-void curvemapping_evaluate_premulRGBF_ex(const CurveMapping *cumap, float vecout[3], const float vecin[3],
- const float black[3], const float bwmul[3])
+void curvemapping_evaluate_premulRGBF_ex(
+ const CurveMapping *cumap, float vecout[3], const float vecin[3],
+ const float black[3], const float bwmul[3])
{
const float r = (vecin[0] - black[0]) * bwmul[0];
const float g = (vecin[1] - black[1]) * bwmul[1];
const float b = (vecin[2] - black[2]) * bwmul[2];
- switch (cumap->tone)
- {
+ switch (cumap->tone) {
default:
case CURVE_TONE_STANDARD:
{
diff --git a/source/blender/blenkernel/intern/multires_reshape.c b/source/blender/blenkernel/intern/multires_reshape.c
index a5235d00c1a..3fdd5de94f1 100644
--- a/source/blender/blenkernel/intern/multires_reshape.c
+++ b/source/blender/blenkernel/intern/multires_reshape.c
@@ -363,12 +363,13 @@ static Subdiv *multires_subdiv_for_reshape(struct Depsgraph *depsgraph,
return subdiv;
}
-static bool multires_reshape_from_vertcos(struct Depsgraph *depsgraph,
- Object *object,
- const MultiresModifierData *mmd,
- const float (*deformed_verts)[3],
- const int num_deformed_verts,
- const bool use_render_params)
+static bool multires_reshape_from_vertcos(
+ struct Depsgraph *depsgraph,
+ Object *object,
+ const MultiresModifierData *mmd,
+ const float (*deformed_verts)[3],
+ const int num_deformed_verts,
+ const bool use_render_params)
{
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
Mesh *coarse_mesh = object->data;
@@ -476,7 +477,8 @@ bool multiresModifier_reshapeFromDeformModifier(
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
/* Perform sanity checks and early output. */
if (multires_get_level(
- scene_eval, object, &highest_mmd, false, true) == 0) {
+ scene_eval, object, &highest_mmd, false, true) == 0)
+ {
return false;
}
/* Create mesh for the multires, ignoring any further modifiers (leading
diff --git a/source/blender/blenkernel/intern/subdiv_foreach.c b/source/blender/blenkernel/intern/subdiv_foreach.c
index 0f02df82cd5..d77bbe8a15d 100644
--- a/source/blender/blenkernel/intern/subdiv_foreach.c
+++ b/source/blender/blenkernel/intern/subdiv_foreach.c
@@ -746,15 +746,14 @@ static void subdiv_foreach_inner_vertices_special(
const int coarse_poly_index = coarse_poly - coarse_mesh->mpoly;
int ptex_face_index = ctx->face_ptex_offset[coarse_poly_index];
const int start_vertex_index = ctx->subdiv_vertex_offset[coarse_poly_index];
- int subdiv_vertex_index =
- ctx->vertices_inner_offset + start_vertex_index;
+ int subdiv_vertex_index = ctx->vertices_inner_offset + start_vertex_index;
ctx->foreach_context->vertex_inner(
- ctx->foreach_context,
+ ctx->foreach_context,
tls,
- ptex_face_index,
- 1.0f, 1.0f,
- coarse_poly_index, 0,
- subdiv_vertex_index);
+ ptex_face_index,
+ 1.0f, 1.0f,
+ coarse_poly_index, 0,
+ subdiv_vertex_index);
subdiv_vertex_index++;
for (int corner = 0;
corner < coarse_poly->totloop;
@@ -1135,9 +1134,9 @@ static void subdiv_foreach_edges_all_patches_special(
const bool flip = (coarse_edge->v2 == coarse_loop->v);
int side_start_index =
start_vertex_index + num_inner_vertices_per_ptex * corner;
- for (int i = 0; i < ptex_face_resolution - 2;
- i++,
- subdiv_edge_index++)
+ for (int i = 0;
+ i < ptex_face_resolution - 2;
+ i++, subdiv_edge_index++)
{
const int v1 = (flip)
? (start_edge_vertex + (resolution - i - 3))
@@ -1240,7 +1239,7 @@ static void subdiv_foreach_loops_of_poly(
int subdiv_loop_start_index,
const int ptex_face_index,
const int coarse_poly_index,
- const int coarse_corner_index,
+ const int coarse_corner_index,
const int rotation,
/*const*/ int v0, /*const*/ int e0,
/*const*/ int v1, /*const*/ int e1,
diff --git a/source/blender/blenkernel/intern/subdiv_mesh.c b/source/blender/blenkernel/intern/subdiv_mesh.c
index ae637031140..8f0b2bb8242 100644
--- a/source/blender/blenkernel/intern/subdiv_mesh.c
+++ b/source/blender/blenkernel/intern/subdiv_mesh.c
@@ -556,7 +556,7 @@ static void evaluate_vertex_and_apply_displacement_copy(
const int ptex_face_index,
const float u, const float v,
const MVert *coarse_vert,
- MVert *subdiv_vert)
+ MVert *subdiv_vert)
{
/* Displacement is accumulated in subdiv vertex position.
* need to back it up before copying data fro original vertex.
@@ -578,7 +578,7 @@ static void evaluate_vertex_and_apply_displacement_interpolate(
const int ptex_face_index,
const float u, const float v,
VerticesForInterpolation *vertex_interpolation,
- MVert *subdiv_vert)
+ MVert *subdiv_vert)
{
/* Displacement is accumulated in subdiv vertex position.
* need to back it up before copying data fro original vertex.
@@ -685,10 +685,11 @@ static void subdiv_mesh_ensure_vertex_interpolation(
}
/* Update it for a new corner if needed. */
if (!tls->vertex_interpolation_initialized ||
- tls->vertex_interpolation_coarse_corner != coarse_corner) {
+ tls->vertex_interpolation_coarse_corner != coarse_corner)
+ {
vertex_interpolation_from_corner(
ctx, &tls->vertex_interpolation, coarse_poly, coarse_corner);
- }
+ }
/* Store settings used for the current state of interpolator. */
tls->vertex_interpolation_initialized = true;
tls->vertex_interpolation_coarse_poly = coarse_poly;
@@ -861,10 +862,11 @@ static void subdiv_mesh_ensure_loop_interpolation(
}
/* Update it for a new corner if needed. */
if (!tls->loop_interpolation_initialized ||
- tls->loop_interpolation_coarse_corner != coarse_corner) {
+ tls->loop_interpolation_coarse_corner != coarse_corner)
+ {
loop_interpolation_from_corner(
ctx, &tls->loop_interpolation, coarse_poly, coarse_corner);
- }
+ }
/* Store settings used for the current state of interpolator. */
tls->loop_interpolation_initialized = true;
tls->loop_interpolation_coarse_poly = coarse_poly;
@@ -878,7 +880,7 @@ static void subdiv_mesh_loop(
const float u, const float v,
const int UNUSED(coarse_loop_index),
const int coarse_poly_index,
- const int coarse_corner,
+ const int coarse_corner,
const int subdiv_loop_index,
const int subdiv_vertex_index, const int subdiv_edge_index)
{
diff --git a/source/blender/blenkernel/intern/tracking_stabilize.c b/source/blender/blenkernel/intern/tracking_stabilize.c
index cbf1a02a46c..331db5b6ff0 100644
--- a/source/blender/blenkernel/intern/tracking_stabilize.c
+++ b/source/blender/blenkernel/intern/tracking_stabilize.c
@@ -992,7 +992,7 @@ static void initialize_all_tracks(StabContext *ctx, float aspect)
* By definition, offset contribution is zero there.
*/
int reference_frame = tracking->stabilization.anchor_frame;
- float average_angle=0, average_scale_step=0;
+ float average_angle = 0, average_scale_step = 0;
float average_translation[2], average_pos[2], pivot[2];
zero_v2(average_translation);
zero_v2(pivot);
diff --git a/source/blender/blenkernel/intern/tracking_util.c b/source/blender/blenkernel/intern/tracking_util.c
index 8c1b846db84..621e0cc6a2e 100644
--- a/source/blender/blenkernel/intern/tracking_util.c
+++ b/source/blender/blenkernel/intern/tracking_util.c
@@ -853,17 +853,17 @@ static ImBuf *accessor_get_ibuf(TrackingImageAccessor *accessor,
}
static libmv_CacheKey accessor_get_image_callback(
- struct libmv_FrameAccessorUserData *user_data,
- int clip_index,
- int frame,
- libmv_InputMode input_mode,
- int downscale,
- const libmv_Region *region,
- const libmv_FrameTransform *transform,
- float **destination,
- int *width,
- int *height,
- int *channels)
+ struct libmv_FrameAccessorUserData *user_data,
+ int clip_index,
+ int frame,
+ libmv_InputMode input_mode,
+ int downscale,
+ const libmv_Region *region,
+ const libmv_FrameTransform *transform,
+ float **destination,
+ int *width,
+ int *height,
+ int *channels)
{
TrackingImageAccessor *accessor = (TrackingImageAccessor *) user_data;
ImBuf *ibuf;
diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
index 4b52c0469aa..55e81645df5 100644
--- a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
+++ b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
@@ -78,8 +78,8 @@ void RenderLayersNode::testRenderLink(NodeConverter &converter,
const int num_outputs = this->getNumberOfOutputSockets();
for (int i = 0; i < num_outputs; i++) {
NodeOutput *output = this->getOutputSocket(i);
- NodeImageLayer *storage = (NodeImageLayer*) output->getbNodeSocket()->storage;
- RenderPass *rpass = (RenderPass*) BLI_findstring(
+ NodeImageLayer *storage = (NodeImageLayer *)output->getbNodeSocket()->storage;
+ RenderPass *rpass = (RenderPass *)BLI_findstring(
&rl->passes,
storage->pass_name,
offsetof(RenderPass, name));
diff --git a/source/blender/depsgraph/intern/builder/deg_builder.cc b/source/blender/depsgraph/intern/builder/deg_builder.cc
index 0549ec76f3c..cd087889845 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder.cc
@@ -58,7 +58,7 @@ namespace {
void deg_graph_build_flush_layers(Depsgraph *graph)
{
- BLI_Stack *stack = BLI_stack_new(sizeof(OperationDepsNode*),
+ BLI_Stack *stack = BLI_stack_new(sizeof(OperationDepsNode *),
"DEG flush layers stack");
foreach (OperationDepsNode *op_node, graph->operations) {
op_node->done = 0;
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index 03c3e1ff16e..c4214b436f1 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -341,9 +341,9 @@ GPUBatch *DRW_cache_grid_get(void)
for (int i = 0; i < 8; ++i) {
for (int j = 0; j < 8; ++j) {
float pos0[2] = {(float)i / 8.0f, (float)j / 8.0f};
- float pos1[2] = {(float)(i+1) / 8.0f, (float)j / 8.0f};
- float pos2[2] = {(float)i / 8.0f, (float)(j+1) / 8.0f};
- float pos3[2] = {(float)(i+1) / 8.0f, (float)(j+1) / 8.0f};
+ float pos1[2] = {(float)(i + 1) / 8.0f, (float)j / 8.0f};
+ float pos2[2] = {(float)i / 8.0f, (float)(j + 1) / 8.0f};
+ float pos3[2] = {(float)(i + 1) / 8.0f, (float)(j + 1) / 8.0f};
madd_v2_v2v2fl(pos0, (float[2]){-1.0f, -1.0f}, pos0, 2.0f);
madd_v2_v2v2fl(pos1, (float[2]){-1.0f, -1.0f}, pos1, 2.0f);
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index 2ebc04a39ee..62f0f107360 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -202,7 +202,7 @@ void ED_pose_recalculate_paths(bContext *C, Scene *scene, Object *ob)
/* Override depsgraph with a filtered, simpler copy */
if (G.debug_value != -1) {
-TIMEIT_START(filter_pose_depsgraph);
+ TIMEIT_START(filter_pose_depsgraph);
DEG_FilterQuery query = {0};
DEG_FilterTarget *dft_ob = MEM_callocN(sizeof(DEG_FilterTarget), "DEG_FilterTarget");
@@ -213,11 +213,11 @@ TIMEIT_START(filter_pose_depsgraph);
free_depsgraph = true;
MEM_freeN(dft_ob);
-TIMEIT_END(filter_pose_depsgraph);
+ TIMEIT_END(filter_pose_depsgraph);
-TIMEIT_START(filter_pose_update);
+ TIMEIT_START(filter_pose_update);
BKE_scene_graph_update_tagged(depsgraph, bmain);
-TIMEIT_END(filter_pose_update);
+ TIMEIT_END(filter_pose_update);
}
/* set flag to force recalc, then grab the relevant bones to target */
@@ -225,9 +225,10 @@ TIMEIT_END(filter_pose_update);
animviz_get_object_motionpaths(ob, &targets);
/* recalculate paths, then free */
-TIMEIT_START(pose_path_calc);
+ TIMEIT_START(pose_path_calc);
animviz_calc_motionpaths(depsgraph, bmain, scene, &targets);
-TIMEIT_END(pose_path_calc);
+ TIMEIT_END(pose_path_calc);
+
BLI_freelistN(&targets);
/* tag armature object for copy on write - so paths will draw/redraw */
diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c
index 9a545c126c0..05a1cd43530 100644
--- a/source/blender/python/mathutils/mathutils_noise.c
+++ b/source/blender/python/mathutils/mathutils_noise.c
@@ -253,8 +253,9 @@ static void noise_vector(float x, float y, float z, int nb, float v[3])
}
/* Returns a turbulence value for a given position (x, y, z) */
-static float turb(float x, float y, float z, int oct, int hard, int nb,
- float ampscale, float freqscale)
+static float turb(
+ float x, float y, float z, int oct, int hard, int nb,
+ float ampscale, float freqscale)
{
float amp, out, t;
int i;
@@ -277,8 +278,9 @@ static float turb(float x, float y, float z, int oct, int hard, int nb,
/* Fills an array of length 3 with the turbulence vector for a given
* position (x, y, z) */
-static void vTurb(float x, float y, float z, int oct, int hard, int nb,
- float ampscale, float freqscale, float v[3])
+static void vTurb(
+ float x, float y, float z, int oct, int hard, int nb,
+ float ampscale, float freqscale, float v[3])
{
float amp, t[3];
int i;
@@ -345,8 +347,12 @@ static PyObject *M_Noise_random_unit_vector(PyObject *UNUSED(self), PyObject *ar
float norm = 2.0f;
int size = 3;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "|$i:random_unit_vector", (char **)kwlist, &size))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "|$i:random_unit_vector", (char **)kwlist,
+ &size))
+ {
return NULL;
+ }
if (size > 4 || size < 2) {
PyErr_SetString(PyExc_ValueError, "Vector(): invalid size");
@@ -377,8 +383,12 @@ static PyObject *M_Noise_random_vector(PyObject *UNUSED(self), PyObject *args, P
float *vec = NULL;
int size = 3;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "|$i:random_vector", (char **)kwlist, &size))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "|$i:random_vector", (char **)kwlist,
+ &size))
+ {
return NULL;
+ }
if (size < 2) {
PyErr_SetString(PyExc_ValueError, "Vector(): invalid size");
@@ -429,13 +439,19 @@ static PyObject *M_Noise_noise(PyObject *UNUSED(self), PyObject *args, PyObject
const char *noise_basis_str = NULL;
int noise_basis_enum = DEFAULT_NOISE_TYPE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "O|$s:noise", (char **)kwlist, &value, &noise_basis_str))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "O|$s:noise", (char **)kwlist,
+ &value, &noise_basis_str))
+ {
return NULL;
+ }
if (!noise_basis_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_basis_str, &noise_basis_enum, "noise") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_basis_str, &noise_basis_enum, "noise") == -1)
+ {
return NULL;
}
@@ -464,13 +480,19 @@ static PyObject *M_Noise_noise_vector(PyObject *UNUSED(self), PyObject *args, Py
const char *noise_basis_str = NULL;
int noise_basis_enum = DEFAULT_NOISE_TYPE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "O|$s:noise_vector", (char **)kwlist, &value, &noise_basis_str))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "O|$s:noise_vector", (char **)kwlist,
+ &value, &noise_basis_str))
+ {
return NULL;
+ }
if (!noise_basis_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_basis_str, &noise_basis_enum, "noise_vector") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_basis_str, &noise_basis_enum, "noise_vector") == -1)
+ {
return NULL;
}
@@ -510,14 +532,19 @@ static PyObject *M_Noise_turbulence(PyObject *UNUSED(self), PyObject *args, PyOb
int oct, hd, noise_basis_enum = DEFAULT_NOISE_TYPE;
float as = 0.5f, fs = 2.0f;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "Oii|$sff:turbulence", (char **)kwlist,
- &value, &oct, &hd, &noise_basis_str, &as, &fs))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "Oii|$sff:turbulence", (char **)kwlist,
+ &value, &oct, &hd, &noise_basis_str, &as, &fs))
+ {
return NULL;
+ }
if (!noise_basis_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_basis_str, &noise_basis_enum, "turbulence") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_basis_str, &noise_basis_enum, "turbulence") == -1)
+ {
return NULL;
}
@@ -555,14 +582,19 @@ static PyObject *M_Noise_turbulence_vector(PyObject *UNUSED(self), PyObject *arg
int oct, hd, noise_basis_enum = DEFAULT_NOISE_TYPE;
float as = 0.5f, fs = 2.0f;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "Oii|$sff:turbulence_vector", (char **)kwlist,
- &value, &oct, &hd, &noise_basis_str, &as, &fs))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "Oii|$sff:turbulence_vector", (char **)kwlist,
+ &value, &oct, &hd, &noise_basis_str, &as, &fs))
+ {
return NULL;
+ }
if (!noise_basis_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_basis_str, &noise_basis_enum, "turbulence_vector") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_basis_str, &noise_basis_enum, "turbulence_vector") == -1)
+ {
return NULL;
}
@@ -601,14 +633,19 @@ static PyObject *M_Noise_fractal(PyObject *UNUSED(self), PyObject *args, PyObjec
float H, lac, oct;
int noise_basis_enum = DEFAULT_NOISE_TYPE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "Offf|$s:fractal", (char **)kwlist,
- &value, &H, &lac, &oct, &noise_basis_str))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "Offf|$s:fractal", (char **)kwlist,
+ &value, &H, &lac, &oct, &noise_basis_str))
+ {
return NULL;
+ }
if (!noise_basis_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_basis_str, &noise_basis_enum, "fractal") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_basis_str, &noise_basis_enum, "fractal") == -1)
+ {
return NULL;
}
@@ -644,14 +681,19 @@ static PyObject *M_Noise_multi_fractal(PyObject *UNUSED(self), PyObject *args, P
float H, lac, oct;
int noise_basis_enum = DEFAULT_NOISE_TYPE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "Offf|$s:multi_fractal", (char **)kwlist,
- &value, &H, &lac, &oct, &noise_basis_str))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "Offf|$s:multi_fractal", (char **)kwlist,
+ &value, &H, &lac, &oct, &noise_basis_str))
+ {
return NULL;
+ }
if (!noise_basis_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_basis_str, &noise_basis_enum, "multi_fractal") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_basis_str, &noise_basis_enum, "multi_fractal") == -1)
+ {
return NULL;
}
@@ -690,21 +732,28 @@ static PyObject *M_Noise_variable_lacunarity(PyObject *UNUSED(self), PyObject *a
float d;
int noise_type1_enum = DEFAULT_NOISE_TYPE, noise_type2_enum = DEFAULT_NOISE_TYPE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "Of|$ss:variable_lacunarity", (char **)kwlist,
- &value, &d, &noise_type1_str, &noise_type2_str))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "Of|$ss:variable_lacunarity", (char **)kwlist,
+ &value, &d, &noise_type1_str, &noise_type2_str))
+ {
return NULL;
+ }
if (!noise_type1_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_type1_str, &noise_type1_enum, "variable_lacunarity") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_type1_str, &noise_type1_enum, "variable_lacunarity") == -1)
+ {
return NULL;
}
if (!noise_type2_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_type2_str, &noise_type2_enum, "variable_lacunarity") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_type2_str, &noise_type2_enum, "variable_lacunarity") == -1)
+ {
return NULL;
}
@@ -742,14 +791,19 @@ static PyObject *M_Noise_hetero_terrain(PyObject *UNUSED(self), PyObject *args,
float H, lac, oct, ofs;
int noise_basis_enum = DEFAULT_NOISE_TYPE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "Offff|$s:hetero_terrain", (char **)kwlist,
- &value, &H, &lac, &oct, &ofs, &noise_basis_str))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "Offff|$s:hetero_terrain", (char **)kwlist,
+ &value, &H, &lac, &oct, &ofs, &noise_basis_str))
+ {
return NULL;
+ }
if (!noise_basis_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_basis_str, &noise_basis_enum, "hetero_terrain") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_basis_str, &noise_basis_enum, "hetero_terrain") == -1)
+ {
return NULL;
}
@@ -789,14 +843,19 @@ static PyObject *M_Noise_hybrid_multi_fractal(PyObject *UNUSED(self), PyObject *
float H, lac, oct, ofs, gn;
int noise_basis_enum = DEFAULT_NOISE_TYPE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "Offfff|$s:hybrid_multi_fractal", (char **)kwlist,
- &value, &H, &lac, &oct, &ofs, &gn, &noise_basis_str))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "Offfff|$s:hybrid_multi_fractal", (char **)kwlist,
+ &value, &H, &lac, &oct, &ofs, &gn, &noise_basis_str))
+ {
return NULL;
+ }
if (!noise_basis_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_basis_str, &noise_basis_enum, "hybrid_multi_fractal") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_basis_str, &noise_basis_enum, "hybrid_multi_fractal") == -1)
+ {
return NULL;
}
@@ -836,14 +895,19 @@ static PyObject *M_Noise_ridged_multi_fractal(PyObject *UNUSED(self), PyObject *
float H, lac, oct, ofs, gn;
int noise_basis_enum = DEFAULT_NOISE_TYPE;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "Offfff|$s:ridged_multi_fractal", (char **)kwlist,
- &value, &H, &lac, &oct, &ofs, &gn, &noise_basis_str))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "Offfff|$s:ridged_multi_fractal", (char **)kwlist,
+ &value, &H, &lac, &oct, &ofs, &gn, &noise_basis_str))
+ {
return NULL;
+ }
if (!noise_basis_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_types, noise_basis_str, &noise_basis_enum, "ridged_multi_fractal") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_types, noise_basis_str, &noise_basis_enum, "ridged_multi_fractal") == -1)
+ {
return NULL;
}
@@ -880,13 +944,19 @@ static PyObject *M_Noise_voronoi(PyObject *UNUSED(self), PyObject *args, PyObjec
int i;
- if (!PyArg_ParseTupleAndKeywords(args, kw, "O|$sf:voronoi", (char **)kwlist, &value, &metric_str, &me))
+ if (!PyArg_ParseTupleAndKeywords(
+ args, kw, "O|$sf:voronoi", (char **)kwlist,
+ &value, &metric_str, &me))
+ {
return NULL;
+ }
if (!metric_str) {
/* pass through */
}
- else if (PyC_FlagSet_ValueFromID(bpy_noise_metrics, metric_str, &metric_enum, "voronoi") == -1) {
+ else if (PyC_FlagSet_ValueFromID(
+ bpy_noise_metrics, metric_str, &metric_enum, "voronoi") == -1)
+ {
return NULL;
}
@@ -962,7 +1032,7 @@ static PyMethodDef M_Noise_methods[] = {
{"random", (PyCFunction) M_Noise_random, METH_NOARGS, M_Noise_random_doc},
{"random_unit_vector", (PyCFunction) M_Noise_random_unit_vector, METH_VARARGS | METH_KEYWORDS, M_Noise_random_unit_vector_doc},
{"random_vector", (PyCFunction) M_Noise_random_vector, METH_VARARGS | METH_KEYWORDS, M_Noise_random_vector_doc},
- {"noise", (PyCFunction) M_Noise_noise, METH_VARARGS | METH_KEYWORDS, M_Noise_noise_doc},
+ {"noise", (PyCFunction) M_Noise_noise, METH_VARARGS | METH_KEYWORDS, M_Noise_noise_doc},
{"noise_vector", (PyCFunction) M_Noise_noise_vector, METH_VARARGS | METH_KEYWORDS, M_Noise_noise_vector_doc},
{"turbulence", (PyCFunction) M_Noise_turbulence, METH_VARARGS | METH_KEYWORDS, M_Noise_turbulence_doc},
{"turbulence_vector", (PyCFunction) M_Noise_turbulence_vector, METH_VARARGS | METH_KEYWORDS, M_Noise_turbulence_vector_doc},