[Bf-blender-cvs] [c9233bf] master: Code cleanup: style

Campbell Barton noreply at git.blender.org
Tue Feb 18 22:03:19 CET 2014


Commit: c9233bfd828f6e37e1c6e492e4e835dae01288d7
Author: Campbell Barton
Date:   Wed Feb 19 08:02:59 2014 +1100
https://developer.blender.org/rBc9233bfd828f6e37e1c6e492e4e835dae01288d7

Code cleanup: style

===================================================================

M	intern/cycles/blender/addon/properties.py
M	intern/locale/CMakeLists.txt
M	release/scripts/startup/bl_operators/wm.py
M	release/scripts/startup/bl_ui/space_clip.py
M	release/scripts/startup/bl_ui/space_userpref.py
M	source/blender/blenkernel/intern/depsgraph.c
M	source/blender/blenlib/intern/scanfill_utils.c
M	source/blender/compositor/operations/COM_BlurBaseOperation.cpp
M	source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
M	source/blender/editors/interface/interface_handlers.c
M	source/blender/nodes/shader/nodes/node_shader_common.c

===================================================================

diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 3920510..e267ea4 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -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",
diff --git a/intern/locale/CMakeLists.txt b/intern/locale/CMakeLists.txt
index 6f3b6a6..4dc4473 100644
--- a/intern/locale/CMakeLists.txt
+++ b/intern/locale/CMakeLists.txt
@@ -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()
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 332e4de..a6060c6 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -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:
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index 7ee4693..55113e4 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -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)
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 2f1c411..5748560 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -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")
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 92449b3..2aebf3a 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -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);
 	}
diff --git a/source/blender/blenlib/intern/scanfill_utils.c b/source/blender/blenlib/intern/scanfill_utils.c
index 2e6abd9..c3c6871 100644
--- a/source/blender/blenlib/intern/scanfill_utils.c
+++ b/source/blender/blenlib/intern/scanfill_utils.c
@@ -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;
 	}
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
index d13fea9..0f7afe4 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
@@ -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);
 
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
index 44752d4..1d02f53 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
@@ -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;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 7aa2e98..150141e 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -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)) {
diff --git a/source/blender/nodes/shader/nodes/node_shader_common.c b/source/blender/nodes/shader/nodes/node_shader_common.c
index 3f03bb4..de30b92 100644
--- a/source/blender/nodes/shader/nodes/node_shader_common.c
+++ b/source/blender/nodes/shader/nodes/node_shader_common.c
@@ -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);




More information about the Bf-blender-cvs mailing list