forked from bartvdbraak/blender
Code cleanup: style
This commit is contained in:
parent
03bd418d16
commit
f38331adef
@ -75,7 +75,7 @@ def main():
|
||||
for l in fsrc:
|
||||
l = l[:-1]
|
||||
# weak but ok
|
||||
if ("BMOpDefine" in l and l.split()[1] == "BMOpDefine") and not "bmo_opdefines[]" in l:
|
||||
if ("BMOpDefine" in l and l.split()[1] == "BMOpDefine") and "bmo_opdefines[]" not in l:
|
||||
is_block = True
|
||||
block_ctx = []
|
||||
blocks.append((comment_ctx, block_ctx))
|
||||
|
@ -746,7 +746,7 @@ class CyclesObjectBlurSettings(bpy.types.PropertyGroup):
|
||||
|
||||
@classmethod
|
||||
def register(cls):
|
||||
|
||||
|
||||
bpy.types.Object.cycles = PointerProperty(
|
||||
name="Cycles Object Settings",
|
||||
description="Cycles object settings",
|
||||
|
@ -581,7 +581,7 @@ class CyclesObject_PT_motion_blur(CyclesButtonsPanel, Panel):
|
||||
def poll(cls, context):
|
||||
ob = context.object
|
||||
return CyclesButtonsPanel.poll(context) and ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META'}
|
||||
|
||||
|
||||
def draw_header(self, context):
|
||||
layout = self.layout
|
||||
|
||||
|
@ -436,7 +436,7 @@ class QuickFluid(Operator):
|
||||
def execute(self, context):
|
||||
fake_context = context.copy()
|
||||
mesh_objects = [obj for obj in context.selected_objects
|
||||
if (obj.type == 'MESH' and not 0.0 in obj.dimensions)]
|
||||
if (obj.type == 'MESH' and 0.0 not in obj.dimensions)]
|
||||
min_co = Vector((100000.0, 100000.0, 100000.0))
|
||||
max_co = -min_co
|
||||
|
||||
|
@ -236,7 +236,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
|
||||
# vertex format outputs
|
||||
if surface.surface_format == 'VERTEX':
|
||||
if surface_type == 'PAINT':
|
||||
# toggle active preview
|
||||
# toggle active preview
|
||||
layout.prop(surface, "preview_id")
|
||||
|
||||
# paint-map output
|
||||
|
@ -245,7 +245,7 @@ class INFO_MT_opengl_render(Menu):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
|
||||
rd = context.scene.render
|
||||
|
||||
layout.prop(rd, "use_antialiasing")
|
||||
|
@ -903,7 +903,6 @@ class INFO_MT_curve_add(Menu):
|
||||
VIEW3D_PT_tools_add_object.draw_add_curve(layout)
|
||||
|
||||
|
||||
|
||||
class INFO_MT_surface_add(Menu):
|
||||
bl_idname = "INFO_MT_surface_add"
|
||||
bl_label = "Surface"
|
||||
|
@ -1266,7 +1266,7 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
|
||||
col.prop(sculpt, "use_smooth_shading")
|
||||
col.operator("sculpt.optimize")
|
||||
if (sculpt.detail_type_method == 'CONSTANT'):
|
||||
col.operator("sculpt.detail_flood_fill")
|
||||
col.operator("sculpt.detail_flood_fill")
|
||||
col.separator()
|
||||
col.prop(sculpt, "symmetrize_direction")
|
||||
col.operator("sculpt.symmetrize")
|
||||
@ -1295,7 +1295,7 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
|
||||
col.prop(sculpt, "gravity", slider=True, text="Factor")
|
||||
col.prop(sculpt, "gravity_object")
|
||||
col.separator()
|
||||
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Threads:")
|
||||
col.row(align=True).prop(scene, "omp_threads_mode", expand=True)
|
||||
|
@ -280,7 +280,6 @@ static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, in
|
||||
movieclip_open_anim_file(clip);
|
||||
|
||||
if (clip->anim) {
|
||||
int dur = IMB_anim_get_duration(clip->anim, tc);
|
||||
int fra = framenr - clip->start_frame + clip->frame_offset;
|
||||
|
||||
ibuf = IMB_anim_absolute(clip->anim, fra, tc, proxy);
|
||||
|
@ -7284,7 +7284,7 @@ static int ui_handle_list_event(bContext *C, const wmEvent *event, ARegion *ar)
|
||||
|
||||
if (val == KM_PRESS) {
|
||||
if (ELEM(type, UPARROWKEY, DOWNARROWKEY) ||
|
||||
((ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt)))
|
||||
((ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt)))
|
||||
{
|
||||
const int value_orig = RNA_property_int_get(&but->rnapoin, but->rnaprop);
|
||||
int value, min, max, inc;
|
||||
@ -7308,7 +7308,7 @@ static int ui_handle_list_event(bContext *C, const wmEvent *event, ARegion *ar)
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if (!dyn_data->items_filter_flags ||
|
||||
((dyn_data->items_filter_flags[i] & UILST_FLT_ITEM) ^ filter_exclude))
|
||||
((dyn_data->items_filter_flags[i] & UILST_FLT_ITEM) ^ filter_exclude))
|
||||
{
|
||||
org_order[new_order ? new_order[++org_idx] : ++org_idx] = i;
|
||||
if (i == value) {
|
||||
|
@ -107,7 +107,7 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, Mask *mask, const
|
||||
MaskSplinePoint *cur_point_deform = &points_array[i];
|
||||
eMaskWhichHandle cur_which_handle = MASK_WHICH_HANDLE_NONE;
|
||||
BezTriple *bezt = &cur_point_deform->bezt;
|
||||
float cur_len_sq , vec[2];
|
||||
float cur_len_sq, vec[2];
|
||||
|
||||
vec[0] = bezt->vec[1][0] * scalex;
|
||||
vec[1] = bezt->vec[1][1] * scaley;
|
||||
|
@ -1349,7 +1349,7 @@ void ED_region_init(bContext *C, ARegion *ar)
|
||||
}
|
||||
|
||||
/* for quick toggle, can skip fades */
|
||||
void region_toggle_hidden(bContext *C, ARegion *ar, bool do_fade)
|
||||
void region_toggle_hidden(bContext *C, ARegion *ar, const bool do_fade)
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
|
||||
|
@ -620,7 +620,7 @@ static int view_zoom_in_exec(bContext *C, wmOperator *op)
|
||||
|
||||
RNA_float_get_array(op->ptr, "location", location);
|
||||
|
||||
sclip_zoom_set_factor(C, powf(2.0f, 1.0f/3.0f), location);
|
||||
sclip_zoom_set_factor(C, powf(2.0f, 1.0f / 3.0f), location);
|
||||
|
||||
ED_region_tag_redraw(CTX_wm_region(C));
|
||||
|
||||
@ -663,7 +663,7 @@ static int view_zoom_out_exec(bContext *C, wmOperator *op)
|
||||
|
||||
RNA_float_get_array(op->ptr, "location", location);
|
||||
|
||||
sclip_zoom_set_factor(C, powf(0.5f, 1.0f/3.0f), location);
|
||||
sclip_zoom_set_factor(C, powf(0.5f, 1.0f / 3.0f), location);
|
||||
|
||||
ED_region_tag_redraw(CTX_wm_region(C));
|
||||
|
||||
|
@ -780,7 +780,7 @@ static int image_view_zoom_in_exec(bContext *C, wmOperator *op)
|
||||
|
||||
RNA_float_get_array(op->ptr, "location", location);
|
||||
|
||||
sima_zoom_set_factor(sima, ar, powf(2.0f, 1.0f/3.0f), location);
|
||||
sima_zoom_set_factor(sima, ar, powf(2.0f, 1.0f / 3.0f), location);
|
||||
|
||||
ED_region_tag_redraw(CTX_wm_region(C));
|
||||
|
||||
@ -825,7 +825,7 @@ static int image_view_zoom_out_exec(bContext *C, wmOperator *op)
|
||||
|
||||
RNA_float_get_array(op->ptr, "location", location);
|
||||
|
||||
sima_zoom_set_factor(sima, ar, powf(0.5f, 1.0f/3.0f), location);
|
||||
sima_zoom_set_factor(sima, ar, powf(0.5f, 1.0f / 3.0f), location);
|
||||
|
||||
ED_region_tag_redraw(CTX_wm_region(C));
|
||||
|
||||
|
@ -877,7 +877,7 @@ static void node_shader_buts_uvmap(uiLayout *layout, bContext *C, PointerRNA *pt
|
||||
{
|
||||
uiItemR(layout, ptr, "from_dupli", 0, NULL, 0);
|
||||
|
||||
if(!RNA_boolean_get(ptr, "from_dupli")) {
|
||||
if (!RNA_boolean_get(ptr, "from_dupli")) {
|
||||
PointerRNA obptr = CTX_data_pointer_get(C, "active_object");
|
||||
|
||||
if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) {
|
||||
|
Loading…
Reference in New Issue
Block a user