Code cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Tue, 18 Feb 2014 21:02:59 +0000 (08:02 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 18 Feb 2014 21:02:59 +0000 (08:02 +1100)
intern/cycles/blender/addon/properties.py
intern/locale/CMakeLists.txt
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_userpref.py
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenlib/intern/scanfill_utils.c
source/blender/compositor/operations/COM_BlurBaseOperation.cpp
source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
source/blender/editors/interface/interface_handlers.c
source/blender/nodes/shader/nodes/node_shader_common.c

index 3920510e38fcb97ef3d4b9c38353c7ac757cd55f..e267ea48b736d32cd896dc58e3d177f77243f17f 100644 (file)
@@ -107,7 +107,7 @@ enum_integrator = (
     ('BRANCHED_PATH', "Branched Path Tracing", "Path tracing integrator that branches on the first bounce, giving more control over the number of light and material samples"),
     ('PATH', "Path Tracing", "Pure path tracing integrator"),
     )
-    
+
 enum_volume_homogeneous_sampling = (
     ('DISTANCE', "Distance", "Use Distance Sampling"),
     ('EQUI_ANGULAR', "Equi-angular", "Use Equi-angular Sampling"),
@@ -145,7 +145,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
                 items=enum_integrator,
                 default='PATH',
                 )
-                
+
         cls.volume_homogeneous_sampling = EnumProperty(
                 name="Homogeneous Sampling",
                 description="Sampling method to use for homogeneous volumes",
index 6f3b6a695b686912c8238a07576776d5e86f3057..4dc447391fcd61988396e6ad71f5daee6a89d33c 100644 (file)
@@ -53,7 +53,7 @@ set(MSFFMT_SRC
 )
 add_executable(msgfmt ${MSFFMT_SRC})
 
-if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND (CMAKE_C_COMPILER_VERSION VERSION_EQUAL 3.4 OR CMAKE_C_COMPILER_VERSION VERSION_GREATER 3.4))
+if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND (NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)))
        # needed for clang 3.4+
        target_link_libraries(msgfmt ${PLATFORM_LINKLIBS})
 endif()
index 332e4de124e356ab1601b9dc241643e2acde7cab..a6060c634482351f1d3aef5714ec7c18110283a3 100644 (file)
@@ -1105,6 +1105,7 @@ class WM_OT_properties_edit(Operator):
         if prop_type_old != prop_type:
             data_path = '["%s"]' % prop
             done = set()
+
             def _update(fcurves):
                 for fcu in fcurves:
                     if fcu not in done and fcu.data_path == data_path:
index 7ee46934a1cb7fabf31641eda3665a330da987a2..55113e406a39026a7aa47bad51677716609b4c80 100644 (file)
@@ -132,7 +132,7 @@ class CLIP_HT_header(Header):
 
             row = layout.row(align=True)
             row.prop(toolsettings, "use_proportional_edit_mask",
-                    text="", icon_only=True)
+                     text="", icon_only=True)
             if toolsettings.use_proportional_edit_mask:
                 row.prop(toolsettings, "proportional_edit_falloff",
                          text="", icon_only=True)
index 2f1c411e75cf1bc0ba8ff9fe134122ff805f0062..57485604cdcc3a40e05210e9265c9c2ced0c0e54 100644 (file)
@@ -966,7 +966,6 @@ class USERPREF_MT_ndof_settings(Menu):
             layout.prop(input_prefs, "ndof_roty_invert_axis")
             layout.prop(input_prefs, "ndof_rotz_invert_axis")
 
-
         # view2d use pan/zoom
         layout.separator()
         layout.label(text="Pan options")
index 92449b3444a1d8d1e46d51dc36991d1411d93844..2aebf3a88a256ad6eaef7ba3e7cc25991d56a09b 100644 (file)
@@ -1387,8 +1387,7 @@ static bool check_object_data_needs_evaluation(Object *object)
        if (object->type == OB_MESH) {
                return object->derivedFinal == NULL;
        }
-       else if (ELEM5(object->type, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE))
-       {
+       else if (ELEM5(object->type, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE)) {
                return object->curve_cache == NULL;
        }
 
@@ -1574,10 +1573,10 @@ static void dag_scene_build(Main *bmain, Scene *sce)
         * tagged for update).
         */
        if (DAG_id_type_tagged(bmain, ID_OB) ||
-               DAG_id_type_tagged(bmain, ID_ME)  ||  /* Mesh */
-               DAG_id_type_tagged(bmain, ID_CU)  ||  /* Curve */
-               DAG_id_type_tagged(bmain, ID_MB)  ||  /* MetaBall */
-               DAG_id_type_tagged(bmain, ID_LT))     /* Lattice */
+           DAG_id_type_tagged(bmain, ID_ME)  ||  /* Mesh */
+           DAG_id_type_tagged(bmain, ID_CU)  ||  /* Curve */
+           DAG_id_type_tagged(bmain, ID_MB)  ||  /* MetaBall */
+           DAG_id_type_tagged(bmain, ID_LT))     /* Lattice */
        {
                dag_invisible_dependencies_flush(sce);
        }
