style cleanup: pep8 + picky edits
This commit is contained in:
@@ -79,6 +79,7 @@ PLATFORM = platform().split('-')[0].lower() # 'linux', 'darwin', 'windows'
|
||||
|
||||
SCRIPT_DIR = os.path.dirname(__file__)
|
||||
|
||||
|
||||
def handle_args():
|
||||
'''
|
||||
Parse the args passed to Blender after "--", ignored by Blender
|
||||
@@ -127,7 +128,6 @@ def handle_args():
|
||||
help="Write the rst file of the bpy module (default=False)",
|
||||
required=False)
|
||||
|
||||
|
||||
# parse only the args passed after '--'
|
||||
argv = []
|
||||
if "--" in sys.argv:
|
||||
|
||||
@@ -21,37 +21,36 @@
|
||||
from . import engine
|
||||
|
||||
devices = (
|
||||
("CPU", "CPU", "Use CPU for rendering"),
|
||||
("GPU", "GPU Compute", "Use GPU compute device for rendering, configured in user preferences"))
|
||||
('CPU', "CPU", "Use CPU for rendering"),
|
||||
('GPU', "GPU Compute", "Use GPU compute device for rendering, configured in user preferences"))
|
||||
|
||||
feature_set = (
|
||||
("SUPPORTED", "Supported", "Only use finished and supported features"),
|
||||
("EXPERIMENTAL", "Experimental", "Use experimental and incomplete features that might be broken or change in the future"),
|
||||
('SUPPORTED', "Supported", "Only use finished and supported features"),
|
||||
('EXPERIMENTAL', "Experimental", "Use experimental and incomplete features that might be broken or change in the future"),
|
||||
)
|
||||
|
||||
shading_systems = (
|
||||
("GPU_COMPATIBLE", "GPU Compatible", "Restricted shading system compatible with GPU rendering"),
|
||||
("OSL", "Open Shading Language", "Open Shading Language shading system that only runs on the CPU"),
|
||||
('GPU_COMPATIBLE', "GPU Compatible", "Restricted shading system compatible with GPU rendering"),
|
||||
('OSL', "Open Shading Language", "Open Shading Language shading system that only runs on the CPU"),
|
||||
)
|
||||
|
||||
displacement_methods = (
|
||||
("BUMP", "Bump", "Bump mapping to simulate the appearance of displacement"),
|
||||
("TRUE", "True", "Use true displacement only, requires fine subdivision"),
|
||||
("BOTH", "Both", "Combination of displacement and bump mapping"),
|
||||
('BUMP', "Bump", "Bump mapping to simulate the appearance of displacement"),
|
||||
('TRUE', "True", "Use true displacement only, requires fine subdivision"),
|
||||
('BOTH', "Both", "Combination of displacement and bump mapping"),
|
||||
)
|
||||
|
||||
bvh_types = (
|
||||
("DYNAMIC_BVH", "Dynamic BVH", "Objects can be individually updated, at the cost of slower render time"),
|
||||
("STATIC_BVH", "Static BVH", "Any object modification requires a complete BVH rebuild, but renders faster"),
|
||||
('DYNAMIC_BVH', "Dynamic BVH", "Objects can be individually updated, at the cost of slower render time"),
|
||||
('STATIC_BVH', "Static BVH", "Any object modification requires a complete BVH rebuild, but renders faster"),
|
||||
)
|
||||
|
||||
filter_types = (
|
||||
("BOX", "Box", "Box filter"),
|
||||
("GAUSSIAN", "Gaussian", "Gaussian filter"),
|
||||
('BOX', "Box", "Box filter"),
|
||||
('GAUSSIAN', "Gaussian", "Gaussian filter"),
|
||||
)
|
||||
|
||||
aperture_types = (
|
||||
("RADIUS", "Radius", "Directly change the size of the aperture"),
|
||||
("FSTOP", "F/stop", "Change the size of the aperture by f/stops"),
|
||||
('RADIUS', "Radius", "Directly change the size of the aperture"),
|
||||
('FSTOP', "F/stop", "Change the size of the aperture by f/stops"),
|
||||
)
|
||||
|
||||
|
||||
@@ -489,6 +489,7 @@ class CyclesWorld_PT_surface(CyclesButtonsPanel, Panel):
|
||||
if not panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Surface'):
|
||||
layout.prop(world, "horizon_color", text="Color")
|
||||
|
||||
|
||||
class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Volume"
|
||||
bl_context = "world"
|
||||
@@ -507,6 +508,7 @@ class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel):
|
||||
world = context.world
|
||||
panel_node_draw(layout, world, 'OUTPUT_WORLD', 'Volume')
|
||||
|
||||
|
||||
class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Ambient Occlusion"
|
||||
bl_context = "world"
|
||||
@@ -529,6 +531,7 @@ class CyclesWorld_PT_ambient_occlusion(CyclesButtonsPanel, Panel):
|
||||
split.prop(light, "ao_factor", text="Factor")
|
||||
split.prop(light, "distance", text="Distance")
|
||||
|
||||
|
||||
class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Settings"
|
||||
bl_context = "world"
|
||||
@@ -551,6 +554,7 @@ class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
|
||||
row.active = cworld.sample_as_light
|
||||
row.prop(cworld, "sample_map_resolution")
|
||||
|
||||
|
||||
class CyclesMaterial_PT_surface(CyclesButtonsPanel, Panel):
|
||||
bl_label = "Surface"
|
||||
bl_context = "material"
|
||||
|
||||
@@ -446,6 +446,7 @@ class MeshFace(StructRNA):
|
||||
ord_ind(verts[3], verts[0]),
|
||||
)
|
||||
|
||||
|
||||
class MeshPolygon(StructRNA):
|
||||
__slots__ = ()
|
||||
|
||||
@@ -461,6 +462,7 @@ class MeshPolygon(StructRNA):
|
||||
end = start + self.loop_total
|
||||
return range(start, end)
|
||||
|
||||
|
||||
class Text(bpy_types.ID):
|
||||
__slots__ = ()
|
||||
|
||||
|
||||
@@ -197,7 +197,6 @@ class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
|
||||
layout.prop(curve, "path_duration", text="Frames")
|
||||
layout.prop(curve, "eval_time")
|
||||
|
||||
|
||||
# these are for paths only
|
||||
row = layout.row()
|
||||
row.prop(curve, "use_path_follow")
|
||||
|
||||
@@ -3012,7 +3012,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
|
||||
|
||||
has_edge_origindex = CustomData_has_layer(&ccgdm->dm.edgeData, CD_ORIGINDEX);
|
||||
|
||||
faceNum = 0;
|
||||
|
||||
loopindex = loopindex2 = 0; //current loop index
|
||||
for (index = 0; index < totface; index++) {
|
||||
CCGFace *f = ccgdm->faceMap[index].face;
|
||||
|
||||
@@ -103,6 +103,7 @@ set(SRC
|
||||
BLI_dynlib.h
|
||||
BLI_dynstr.h
|
||||
BLI_edgehash.h
|
||||
BLI_editVert.h
|
||||
BLI_fileops.h
|
||||
BLI_fileops_types.h
|
||||
BLI_fnmatch.h
|
||||
|
||||
@@ -1562,7 +1562,7 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D
|
||||
for (track= tracksbase->first; track; track= track->next) {
|
||||
int selected= TRACK_SELECTED(track);
|
||||
|
||||
if ((draw_selected && !selected) || (draw_selected && !selected))
|
||||
if (draw_selected && !selected)
|
||||
continue;
|
||||
|
||||
if ((track->flag&TRACK_HAS_BUNDLE)==0)
|
||||
|
||||
@@ -280,6 +280,7 @@ set(SRC
|
||||
rna_internal.h
|
||||
rna_internal_types.h
|
||||
rna_nodetree_types.h
|
||||
rna_mesh_utils.h
|
||||
)
|
||||
|
||||
blender_add_lib(bf_rna "${SRC}" "${INC}" "${INC_SYS}")
|
||||
|
||||
Reference in New Issue
Block a user