Skip to content

Commit

Permalink
pep8 style warning corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
ideasman42 committed Feb 16, 2011
1 parent 1886b82 commit d890d19
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 42 deletions.
2 changes: 1 addition & 1 deletion io_mesh_ply/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ImportPLY(bpy.types.Operator, ImportHelper):
'''Load a PLY geometry file'''
bl_idname = "import_mesh.ply"
bl_label = "Import PLY"

files = CollectionProperty(name="File Path",
description="File path used for importing "
"the PLY file",
Expand Down
2 changes: 1 addition & 1 deletion io_mesh_stl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ImportSTL(bpy.types.Operator, ImportHelper):
bl_label = "Import STL"

filename_ext = ".stl"

filter_glob = StringProperty(default="*.stl", options={'HIDDEN'})

files = CollectionProperty(name="File Path",
Expand Down
2 changes: 1 addition & 1 deletion io_scene_fbx/export_fbx.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def setPoseFrame(self, f):

def getPoseBone(self):
return self.__pose_bone

# get pose from frame.
def getPoseMatrix(self, f): # ----------------------------------------------
return self.__anim_poselist[f]
Expand Down
50 changes: 24 additions & 26 deletions render_povray/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ def register():
soft_max=1,
default=(0.001, 0.001, 0.001),
options={'ANIMATABLE'})



Scene.pov_baking_enable = BoolProperty(
name="Enable Baking",
description="Enable POV-Rays texture baking",
Expand Down Expand Up @@ -186,7 +185,7 @@ def register():
Scene.pov_photon_gather_max = IntProperty(
name="Gather Max", description="Maximum number of photons gathered for each point",
min=1, max=256, default=100)

Scene.pov_radio_adc_bailout = FloatProperty(
name="ADC Bailout", description="The adc_bailout for radiosity rays. Use adc_bailout = 0.01 / brightest_ambient_object for good results",
min=0.0, max=1000.0, soft_min=0.0, soft_max=1.0, default=0.01, precision=3)
Expand Down Expand Up @@ -282,7 +281,6 @@ def register():
description="This parameter varies the thickness.",
min=0.0, max=10.0, soft_min=0.000, soft_max=1.0, default=0)


Mat.pov_interior_fade_color = FloatVectorProperty(
name="Fade Color",
description="Color of filtered attenuation for transparent materials",
Expand Down Expand Up @@ -334,22 +332,22 @@ def register():
default="1") # ui.py has to be loaded before render.py with this.

###########################################################################

Tex = bpy.types.Texture

#Custom texture gamma
Tex.pov_tex_gamma_enable = BoolProperty(
name="Enable custom texture gamma",
description="Notify some custom gamma for which texture has been precorrected without the file format carrying it and only if it differs from your OS expected standard (see pov doc)",
default=False)

Tex.pov_tex_gamma_value = FloatProperty(
name="Custom texture gamma",
description="value for which the file was issued e.g. a Raw photo is gamma 1.0",
min=0.45, max=5.00, soft_min=1.00, soft_max=2.50, default=1.00)

###########################################################################

Obj = bpy.types.Object

#Importance sampling
Expand All @@ -362,10 +360,10 @@ def register():
Obj.pov_collect_photons = BoolProperty(
name="Receive Photon Caustics",
description="Enable object to collect photons from other objects caustics. Turn off for objects that don't really need to receive caustics (e.g. objects that generate caustics often don't need to show any on themselves) ",
default=True)
default=True)

###########################################################################

Cam = bpy.types.Camera

#DOF Toggle
Expand Down Expand Up @@ -395,7 +393,7 @@ def register():
name="Variance",
description="Minimum threshold (fractional value) for adaptive DOF sampling (up increases quality and render time). The value for the variance should be in the range of the smallest displayable color difference",
min=1, max=100000, soft_max=10000, default=256)

