remove invalid NULL checks from own recent commit and minor pep8 edits.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 5 Dec 2011 22:19:30 +0000 (22:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 5 Dec 2011 22:19:30 +0000 (22:19 +0000)
intern/cycles/blender/addon/ui.py
release/scripts/startup/bl_operators/object_randomize_transform.py
release/scripts/startup/bl_ui/properties_texture.py
source/blender/editors/screen/screendump.c
source/blender/editors/space_view3d/drawobject.c

index d23347b..d631158 100644 (file)
@@ -725,6 +725,7 @@ def draw_device(self, context):
         if experimental and cscene.device == 'CPU' and engine.with_osl():
             layout.prop(cscene, "shading_system")
 
+
 def draw_pause(self, context):
     layout = self.layout
     scene = context.scene
index 9652312..63c5fa1 100644 (file)
@@ -62,7 +62,9 @@ def randomize_selected(seed, delta, loc, rot, scale, scale_even, scale_min):
             else:
                 org_sca_x, org_sca_y, org_sca_z = obj.scale
 
-            sca_x, sca_y, sca_z = uniform(-scale[0]+2, scale[0]), uniform(-scale[1]+2, scale[1]), uniform(-scale[2]+2, scale[2])
+            sca_x, sca_y, sca_z = (uniform(-scale[0] + 2.0, scale[0]),
+                                   uniform(-scale[1] + 2.0, scale[1]),
+                                   uniform(-scale[2] + 2.0, scale[2]))
 
             if scale_even:
                 aX = sca_x * org_sca_x
@@ -81,7 +83,10 @@ def randomize_selected(seed, delta, loc, rot, scale, scale_even, scale_min):
             uniform(0.0, 0.0), uniform(0.0, 0.0), uniform(0.0, 0.0)
 
 
-from bpy.props import IntProperty, BoolProperty, FloatProperty, FloatVectorProperty
+from bpy.props import (IntProperty,
+                       BoolProperty,
+                       FloatProperty,
+                       FloatVectorProperty)
 
 
 class RandomizeLocRotSize(Operator):
index d16b2f1..358f1e1 100644 (file)
@@ -166,7 +166,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
             layout.template_preview(tex, parent=idblock, slot=slot)
         else:
             layout.template_preview(tex, slot=slot)
-            
+
         #Show Alpha Button for Brush Textures, see #29502
         if context.space_data.texture_context == 'BRUSH':
             layout.prop(tex, "use_preview_alpha")
index 7c76766..31aab95 100644 (file)
@@ -218,8 +218,6 @@ static int screenshot_cancel(bContext *UNUSED(C), wmOperator *op)
 
 void SCREEN_OT_screenshot(wmOperatorType *ot)
 {
-       PropertyRNA *prop;
-
        ot->name= "Save Screenshot"; /* weak: opname starting with 'save' makes filewindow give save-over */
        ot->idname= "SCREEN_OT_screenshot";
        
@@ -231,7 +229,7 @@ void SCREEN_OT_screenshot(wmOperatorType *ot)
        ot->flag= 0;
        
        WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH);
-       prop= RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "");
+       RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "");
 }
 
 /* *************** screenshot movie job ************************* */
index 547d89c..9505ea5 100644 (file)
@@ -2986,7 +2986,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
        int /* totvert,*/ totedge, totface;
        DerivedMesh *dm= mesh_get_derived_final(scene, ob, scene->customdata_mask);
        ModifierData *md = NULL;
-       const short is_obact= (ob != NULL && ob == OBACT);
+       const short is_obact= (ob == OBACT);
        int draw_flags = (is_obact && paint_facesel_test(ob)) ? DRAW_FACE_SELECT : 0;
 
        if(!dm)
@@ -6108,7 +6108,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
        int /*sel, drawtype,*/ colindex= 0;
        int i, selstart, selend, empty_object=0;
        short dt, dtx, zbufoff= 0;
-       const short is_obact= (ob != NULL && ob == OBACT);
+       const short is_obact= (ob == OBACT);
 
        /* only once set now, will be removed too, should become a global standard */
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);