[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49900] trunk/blender: style cleanup: pep8 & unfinished comment from own commit.

Campbell Barton ideasman42 at gmail.com
Tue Aug 14 20:43:16 CEST 2012


Revision: 49900
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49900
Author:   campbellbarton
Date:     2012-08-14 18:43:15 +0000 (Tue, 14 Aug 2012)
Log Message:
-----------
style cleanup: pep8 & unfinished comment from own commit.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_operators/node.py
    trunk/blender/source/blender/modifiers/intern/MOD_displace.c

Modified: trunk/blender/release/scripts/startup/bl_operators/node.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/node.py	2012-08-14 18:01:58 UTC (rev 49899)
+++ trunk/blender/release/scripts/startup/bl_operators/node.py	2012-08-14 18:43:15 UTC (rev 49900)
@@ -36,6 +36,7 @@
 node_type_prefix = 'NODE_'
 node_group_prefix = 'GROUP_'
 
+
 # Generate a list of enum items for a given node class
 # Copy existing type enum, adding a prefix to distinguish from node groups
 # Skip the base node group type, node groups will be added below for all existing group trees
@@ -43,13 +44,15 @@
     return [(node_type_prefix + item.identifier, item.name, item.description)
                     for item in node_class.bl_rna.properties['type'].enum_items if item.identifier != 'GROUP']
 
+
 # Generate items for node group types
-# Filter by the given tree_type 
+# Filter by the given tree_type
 # Node group trees don't have a description property yet (could add this as a custom property though)
 def node_group_items(tree_type):
     return [(node_group_prefix + group.name, group.name, '')
                     for group in bpy.data.node_groups if group.type == tree_type]
 
+
 # Returns the enum item list for the edited tree in the context
 def node_type_items_cb(self, context):
     snode = context.space_data
@@ -59,7 +62,7 @@
     if not tree:
         return []
 
-    # Lists of basic node types for each 
+    # Lists of basic node types for each
     if not node_type_items_dict:
         node_type_items_dict.update({
             'SHADER': node_type_items(bpy.types.ShaderNode),
@@ -119,7 +122,7 @@
     def poll(cls, context):
         space = context.space_data
         # needs active node editor and a tree to add nodes to
-        return space.type == 'NODE_EDITOR' and space.edit_tree
+        return (space.type == 'NODE_EDITOR' and space.edit_tree)
 
     def execute(self, context):
         self.create_node(context)
@@ -146,7 +149,7 @@
     def poll(cls, context):
         space = context.space_data
         # needs active node editor and a tree
-        return space.type == 'NODE_EDITOR' and space.edit_tree
+        return (space.type == 'NODE_EDITOR' and space.edit_tree)
 
     def execute(self, context):
         space = context.space_data
@@ -154,14 +157,13 @@
 
         for node in tree.nodes:
             if node.select:
-                hide = not node.hide
-                
+                hide = (not node.hide)
+
                 node.hide = hide
                 # Note: connected sockets are ignored internally
                 for socket in node.inputs:
                     socket.hide = hide
                 for socket in node.outputs:
                     socket.hide = hide
-                    
+
         return {'FINISHED'}
-

Modified: trunk/blender/source/blender/modifiers/intern/MOD_displace.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_displace.c	2012-08-14 18:01:58 UTC (rev 49899)
+++ trunk/blender/source/blender/modifiers/intern/MOD_displace.c	2012-08-14 18:43:15 UTC (rev 49900)
@@ -175,7 +175,7 @@
 	int defgrp_index;
 	float (*tex_co)[3];
 	float weight = 1.0f; /* init value unused but some compilers may complain */
-	const float delta_fixed = 1.0f - dmd->midlevel;  /* when no texture is used, we*/
+	const float delta_fixed = 1.0f - dmd->midlevel;  /* when no texture is used, we fallback to white */
 
 	if (!dmd->texture && dmd->direction == MOD_DISP_DIR_RGB_XYZ) return;
 	if (dmd->strength == 0.0f) return;




More information about the Bf-blender-cvs mailing list