forked from bartvdbraak/blender
Cleanup: pep8 & redundant vars
This commit is contained in:
parent
88f126f2eb
commit
200dd87de1
@ -31,7 +31,6 @@ and <output-filename> is where to write the generated man page.
|
|||||||
# <pep8 compliant>
|
# <pep8 compliant>
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
@ -65,6 +65,7 @@ def bake(engine, obj, pass_type, pixel_array, num_pixels, depth, result):
|
|||||||
if session is not None:
|
if session is not None:
|
||||||
_cycles.bake(engine.session, obj.as_pointer(), pass_type, pixel_array.as_pointer(), num_pixels, depth, result.as_pointer())
|
_cycles.bake(engine.session, obj.as_pointer(), pass_type, pixel_array.as_pointer(), num_pixels, depth, result.as_pointer())
|
||||||
|
|
||||||
|
|
||||||
def reset(engine, data, scene):
|
def reset(engine, data, scene):
|
||||||
import _cycles
|
import _cycles
|
||||||
data = data.as_pointer()
|
data = data.as_pointer()
|
||||||
|
@ -57,6 +57,7 @@ def rna_idprop_ui_prop_clear(item, prop):
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def rna_idprop_context_value(context, context_member, property_type):
|
def rna_idprop_context_value(context, context_member, property_type):
|
||||||
space = context.space_data
|
space = context.space_data
|
||||||
|
|
||||||
@ -73,11 +74,13 @@ def rna_idprop_context_value(context, context_member, property_type):
|
|||||||
|
|
||||||
return rna_item, context_member
|
return rna_item, context_member
|
||||||
|
|
||||||
|
|
||||||
def rna_idprop_has_properties(rna_item):
|
def rna_idprop_has_properties(rna_item):
|
||||||
keys = rna_item.keys()
|
keys = rna_item.keys()
|
||||||
nbr_props = len(keys)
|
nbr_props = len(keys)
|
||||||
return (nbr_props > 1) or (nbr_props and '_RNA_UI' not in keys)
|
return (nbr_props > 1) or (nbr_props and '_RNA_UI' not in keys)
|
||||||
|
|
||||||
|
|
||||||
def draw(layout, context, context_member, property_type, use_edit=True):
|
def draw(layout, context, context_member, property_type, use_edit=True):
|
||||||
|
|
||||||
def assign_props(prop, val, key):
|
def assign_props(prop, val, key):
|
||||||
|
@ -1172,7 +1172,6 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
|
|||||||
col = split.column()
|
col = split.column()
|
||||||
factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
|
factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
|
||||||
|
|
||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
if not isinstance(idblock, ParticleSettings):
|
if not isinstance(idblock, ParticleSettings):
|
||||||
|
@ -261,7 +261,7 @@ class CLIP_PT_tools_marker(CLIP_PT_tracking_panel, Panel):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
sc = context.space_data
|
sc = context.space_data
|
||||||
clip = sc.clip
|
# clip = sc.clip
|
||||||
|
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
row = col.row(align=True)
|
row = col.row(align=True)
|
||||||
|
@ -1036,7 +1036,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
|||||||
|
|
||||||
class TEXTURE_UL_texpaintslots(UIList):
|
class TEXTURE_UL_texpaintslots(UIList):
|
||||||
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
||||||
ma = data
|
# ma = data
|
||||||
ima = item
|
ima = item
|
||||||
|
|
||||||
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
||||||
@ -1061,7 +1061,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
settings = context.tool_settings.image_paint
|
settings = context.tool_settings.image_paint
|
||||||
brush = settings.brush
|
# brush = settings.brush
|
||||||
|
|
||||||
ob = context.active_object
|
ob = context.active_object
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
@ -1383,7 +1383,7 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
scene = context.scene
|
# scene = context.scene
|
||||||
|
|
||||||
toolsettings = context.tool_settings
|
toolsettings = context.tool_settings
|
||||||
sculpt = toolsettings.sculpt
|
sculpt = toolsettings.sculpt
|
||||||
@ -1604,7 +1604,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel):
|
|||||||
mesh = ob.data
|
mesh = ob.data
|
||||||
toolsettings = context.tool_settings
|
toolsettings = context.tool_settings
|
||||||
ipaint = toolsettings.image_paint
|
ipaint = toolsettings.image_paint
|
||||||
settings = toolsettings.image_paint
|
# settings = toolsettings.image_paint
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
|
|
||||||
|
@ -434,11 +434,6 @@ def modifier_hook_add(scene, obj, use_vgroup=True):
|
|||||||
for v in mesh.vertices:
|
for v in mesh.vertices:
|
||||||
v.select = False
|
v.select = False
|
||||||
|
|
||||||
if IS_BMESH:
|
|
||||||
face_verts = mesh_bmesh_poly_vertices(mesh.polygons[0])
|
|
||||||
else:
|
|
||||||
face_verts = mesh.faces[0].vertices[:]
|
|
||||||
|
|
||||||
for i in mesh.faces[0].vertices:
|
for i in mesh.faces[0].vertices:
|
||||||
mesh.vertices[i].select = True
|
mesh.vertices[i].select = True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user