diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-03-20 01:43:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-03-20 01:49:35 +0300 |
commit | fa11d41113514e46038888285e3244858ff5a30c (patch) | |
tree | b97e993bd22244db8c72ab76207a7bfbaec36b8f /release/scripts/startup/bl_ui/properties_texture.py | |
parent | df76616d7450b99938f265283fad443186da4039 (diff) |
Cleanup: especially non pep8 parts of Py UI
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_texture.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_texture.py | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index caeccb9bb9d..d05527b7ef6 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -21,15 +21,15 @@ import bpy from bpy.types import Menu, Panel, UIList from bpy.types import ( - Brush, - FreestyleLineStyle, - Lamp, - Material, - Object, - ParticleSettings, - Texture, - World, - ) + Brush, + FreestyleLineStyle, + Lamp, + Material, + Object, + ParticleSettings, + Texture, + World, +) from rna_prop_ui import PropertyPanel @@ -60,6 +60,7 @@ class TEXTURE_MT_envmap_specials(Menu): class TEXTURE_UL_texslots(UIList): + def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): # assert(isinstance(item, bpy.types.MaterialTextureSlot) ma = data @@ -198,7 +199,8 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel): if tex_collection: row = layout.row() - row.template_list("TEXTURE_UL_texslots", "", idblock, "texture_slots", idblock, "active_texture_index", rows=2) + row.template_list("TEXTURE_UL_texslots", "", idblock, "texture_slots", + idblock, "active_texture_index", rows=2) col = row.column(align=True) col.operator("texture.slot_move", text="", icon='TRIA_UP').type = 'UP' @@ -1210,12 +1212,22 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel): row = layout.row() sub = row.row() - sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and (tex.texture.use_normal_map or tex.texture.use_derivative_map)) + sub.active = ( + (tex.use_map_normal or tex.use_map_warp) and + not (tex.texture.type == 'IMAGE' and + (tex.texture.use_normal_map or tex.texture.use_derivative_map)) + ) sub.prop(tex, "bump_method", text="Method") - # the space setting is supported for: derivative-maps + bump-maps (DEFAULT,BEST_QUALITY), not for normal-maps + # the space setting is supported for: derivative-maps + bump-maps + # (DEFAULT,BEST_QUALITY), not for normal-maps sub = row.row() - sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and ((tex.bump_method in {'BUMP_LOW_QUALITY', 'BUMP_MEDIUM_QUALITY', 'BUMP_BEST_QUALITY'}) or (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map)) + sub.active = ( + (tex.use_map_normal or tex.use_map_warp) and + not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and + ((tex.bump_method in {'BUMP_LOW_QUALITY', 'BUMP_MEDIUM_QUALITY', 'BUMP_BEST_QUALITY'}) or + (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map)) + ) sub.prop(tex, "bump_objectspace", text="Space") |