Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-01-31 17:46:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-31 17:46:28 +0300
commit95069f29099b40055c0a3e4d10f4a7b0c602a1df (patch)
tree150ab0c4796c71a89c628c62213df625e4a72670 /release/scripts/ui
parentfbadf21b00dba10945d269cf7a82e091833bfcb4 (diff)
pep8 changes
Diffstat (limited to 'release/scripts/ui')
-rw-r--r--release/scripts/ui/properties_animviz.py30
-rw-r--r--release/scripts/ui/properties_data_armature.py3
-rw-r--r--release/scripts/ui/properties_data_camera.py1
-rw-r--r--release/scripts/ui/properties_data_curve.py2
-rw-r--r--release/scripts/ui/properties_data_mesh.py3
-rw-r--r--release/scripts/ui/properties_data_metaball.py2
-rw-r--r--release/scripts/ui/properties_data_modifier.py15
-rw-r--r--release/scripts/ui/properties_material.py6
-rw-r--r--release/scripts/ui/properties_object.py2
-rw-r--r--release/scripts/ui/properties_object_constraint.py6
-rw-r--r--release/scripts/ui/properties_render.py15
-rw-r--r--release/scripts/ui/properties_scene.py6
-rw-r--r--release/scripts/ui/properties_texture.py12
-rw-r--r--release/scripts/ui/properties_world.py3
-rw-r--r--release/scripts/ui/space_graph.py2
-rw-r--r--release/scripts/ui/space_image.py8
-rw-r--r--release/scripts/ui/space_info.py3
-rw-r--r--release/scripts/ui/space_node.py2
-rw-r--r--release/scripts/ui/space_userpref.py113
-rw-r--r--release/scripts/ui/space_view3d.py12
-rw-r--r--release/scripts/ui/space_view3d_toolbar.py11
21 files changed, 140 insertions, 117 deletions
diff --git a/release/scripts/ui/properties_animviz.py b/release/scripts/ui/properties_animviz.py
index 2085030a29c..89d526ab8dc 100644
--- a/release/scripts/ui/properties_animviz.py
+++ b/release/scripts/ui/properties_animviz.py
@@ -24,6 +24,7 @@ narrowui = 180
################################################
# Generic Panels (Independent of DataType)
+
class MotionPathButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -31,9 +32,9 @@ class MotionPathButtonsPanel(bpy.types.Panel):
def draw_settings(self, context, avs, wide_ui, bones=False):
layout = self.layout
-
+
mps = avs.motion_paths
-
+
if wide_ui:
layout.prop(mps, "type", expand=True)
else:
@@ -61,6 +62,7 @@ class MotionPathButtonsPanel(bpy.types.Panel):
col.prop(mps, "highlight_keyframes", text="Keyframes")
col.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers")
+
# FIXME: this panel still needs to be ported so that it will work correctly with animviz
class OnionSkinButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
@@ -99,21 +101,22 @@ class OnionSkinButtonsPanel(bpy.types.Panel):
################################################
# Specific Panels for DataTypes
+
class OBJECT_PT_motion_paths(MotionPathButtonsPanel):
#bl_label = "Object Motion Paths"
bl_context = "object"
def poll(self, context):
return (context.object)
-
+
def draw(self, context):
layout = self.layout
-
- ob = context.object
+
+ ob = context.object
wide_ui = context.region.width > narrowui
-
+
self.draw_settings(context, ob.animation_visualisation, wide_ui)
-
+
layout.separator()
split = layout.split()
@@ -124,7 +127,8 @@ class OBJECT_PT_motion_paths(MotionPathButtonsPanel):
if wide_ui:
col = split.column()
col.operator("object.paths_clear", text="Clear Paths")
-
+
+
class DATA_PT_motion_paths(MotionPathButtonsPanel):
#bl_label = "Bone Motion Paths"
bl_context = "data"
@@ -132,15 +136,15 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel):
def poll(self, context):
# XXX: include posemode check?
return (context.object) and (context.armature)
-
+
def draw(self, context):
layout = self.layout
-
- ob = context.object
+
+ ob = context.object
wide_ui = context.region.width > narrowui
-
+
self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
-
+
layout.separator()
split = layout.split()
diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py
index 2a14ee74c4e..06452bb39c1 100644
--- a/release/scripts/ui/properties_data_armature.py
+++ b/release/scripts/ui/properties_data_armature.py
@@ -162,7 +162,10 @@ class DATA_PT_bone_groups(DataButtonsPanel):
#row.operator("object.bone_group_select", text="Select")
#row.operator("object.bone_group_deselect", text="Deselect")
+
# TODO: this panel will soon be depreceated too
+
+
class DATA_PT_ghost(DataButtonsPanel):
bl_label = "Ghost"
diff --git a/release/scripts/ui/properties_data_camera.py b/release/scripts/ui/properties_data_camera.py
index 44fa3013bd2..2d182506a92 100644
--- a/release/scripts/ui/properties_data_camera.py
+++ b/release/scripts/ui/properties_data_camera.py
@@ -121,7 +121,6 @@ class DATA_PT_camera(DataButtonsPanel):
if cam.dof_object != None:
col.enabled = False
col.prop(cam, "dof_distance", text="Distance")
-
class DATA_PT_camera_display(DataButtonsPanel):
diff --git a/release/scripts/ui/properties_data_curve.py b/release/scripts/ui/properties_data_curve.py
index 4071c7b0412..15ca3c14f8c 100644
--- a/release/scripts/ui/properties_data_curve.py
+++ b/release/scripts/ui/properties_data_curve.py
@@ -283,7 +283,7 @@ class DATA_PT_font(DataButtonsPanel):
wide_ui = context.region.width > narrowui
layout.template_ID(text, "font", open="font.open", unlink="font.unlink")
-
+
#if wide_ui:
# layout.prop(text, "font")
#else:
diff --git a/release/scripts/ui/properties_data_mesh.py b/release/scripts/ui/properties_data_mesh.py
index 2748c5e4c31..82c3b37381f 100644
--- a/release/scripts/ui/properties_data_mesh.py
+++ b/release/scripts/ui/properties_data_mesh.py
@@ -156,7 +156,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
ob = context.object
key = ob.data.shape_keys
if key and len(key.keys):
- # this is so that we get the active shapekey from the
+ # this is so that we get the active shapekey from the
# shapekeys block, not from object data
kb = key.keys[ob.active_shape_key.name]
else:
@@ -299,4 +299,3 @@ bpy.types.register(DATA_PT_uv_texture)
bpy.types.register(DATA_PT_vertex_colors)
bpy.types.register(DATA_PT_custom_props_mesh)
-
diff --git a/release/scripts/ui/properties_data_metaball.py b/release/scripts/ui/properties_data_metaball.py
index 8951693aaac..60b9bd3432e 100644
--- a/release/scripts/ui/properties_data_metaball.py
+++ b/release/scripts/ui/properties_data_metaball.py
@@ -140,5 +140,3 @@ bpy.types.register(DATA_PT_metaball)
bpy.types.register(DATA_PT_metaball_element)
bpy.types.register(DATA_PT_custom_props_metaball)
-
-
diff --git a/release/scripts/ui/properties_data_modifier.py b/release/scripts/ui/properties_data_modifier.py
index 2d97ef10506..dfd44529048 100644
--- a/release/scripts/ui/properties_data_modifier.py
+++ b/release/scripts/ui/properties_data_modifier.py
@@ -22,6 +22,7 @@ import bpy
narrowui = 180
narrowmod = 260
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -37,7 +38,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
ob = context.object
wide_ui = context.region.width > narrowui
compact_mod = context.region.width < narrowmod
-
+
layout.operator_menu_enum("object.modifier_add", "type")
for md in ob.modifiers:
@@ -602,22 +603,22 @@ class DATA_PT_modifiers(DataButtonsPanel):
def SOLIDIFY(self, layout, ob, md, wide_ui):
layout.prop(md, "offset")
-
+
split = layout.split()
-
+
col = split.column()
col.label(text="Crease:")
- col.prop(md, "edge_crease_inner",text="Inner")
+ col.prop(md, "edge_crease_inner", text="Inner")
col.prop(md, "edge_crease_outer", text="Outer")
col.prop(md, "edge_crease_rim", text="Rim")
-
+
if wide_ui:
col = split.column()
col.label()
col.prop(md, "use_rim")
col.prop(md, "use_even_offset")
col.prop(md, "use_quality_normals")
-
+
# col = layout.column()
# col.label(text="Vertex Group:")
# col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
@@ -728,4 +729,4 @@ class DATA_PT_modifiers(DataButtonsPanel):
col.prop(md, "width", slider=True)
col.prop(md, "narrowness", slider=True)
-bpy.types.register(DATA_PT_modifiers) \ No newline at end of file
+bpy.types.register(DATA_PT_modifiers)
diff --git a/release/scripts/ui/properties_material.py b/release/scripts/ui/properties_material.py
index 863e596d701..bd3b6f86e7e 100644
--- a/release/scripts/ui/properties_material.py
+++ b/release/scripts/ui/properties_material.py
@@ -103,7 +103,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
col = row.column(align=True)
col.operator("object.material_slot_add", icon='ZOOMIN', text="")
col.operator("object.material_slot_remove", icon='ZOOMOUT', text="")
-
+
col.menu("MATERIAL_MT_specials", icon='DOWNARROW_HLT', text="")
if ob.mode == 'EDIT':
@@ -653,6 +653,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
sub.prop(rayt, "gloss_threshold", text="Threshold")
sub.prop(rayt, "gloss_samples", text="Samples")
+
class MATERIAL_PT_transp_game(MaterialButtonsPanel):
bl_label = "Transparency"
bl_default_closed = True
@@ -686,7 +687,7 @@ class MATERIAL_PT_transp_game(MaterialButtonsPanel):
col = split.column()
col.prop(mat, "alpha")
-
+
class MATERIAL_PT_halo(MaterialButtonsPanel):
bl_label = "Halo"
@@ -788,6 +789,7 @@ bpy.types.register(MATERIAL_PT_options)
bpy.types.register(MATERIAL_PT_shadow)
bpy.types.register(MATERIAL_PT_transp_game)
+
class VolumeButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
diff --git a/release/scripts/ui/properties_object.py b/release/scripts/ui/properties_object.py
index 3b539506552..181560751ea 100644
--- a/release/scripts/ui/properties_object.py
+++ b/release/scripts/ui/properties_object.py
@@ -179,7 +179,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
if wide_ui:
col = split.column()
col.prop(group, "dupli_offset", text="")
-
+
prop = col.operator("wm.context_set_value", text="From Cursor")
prop.path = "object.group_users[%d].dupli_offset" % index
prop.value = value
diff --git a/release/scripts/ui/properties_object_constraint.py b/release/scripts/ui/properties_object_constraint.py
index 372c67211c5..fcd342cf377 100644
--- a/release/scripts/ui/properties_object_constraint.py
+++ b/release/scripts/ui/properties_object_constraint.py
@@ -460,12 +460,12 @@ class ConstraintButtonsPanel(bpy.types.Panel):
layout.prop(con, "use_offset")
self.space_template(layout, con, wide_ui)
-
+
def COPY_TRANSFORMS(self, context, layout, con, wide_ui):
self.target_template(layout, con, wide_ui)
self.space_template(layout, con, wide_ui)
-
+
#def SCRIPT(self, context, layout, con):
@@ -566,7 +566,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
if wide_ui:
row.label(text="Min/Max:")
row.prop(con, "floor_location", expand=True)
-
+
self.space_template(layout, con, wide_ui)
def RIGID_BODY_JOINT(self, context, layout, con, wide_ui):
diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py
index d837f5f1b79..fe83a70fe56 100644
--- a/release/scripts/ui/properties_render.py
+++ b/release/scripts/ui/properties_render.py
@@ -168,6 +168,7 @@ class RENDER_PT_layers(RenderButtonsPanel):
row.prop(rl, "pass_refraction")
row.prop(rl, "pass_refraction_exclude", text="", icon='X')
+
class RENDER_PT_shading(RenderButtonsPanel):
bl_label = "Shading"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -567,12 +568,12 @@ class RENDER_PT_bake(RenderButtonsPanel):
wide_ui = context.region.width > narrowui
layout.operator("object.bake_image", icon='RENDER_STILL')
-
+
if wide_ui:
layout.prop(rd, "bake_type")
else:
layout.prop(rd, "bake_type", text="")
-
+
if rd.bake_type == 'NORMALS':
if wide_ui:
layout.prop(rd, "bake_normal_space")
@@ -580,19 +581,19 @@ class RENDER_PT_bake(RenderButtonsPanel):
layout.prop(rd, "bake_normal_space", text="")
elif rd.bake_type in ('DISPLACEMENT', 'AO'):
layout.prop(rd, "bake_normalized")
-
+
# col.prop(rd, "bake_aa_mode")
# col.prop(rd, "bake_enable_aa")
-
+
layout.separator()
-
+
split = layout.split()
col = split.column()
col.prop(rd, "bake_clear")
col.prop(rd, "bake_margin")
col.prop(rd, "bake_quad_split", text="Split")
-
+
if wide_ui:
col = split.column()
col.prop(rd, "bake_active")
@@ -601,7 +602,7 @@ class RENDER_PT_bake(RenderButtonsPanel):
sub.prop(rd, "bake_distance")
sub.prop(rd, "bake_bias")
-
+
bpy.types.register(RENDER_MT_presets)
bpy.types.register(RENDER_PT_render)
bpy.types.register(RENDER_PT_layers)
diff --git a/release/scripts/ui/properties_scene.py b/release/scripts/ui/properties_scene.py
index 0ce8d1dca3e..832f1cee645 100644
--- a/release/scripts/ui/properties_scene.py
+++ b/release/scripts/ui/properties_scene.py
@@ -74,7 +74,7 @@ class SCENE_PT_unit(SceneButtonsPanel):
if wide_ui:
col = split.column()
col.prop(unit, "use_separate")
-
+
layout.column().prop(unit, "rotation_units")
@@ -180,6 +180,7 @@ class SCENE_PT_physics(SceneButtonsPanel):
else:
layout.column().prop(scene, "gravity", text="")
+
class SCENE_PT_simplify(SceneButtonsPanel):
bl_label = "Simplify"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -188,7 +189,7 @@ class SCENE_PT_simplify(SceneButtonsPanel):
scene = context.scene
rd = scene.render_data
self.layout.prop(rd, "use_simplify", text="")
-
+
def draw(self, context):
layout = self.layout
scene = context.scene
@@ -216,4 +217,3 @@ bpy.types.register(SCENE_PT_physics)
bpy.types.register(SCENE_PT_simplify)
bpy.types.register(SCENE_PT_custom_props)
-
diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py
index 5f742ddcfb9..7de0df2dfe4 100644
--- a/release/scripts/ui/properties_texture.py
+++ b/release/scripts/ui/properties_texture.py
@@ -103,23 +103,23 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
col = row.column(align=True)
col.operator("texture.slot_move", text="", icon='TRIA_UP').type = 'UP'
col.operator("texture.slot_move", text="", icon='TRIA_DOWN').type = 'DOWN'
-
+
if wide_ui:
split = layout.split(percentage=0.65)
col = split.column()
else:
col = layout.column()
-
+
if tex_collection:
col.template_ID(idblock, "active_texture", new="texture.new")
elif node:
col.template_ID(node, "texture", new="texture.new")
elif idblock:
col.template_ID(idblock, "texture", new="texture.new")
-
+
if space.pin_id:
col.template_ID(space, "pin_id")
-
+
if wide_ui:
col = split.column()
@@ -281,7 +281,7 @@ class TEXTURE_PT_influence(TextureSlotPanel):
idblock = context_tex_datablock(context)
if type(idblock) == bpy.types.Brush:
return False
-
+
return context.texture_slot
def draw(self, context):
@@ -848,7 +848,7 @@ class TEXTURE_PT_voxeldata(TextureButtonsPanel):
layout.prop(vd, "domain_object")
layout.prop(vd, "smoke_data_type")
elif vd.file_format == 'IMAGE_SEQUENCE':
- layout.template_image(tex, "image", tex.image_user)
+ layout.template_image(tex, "image", tex.image_user)
layout.prop(vd, "still")
row = layout.row()
diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py
index 2633aeb6cc9..a30dacb6eb3 100644
--- a/release/scripts/ui/properties_world.py
+++ b/release/scripts/ui/properties_world.py
@@ -181,6 +181,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
split.prop(light, "ao_factor", text="Factor")
split.prop(light, "ao_blend_mode", text="")
+
class WORLD_PT_environment_lighting(WorldButtonsPanel):
bl_label = "Environment Lighting"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -199,6 +200,7 @@ class WORLD_PT_environment_lighting(WorldButtonsPanel):
split.prop(light, "environment_energy", text="Energy")
split.prop(light, "environment_color", text="")
+
class WORLD_PT_indirect_lighting(WorldButtonsPanel):
bl_label = "Indirect Lighting"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -217,6 +219,7 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel):
split.prop(light, "indirect_factor", text="Factor")
split.prop(light, "indirect_bounces", text="Bounces")
+
class WORLD_PT_gather(WorldButtonsPanel):
bl_label = "Gather"
COMPAT_ENGINES = {'BLENDER_RENDER'}
diff --git a/release/scripts/ui/space_graph.py b/release/scripts/ui/space_graph.py
index c1d3b87a9de..e4752877c2f 100644
--- a/release/scripts/ui/space_graph.py
+++ b/release/scripts/ui/space_graph.py
@@ -70,7 +70,7 @@ class GRAPH_MT_view(bpy.types.Menu):
layout.operator("graph.properties", icon='MENU_PANEL')
layout.separator()
-
+
layout.prop(st, "realtime_updates")
layout.prop(st, "show_cframe_indicator")
layout.prop(st, "show_cursor")
diff --git a/release/scripts/ui/space_image.py b/release/scripts/ui/space_image.py
index e21b1c3d1da..da9151906ba 100644
--- a/release/scripts/ui/space_image.py
+++ b/release/scripts/ui/space_image.py
@@ -387,22 +387,24 @@ class IMAGE_PT_game_properties(bpy.types.Panel):
col.separator()
col.prop(ima, "mapping", expand=True)
+
class IMAGE_PT_view_histogram(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'PREVIEW'
bl_label = "Histogram"
-
+
def poll(self, context):
sima = context.space_data
return (sima and sima.image)
-
+
def draw(self, context):
layout = self.layout
sima = context.space_data
-
+
layout.template_histogram(sima, "histogram")
+
class IMAGE_PT_view_properties(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
diff --git a/release/scripts/ui/space_info.py b/release/scripts/ui/space_info.py
index d027700ccd4..c23d93ae77b 100644
--- a/release/scripts/ui/space_info.py
+++ b/release/scripts/ui/space_info.py
@@ -90,7 +90,7 @@ class INFO_MT_file(bpy.types.Menu):
layout.separator()
layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES')
-
+
layout.operator_context = 'EXEC_AREA'
layout.operator("wm.read_homefile", text="Load Factory Settings").factory = True
@@ -129,6 +129,7 @@ class INFO_MT_file_open_recent(bpy.types.Menu):
layout.operator("wm.open_mainfile", text=line, icon='FILE_BLEND').path = line
file.close()
+
class INFO_MT_file_import(bpy.types.Menu):
bl_idname = "INFO_MT_file_import"
bl_label = "Import"
diff --git a/release/scripts/ui/space_node.py b/release/scripts/ui/space_node.py
index 3dc26f49a6f..68372d8957f 100644
--- a/release/scripts/ui/space_node.py
+++ b/release/scripts/ui/space_node.py
@@ -120,7 +120,7 @@ class NODE_MT_node(bpy.types.Menu):
layout.separator()
layout.operator("node.link_make")
- layout.operator("node.link_make", text="Make and Replace Links").replace=True
+ layout.operator("node.link_make", text="Make and Replace Links").replace = True
layout.separator()
layout.operator("node.group_edit")
diff --git a/release/scripts/ui/space_userpref.py b/release/scripts/ui/space_userpref.py
index 561a537880d..e596c2b0bdb 100644
--- a/release/scripts/ui/space_userpref.py
+++ b/release/scripts/ui/space_userpref.py
@@ -18,10 +18,14 @@
# <pep8 compliant>
import bpy
-import os, re, shutil
+import os
+import re
+import shutil
+
-# General UI Theme Settings (User Interface)
def ui_items_general(col, context):
+ """ General UI Theme Settings (User Interface)
+ """
row = col.row()
sub = row.column()
sub.prop(context, "outline")
@@ -38,9 +42,10 @@ def ui_items_general(col, context):
subsub.active = context.shaded
subsub.prop(context, "shadetop")
subsub.prop(context, "shadedown")
-
+
col.separator()
-
+
+
def opengl_lamp_buttons(column, lamp):
split = column.split(percentage=0.1)
@@ -236,14 +241,14 @@ class USERPREF_PT_interface(bpy.types.Panel):
col.prop(view, "auto_perspective")
col.prop(view, "smooth_view")
col.prop(view, "rotation_angle")
-
+
col.separator()
col.separator()
-
+
col.label(text="2D Viewports:")
col.prop(view, "view2d_grid_minimum_spacing", text="Minimum Grid Spacing")
col.prop(view, "timecode_style")
-
+
row.separator()
row.separator()
@@ -427,10 +432,10 @@ class USERPREF_PT_system(bpy.types.Panel):
col.separator()
col.separator()
col.separator()
-
+
col.label(text="Screencast:")
col.prop(system, "screencast_fps")
- col.prop(system, "screencast_wait_time")
+ col.prop(system, "screencast_wait_time")
col.separator()
col.separator()
col.separator()
@@ -448,7 +453,7 @@ class USERPREF_PT_system(bpy.types.Panel):
#col.separator()
#col.prop(system, "use_textured_fonts")
-
+
# 2. Column
column = split.column()
@@ -475,7 +480,7 @@ class USERPREF_PT_system(bpy.types.Panel):
col.label(text="Sequencer:")
col.prop(system, "prefetch_frames")
col.prop(system, "memory_cache_limit")
-
+
# 3. Column
column = split.column()
@@ -486,27 +491,27 @@ class USERPREF_PT_system(bpy.types.Panel):
split.label()
split.label(text="Colors:")
split.label(text="Direction:")
-
+
lamp = system.solid_lights[0]
opengl_lamp_buttons(column, lamp)
-
+
lamp = system.solid_lights[1]
opengl_lamp_buttons(column, lamp)
-
+
lamp = system.solid_lights[2]
opengl_lamp_buttons(column, lamp)
column.separator()
column.separator()
column.separator()
-
+
column.label(text="Color Picker Type:")
column.row().prop(system, "color_picker_type", text="")
-
+
column.separator()
column.separator()
column.separator()
-
+
column.prop(system, "use_weight_color_range", text="Custom Weight Paint Range")
sub = column.column()
sub.active = system.use_weight_color_range
@@ -532,7 +537,7 @@ class USERPREF_PT_theme(bpy.types.Panel):
split_themes.prop(theme, "theme_area", expand=True)
split = split_themes.split()
-
+
if theme.theme_area == 'USER_INTERFACE':
col = split.column()
@@ -939,19 +944,18 @@ class USERPREF_PT_theme(bpy.types.Panel):
col = split.column()
col.prop(prefs, "header_text")
-
+
elif theme.theme_area == 'CONSOLE':
prefs = theme.console
-
+
col = split.column()
col.prop(prefs, "header")
-
+
col = split.column()
col.prop(prefs, "line_output")
col.prop(prefs, "line_input")
col.prop(prefs, "line_info")
col.prop(prefs, "line_error")
-
class USERPREF_PT_file(bpy.types.Panel):
@@ -1062,7 +1066,7 @@ class USERPREF_PT_input(bpy.types.Panel):
row = col.row()
row.prop(km, "children_expanded", text="", no_bg=True)
row.label(text=km.name)
-
+
row.label()
row.label()
@@ -1156,7 +1160,7 @@ class USERPREF_PT_input(bpy.types.Panel):
# Expanded, additional event settings
if kmi.expanded:
box = col.box()
-
+
box.enabled = km.user_defined
if map_type not in ('TEXTINPUT', 'TIMER'):
@@ -1186,8 +1190,8 @@ class USERPREF_PT_input(bpy.types.Panel):
subrow.prop(kmi, "alt")
subrow.prop(kmi, "oskey", text="Cmd")
subrow.prop(kmi, "key_modifier", text="", event=True)
-
- def display_properties(properties, title = None):
+
+ def display_properties(properties, title=None):
box.separator()
if title:
box.label(text=title)
@@ -1196,7 +1200,7 @@ class USERPREF_PT_input(bpy.types.Panel):
if not properties.is_property_hidden(pname):
value = eval("properties." + pname)
if isinstance(value, bpy.types.OperatorProperties):
- display_properties(value, title = pname)
+ display_properties(value, title=pname)
else:
flow.prop(properties, pname)
@@ -1301,9 +1305,9 @@ class USERPREF_PT_input(bpy.types.Panel):
def draw(self, context):
layout = self.layout
-
+
#import time
-
+
#start = time.time()
userpref = context.user_preferences
@@ -1328,7 +1332,7 @@ class USERPREF_PT_input(bpy.types.Panel):
row = subcol.row()
row.prop_object(wm, "active_keyconfig", wm, "keyconfigs", text="Configuration:")
- layout.set_context_pointer("keyconfig", wm.active_keyconfig)
+ layout.set_context_pointer("keyconfig", wm.active_keyconfig)
row.operator("wm.keyconfig_remove", text="", icon='X')
row.prop(kc, "filter", icon="VIEWZOOM")
@@ -1339,7 +1343,7 @@ class USERPREF_PT_input(bpy.types.Panel):
self.draw_filtered(kc, col)
else:
self.draw_hierarchy(kc, col)
-
+
#print("runtime", time.time() - start)
bpy.types.register(USERPREF_HT_header)
@@ -1383,7 +1387,7 @@ class WM_OT_keyconfig_test(bpy.types.Operator):
s.append(", key_modifier=\'%s\'" % kmi.key_modifier)
s.append(")\n")
-
+
def export_properties(prefix, properties):
for pname in dir(properties):
if not properties.is_property_hidden(pname):
@@ -1489,6 +1493,7 @@ def _string_value(value):
return result
+
class WM_OT_keyconfig_import(bpy.types.Operator):
"Import key configuration from a python script."
bl_idname = "wm.keyconfig_import"
@@ -1515,28 +1520,28 @@ class WM_OT_keyconfig_import(bpy.types.Operator):
for line in f.readlines():
match = name_pattern.match(line)
-
+
if match:
config_name = match.groups()[0]
-
+
f.close()
-
+
path = os.path.split(os.path.split(__file__)[0])[0] # remove ui/space_userpref.py
path = os.path.join(path, "cfg")
-
+
# create config folder if needed
if not os.path.exists(path):
- os.mkdir(path)
-
+ os.mkdir(path)
+
path = os.path.join(path, config_name + ".py")
-
+
if self.properties.keep_original:
shutil.copy(self.properties.path, path)
else:
shutil.move(self.properties.path, path)
-
- __import__(config_name)
-
+
+ __import__(config_name)
+
wm = bpy.data.window_managers[0]
wm.active_keyconfig = wm.keyconfigs[config_name]
@@ -1546,7 +1551,8 @@ class WM_OT_keyconfig_import(bpy.types.Operator):
wm = context.manager
wm.add_fileselect(self)
return {'RUNNING_MODAL'}
-
+
+
class WM_OT_keyconfig_export(bpy.types.Operator):
"Export key configuration to a python script."
bl_idname = "wm.keyconfig_export"
@@ -1615,9 +1621,9 @@ class WM_OT_keyconfig_export(bpy.types.Operator):
value = _string_value(value)
if value != "":
f.write(prefix + ".%s = %s\n" % (pname, value))
-
+
props = kmi.properties
-
+
if props is not None:
export_properties("kmi.properties", props)
@@ -1670,7 +1676,7 @@ class WM_OT_keyitem_restore(bpy.types.Operator):
bl_idname = "wm.keyitem_restore"
bl_label = "Restore Key Map Item"
- item_id = IntProperty(attr="item_id", name="Item Identifier", description="Identifier of the item to remove")
+ item_id = IntProperty(attr="item_id", name="Item Identifier", description="Identifier of the item to remove")
def execute(self, context):
wm = context.manager
@@ -1711,8 +1717,8 @@ class WM_OT_keyitem_remove(bpy.types.Operator):
bl_idname = "wm.keyitem_remove"
bl_label = "Remove Key Map Item"
- item_id = IntProperty(attr="item_id", name="Item Identifier", description="Identifier of the item to remove")
-
+ item_id = IntProperty(attr="item_id", name="Item Identifier", description="Identifier of the item to remove")
+
def execute(self, context):
wm = context.manager
km = context.keymap
@@ -1720,6 +1726,7 @@ class WM_OT_keyitem_remove(bpy.types.Operator):
km.remove_item(kmi)
return {'FINISHED'}
+
class WM_OT_keyconfig_remove(bpy.types.Operator):
"Remove key config."
bl_idname = "wm.keyconfig_remove"
@@ -1731,18 +1738,18 @@ class WM_OT_keyconfig_remove(bpy.types.Operator):
def execute(self, context):
wm = context.manager
-
+
keyconfig = wm.active_keyconfig
-
+
module = __import__(keyconfig.name)
-
+
os.remove(module.__file__)
compiled_path = module.__file__ + "c" # for .pyc
-
+
if os.path.exists(compiled_path):
os.remove(compiled_path)
-
+
wm.remove_keyconfig(keyconfig)
return {'FINISHED'}
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py
index 225f7c5c5bb..ac9a6baee3a 100644
--- a/release/scripts/ui/space_view3d.py
+++ b/release/scripts/ui/space_view3d.py
@@ -854,6 +854,7 @@ class VIEW3D_MT_vertex_group(bpy.types.Menu):
# ********** Weight paint menu **********
+
class VIEW3D_MT_paint_weight(bpy.types.Menu):
bl_label = "Weights"
@@ -1012,7 +1013,7 @@ class VIEW3D_MT_pose(bpy.types.Menu):
layout.operator("pose.autoside_names", text="AutoName Top/Bottom").axis = 'ZAXIS'
layout.operator("pose.flip_names")
-
+
layout.operator("pose.quaternions_flip")
layout.separator()
@@ -1756,6 +1757,7 @@ class VIEW3D_PT_3dview_display(bpy.types.Panel):
row.enabled = region.lock_rotation and region.box_preview
row.prop(region, "box_clip")
+
class VIEW3D_PT_3dview_meshdisplay(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
@@ -1834,7 +1836,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
layout = self.layout
view = context.space_data
-
+
col = layout.column()
col.operator("view3d.add_background_image", text="Add Image")
@@ -1845,9 +1847,9 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
row.prop(bg, "show_expanded", text="", no_bg=True)
row.label(text=getattr(bg.image, "name", "Not Set"))
row.operator("view3d.remove_background_image", text="", icon='X').index = i
-
+
box.prop(bg, "view_axis", text="Axis")
-
+
if bg.show_expanded:
row = box.row()
row.template_ID(bg, "image", open="image.open")
@@ -1859,7 +1861,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
row = box.row(align=True)
row.prop(bg, "offset_x", text="X")
row.prop(bg, "offset_y", text="Y")
-
+
class VIEW3D_PT_transform_orientations(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py
index ece0bfd7947..c075be9f3b4 100644
--- a/release/scripts/ui/space_view3d_toolbar.py
+++ b/release/scripts/ui/space_view3d_toolbar.py
@@ -644,13 +644,14 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel):
settings = self.paint_settings(context)
brush = settings.brush
tex_slot = brush.texture_slot
-
+
col = layout.column()
-
+
col.template_ID_preview(brush, "texture", new="texture.new", rows=2, cols=4)
-
+
col.row().prop(tex_slot, "map_mode", expand=True)
-
+
+
class VIEW3D_PT_tools_brush_tool(PaintPanel):
bl_label = "Tool"
bl_default_closed = True
@@ -658,7 +659,7 @@ class VIEW3D_PT_tools_brush_tool(PaintPanel):
def poll(self, context):
settings = self.paint_settings(context)
return (settings and settings.brush and
- (context.sculpt_object or context.texture_paint_object or
+ (context.sculpt_object or context.texture_paint_object or
context.vertex_paint_object or context.weight_paint_object))
def draw(self, context):