Cleanup: indentation, style
This commit is contained in:
@@ -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],
|
||||
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:
|
||||
{
|
||||
|
@@ -363,7 +363,8 @@ static Subdiv *multires_subdiv_for_reshape(struct Depsgraph *depsgraph,
|
||||
return subdiv;
|
||||
}
|
||||
|
||||
static bool multires_reshape_from_vertcos(struct Depsgraph *depsgraph,
|
||||
static bool multires_reshape_from_vertcos(
|
||||
struct Depsgraph *depsgraph,
|
||||
Object *object,
|
||||
const MultiresModifierData *mmd,
|
||||
const float (*deformed_verts)[3],
|
||||
@@ -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
|
||||
|
@@ -746,8 +746,7 @@ 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,
|
||||
tls,
|
||||
@@ -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))
|
||||
|
@@ -685,7 +685,8 @@ 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);
|
||||
}
|
||||
@@ -861,7 +862,8 @@ 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);
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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));
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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 */
|
||||
|
@@ -253,7 +253,8 @@ 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,
|
||||
static float turb(
|
||||
float x, float y, float z, int oct, int hard, int nb,
|
||||
float ampscale, float freqscale)
|
||||
{
|
||||
float amp, out, t;
|
||||
@@ -277,7 +278,8 @@ 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,
|
||||
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];
|
||||
@@ -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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user