index 2e6abd9cb4ce9bd8b51bacd7d8d8c1db709a0e7c..c3c687170254182918984979bb9b1703692a1200 100644 (file)
@@ -166,14 +166,14 @@ static ScanFillEdge *edge_step(PolyInfo *poly_info,
 
        eed = (e_curr->next && e_curr != poly_info[poly_nr].edge_last) ? e_curr->next : poly_info[poly_nr].edge_first;
        if ((v_curr == eed->v1 || v_curr == eed->v2) == true &&
-               (v_prev == eed->v1 || v_prev == eed->v2) == false)
+           (v_prev == eed->v1 || v_prev == eed->v2) == false)
        {
                return eed;
        }
 
        eed = (e_curr->prev && e_curr != poly_info[poly_nr].edge_first) ? e_curr->prev : poly_info[poly_nr].edge_last;
        if ((v_curr == eed->v1 || v_curr == eed->v2) == true &&
-               (v_prev == eed->v1 || v_prev == eed->v2) == false)
+           (v_prev == eed->v1 || v_prev == eed->v2) == false)
        {
                return eed;
        }
index d13fea921bec2edc2497d58826138bd4ca882669..0f7afe484b16df7ae5aa07e000f92af9fb12a391 100644 (file)
@@ -78,7 +78,7 @@ float *BlurBaseOperation::make_gausstab(float rad, int size)
        gausstab = (float *)MEM_mallocN(sizeof(float) * n, __func__);
 
        sum = 0.0f;
-       float fac = (rad > 0.0f ? 1.0f/rad : 0.0f);
+       float fac = (rad > 0.0f ? 1.0f / rad : 0.0f);
        for (i = -size; i <= size; i++) {
                val = RE_filter_value(this->m_data->filtertype, (float)i * fac);
                sum += val;
@@ -103,7 +103,7 @@ float *BlurBaseOperation::make_dist_fac_inverse(float rad, int size, int falloff
 
        dist_fac_invert = (float *)MEM_mallocN(sizeof(float) * n, __func__);
 
-       float fac = (rad > 0.0f ? 1.0f/rad : 0.0f);
+       float fac = (rad > 0.0f ? 1.0f / rad : 0.0f);
        for (i = -size; i <= size; i++) {
                val = 1.0f - fabsf((float)i * fac);
 
index 44752d4e12e1b40f840a0de607fde1deb6c83060..1d02f5389b1cd6b4bb01510fd01547d851929ff2 100644 (file)
@@ -86,8 +86,8 @@ void GaussianBokehBlurOperation::updateGauss()
                ddgauss = (float *)MEM_mallocN(sizeof(float) * n, __func__);
                dgauss = ddgauss;
                float sum = 0.0f;
-               float facx = (radxf > 0.0f ? 1.0f/radxf : 0.0f);
-               float facy = (radyf > 0.0f ? 1.0f/radyf : 0.0f);
+               float facx = (radxf > 0.0f ? 1.0f / radxf : 0.0f);
+               float facy = (radyf > 0.0f ? 1.0f / radyf : 0.0f);
                for (j = -this->m_rady; j <= this->m_rady; j++) {
                        for (i = -this->m_radx; i <= this->m_radx; i++, dgauss++) {
                                float fj = (float)j * facy;
index 7aa2e98ffb231c232bfaa5d9f2876342c77617d3..150141e25cdaaa4f92b5406ee388f69399887a6d 100644 (file)
@@ -3523,7 +3523,7 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
                softmin = but->softmin;
                softmax = but->softmax;
 
-               handlewidth = min_ff(BLI_rctf_size_x(&but->rect)/3, BLI_rctf_size_y(&but->rect));
+               handlewidth = min_ff(BLI_rctf_size_x(&but->rect) / 3, BLI_rctf_size_y(&but->rect));
 
                if (!ui_is_but_float(but)) {
                        if (mx < (but->rect.xmin + handlewidth)) {
index 3f03bb45d8f29dc4111b28ac6b78a7650b58ff12..de30b92f8fea97614d36d6c9c3349be7204b7881 100644 (file)
@@ -218,7 +218,7 @@ static int gpu_group_execute(GPUMaterial *mat, bNode *node, bNodeExecData *execd
 #if 0   /* XXX NODE_GROUP_EDIT is deprecated, depends on node space */
        ntreeExecGPUNodes(exec, mat, (node->flag & NODE_GROUP_EDIT));
 #else
-       ntreeExecGPUNodes(exec, mat, 0, NODE_NEW_SHADING|NODE_OLD_SHADING);
+       ntreeExecGPUNodes(exec, mat, 0, NODE_NEW_SHADING | NODE_OLD_SHADING);
 #endif
        group_gpu_move_outputs(node, out, exec->stack);