Cam.pov_dof_confidence = FloatProperty(
name="Confidence",
description="Probability to reach the real color value. Larger confidence values will lead to more samples, slower traces and better images.",
Expand All @@ -411,9 +409,9 @@ def unregister():

Scene = bpy.types.Scene
Mat = bpy.types.Material
Tex = bpy.types.Texture
Tex = bpy.types.Texture
Obj = bpy.types.Object
Cam = bpy.types.Camera
Cam = bpy.types.Camera
del Scene.pov_tempfiles_enable # CR
del Scene.pov_scene_name # CR
del Scene.pov_deletefiles_enable # CR
Expand Down Expand Up @@ -441,11 +439,11 @@ def unregister():
del Scene.pov_media_color # MR
del Scene.pov_baking_enable # MR
del Scene.pov_max_trace_level # MR
del Scene.pov_photon_spacing # MR
del Scene.pov_photon_max_trace_level # MR
del Scene.pov_photon_adc_bailout # MR
del Scene.pov_photon_gather_min # MR
del Scene.pov_photon_gather_max # MR
del Scene.pov_photon_spacing # MR
del Scene.pov_photon_max_trace_level # MR
del Scene.pov_photon_adc_bailout # MR
del Scene.pov_photon_gather_min # MR
del Scene.pov_photon_gather_max # MR
del Scene.pov_antialias_enable # CR
del Scene.pov_antialias_method # CR
del Scene.pov_antialias_depth # CR
Expand All @@ -464,7 +462,7 @@ def unregister():
del Mat.pov_irid_amount # MR
del Mat.pov_irid_thickness # MR
del Mat.pov_irid_turbulence # MR
del Mat.pov_interior_fade_color # MR
del Mat.pov_interior_fade_color # MR
del Mat.pov_caustics_enable # MR
del Mat.pov_fake_caustics # MR
del Mat.pov_fake_caustics_power # MR
Expand All @@ -475,13 +473,13 @@ def unregister():
del Tex.pov_tex_gamma_enable # MR
del Tex.pov_tex_gamma_value # MR
del Obj.pov_importance_value # MR
del Obj.pov_collect_photons # MR
del Cam.pov_dof_enable # MR
del Cam.pov_dof_aperture # MR
del Cam.pov_dof_samples_min # MR
del Cam.pov_dof_samples_max # MR
del Cam.pov_dof_variance # MR
del Cam.pov_dof_confidence # MR
del Obj.pov_collect_photons # MR
del Cam.pov_dof_enable # MR
del Cam.pov_dof_aperture # MR
del Cam.pov_dof_samples_min # MR
del Cam.pov_dof_samples_max # MR
del Cam.pov_dof_variance # MR
del Cam.pov_dof_confidence # MR

if __name__ == "__main__":
register()
8 changes: 4 additions & 4 deletions render_povray/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def splitExt(path):
else:
return path[dotidx:].upper().replace(".", "")


def imageFormat(imgF):
ext = ""
ext_orig = splitExt(imgF)
Expand Down Expand Up @@ -314,7 +314,7 @@ def writeObjectMaterial(material, ob):
tabWrite("}\n")
if not ob.pov_collect_photons:
tabWrite("photons{collect off}\n")

if pov_photons_refraction or pov_photons_reflection:
tabWrite("photons{\n")
tabWrite("target\n")
Expand Down Expand Up @@ -536,7 +536,7 @@ def exportCamera():
tabWrite("rotate <%.6f, %.6f, %.6f>\n" % tuple([degrees(e) for e in matrix.to_3x3().to_euler()]))
tabWrite("translate <%.6f, %.6f, %.6f>\n" % (matrix[3][0], matrix[3][1], matrix[3][2]))
if camera.data.pov_dof_enable and focal_point != 0:
tabWrite("aperture %.3g\n" % camera.data.pov_dof_aperture)
tabWrite("aperture %.3g\n" % camera.data.pov_dof_aperture)
tabWrite("blur_samples %d %d\n" % (camera.data.pov_dof_samples_min, camera.data.pov_dof_samples_max))
tabWrite("variance 1/%d\n" % camera.data.pov_dof_variance)
tabWrite("confidence %.3g\n" % camera.data.pov_dof_confidence)
Expand Down Expand Up @@ -593,7 +593,7 @@ def exportLamps(lamps):
tabWrite("adaptive 1\n")
tabWrite("jitter\n")

if not scene.render.use_shadows or lamp.type == 'HEMI' or (lamp.type != 'HEMI' and lamp.shadow_method == 'NOSHADOW'): # HEMI never has any shadow_method attribute
if not scene.render.use_shadows or lamp.type == 'HEMI' or (lamp.type != 'HEMI' and lamp.shadow_method == 'NOSHADOW'): # HEMI never has any shadow_method attribute
tabWrite("shadowless\n")

if lamp.type not in ('SUN', 'AREA', 'HEMI'): # Sun shouldn't be attenuated. Hemi and area lights have no falloff attribute so they are put to type 2 attenuation a little higher above.
Expand Down
18 changes: 9 additions & 9 deletions render_povray/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def draw(self, context):
col = split.column()
col.prop(scene, "pov_indentation_character", text="Indent")
col = split.column()
if scene.pov_indentation_character == "2":
if scene.pov_indentation_character == "2":
col.prop(scene, "pov_indentation_spaces", text="Spaces")
split = layout.split()
col = split.column()
Expand All @@ -212,7 +212,7 @@ def draw(self, context):

split = layout.split()
col = split.column()

col.label(text="Global Settings")
col.prop(scene, "pov_max_trace_level", text="Ray Depth")

Expand All @@ -227,7 +227,7 @@ def draw(self, context):
col = split.column()

col.prop(scene, "pov_photon_adc_bailout", text="Photon ADC")
col.prop(scene, "pov_photon_gather_max")
col.prop(scene, "pov_photon_gather_max")


class RENDER_PT_povray_antialias(RenderButtonsPanel, bpy.types.Panel):
Expand Down Expand Up @@ -483,13 +483,13 @@ def draw(self, context):

col = split.column()
col.prop(mat, "pov_refraction_type")

if mat.pov_refraction_type == "1":
col.prop(mat, "pov_fake_caustics_power", slider=True)
elif mat.pov_refraction_type == "2":
col.prop(mat, "pov_photons_dispersion", slider=True)
col.prop(mat, "pov_photons_reflection")

if mat.pov_refraction_type == "0" and not mat.pov_photons_reflection:
split = layout.split()
col = split.column()
Expand Down Expand Up @@ -550,24 +550,24 @@ def draw_header(self, context):
cam = context.camera

self.layout.prop(cam, "pov_dof_enable", text="")

def draw(self, context):
layout = self.layout

cam = context.camera

layout.active = cam.pov_dof_enable

split = layout.split()
row = split.row()
row.prop(cam, "pov_dof_aperture")

split = layout.split()
col = split.column()

col.prop(cam, "pov_dof_samples_min")
col.prop(cam, "pov_dof_variance")

col = split.column()

col.prop(cam, "pov_dof_samples_max")
Expand Down

0 comments on commit d890d19

Please sign in to comment.