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))
@classmethod
def register(cls):
-
+
bpy.types.Object.cycles = PointerProperty(
name="Cycles Object Settings",
description="Cycles object settings",
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
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
# 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
def draw(self, context):
layout = self.layout
-
+
rd = context.scene.render
layout.prop(rd, "use_antialiasing")
VIEW3D_PT_tools_add_object.draw_add_curve(layout)
-
class INFO_MT_surface_add(Menu):
bl_idname = "INFO_MT_surface_add"
bl_label = "Surface"
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")
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)
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);
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;
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) {
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;
}
/* 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);
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));
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));
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));
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));
{
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) {