remove invalid NULL checks from own recent commit and minor pep8 edits.

This commit is contained in:
Campbell Barton 2011-12-05 22:19:30 +00:00
parent 63ad25c30d
commit b44c82b4fd
5 changed files with 12 additions and 8 deletions

@ -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

@ -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):

@ -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 ************************* */

@ -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);