added comment in header to know if a script has been converted or not.
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
+# <pep8-80 compliant>
+
# for slightly faster access
from bpy.__ops__ import add as op_add
from bpy.__ops__ import remove as op_remove
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return context.armature
+
class DATA_PT_context_arm(DataButtonsPanel):
bl_label = ""
bl_show_header = False
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_skeleton(DataButtonsPanel):
bl_label = "Skeleton"
col.itemR(arm, "deform_quaternion", text="Quaternion")
col.itemR(arm, "deform_bbone_rest", text="B-Bones Rest")
+
class DATA_PT_display(DataButtonsPanel):
bl_label = "Display"
flow.itemR(arm, "draw_group_colors", text="Colors")
flow.itemR(arm, "delay_deform", text="Delay Refresh")
+
class DATA_PT_bone_groups(DataButtonsPanel):
bl_label = "Bone Groups"
def poll(self, context):
- return (context.object and context.object.type=='ARMATURE' and context.object.pose)
+ return (context.object and context.object.type == 'ARMATURE' and context.object.pose)
def draw(self, context):
layout = self.layout
group = pose.active_bone_group
if group:
col = layout.column()
- col.active= (ob.proxy == None)
+ col.active = (ob.proxy == None)
col.itemR(group, "name")
split = layout.split(0.5)
- split.active= (ob.proxy == None)
+ split.active = (ob.proxy == None)
split.itemR(group, "color_set")
if group.color_set:
split.template_triColorSet(group, "colors")
#row.itemO("object.bone_group_select", text="Select")
#row.itemO("object.bone_group_deselect", text="Deselect")
+
class DATA_PT_paths(DataButtonsPanel):
bl_label = "Paths"
row.itemO("pose.paths_calculate", text="Calculate Paths")
row.itemO("pose.paths_clear", text="Clear Paths")
+
class DATA_PT_ghost(DataButtonsPanel):
bl_label = "Ghost"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class BoneButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return (context.bone or context.edit_bone)
+
class BONE_PT_context_bone(BoneButtonsPanel):
bl_label = ""
bl_show_header = False
row.itemL(text="", icon='ICON_BONE_DATA')
row.itemR(bone, "name", text="")
+
class BONE_PT_transform(BoneButtonsPanel):
bl_label = "Transform"
layout.itemR(pchan, "rotation_mode")
+
class BONE_PT_transform_locks(BoneButtonsPanel):
bl_label = "Transform Locks"
bl_default_closed = True
row.column().itemR(pchan, "lock_scale")
+
class BONE_PT_relations(BoneButtonsPanel):
bl_label = "Relations"
sub.itemR(bone, "hinge", text="Inherit Rotation")
sub.itemR(bone, "inherit_scale", text="Inherit Scale")
+
class BONE_PT_display(BoneButtonsPanel):
bl_label = "Display"
col.itemL(text="Custom Shape:")
col.itemR(pchan, "custom_shape", text="")
+
class BONE_PT_deform(BoneButtonsPanel):
bl_label = "Deform"
bl_default_closed = True
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return context.camera
+
class DATA_PT_context_camera(DataButtonsPanel):
bl_label = ""
bl_show_header = False
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_camera(DataButtonsPanel):
bl_label = "Lens"
row.itemR(cam, "dof_object", text="")
row.itemR(cam, "dof_distance", text="Distance")
+
class DATA_PT_camera_display(DataButtonsPanel):
bl_label = "Display"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return (context.object and context.object.type in ('CURVE', 'SURFACE') and context.curve)
+
class DataButtonsPanelCurve(DataButtonsPanel):
- '''
- Same as above but for curves only
- '''
+ '''Same as above but for curves only'''
+
def poll(self, context):
return (context.object and context.object.type == 'CURVE' and context.curve)
+
class DataButtonsPanelActive(DataButtonsPanel):
- '''
- Same as above but for curves only
- '''
+ '''Same as above but for curves only'''
+
def poll(self, context):
curve = context.curve
return (curve and curve.active_spline)
+
class DATA_PT_context_curve(DataButtonsPanel):
bl_label = ""
bl_show_header = False
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_shape_curve(DataButtonsPanel):
bl_label = "Shape"
if not is_surf:
sub = col.column()
- sub.active = (curve.dimensions=='2D')
+ sub.active = (curve.dimensions == '2D')
sub.itemL(text="Caps:")
row = sub.row()
row.itemR(curve, "front")
sub.itemR(curve, "render_resolution_v", text="Render V")
# XXX - put somewhere nicer.
- row= layout.row()
+ row = layout.row()
row.itemR(curve, "twist_mode")
row.itemR(curve, "twist_smooth") # XXX - may not be kept
# col.itemL(text="NORMALS")
# col.itemR(curve, "vertex_normal_flip")
+
class DATA_PT_geometry_curve(DataButtonsPanel):
bl_label = "Geometry"
col.itemL(text="Bevel Object:")
col.itemR(curve, "bevel_object", text="")
+
class DATA_PT_pathanim(DataButtonsPanelCurve):
bl_label = "Path Animation"
col.itemR(curve, "use_radius")
col.itemR(curve, "use_time_offset", text="Offset Children")
+
class DATA_PT_active_spline(DataButtonsPanelActive):
bl_label = "Active Spline"
if not is_surf:
split = layout.split()
col = split.column()
- col.active = (curve.dimensions=='3D')
+ col.active = (curve.dimensions == '3D')
col.itemL(text="Interpolation:")
col.itemR(act_spline, "tilt_interpolation", text="Tilt")
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return (context.object and context.object.type == 'EMPTY')
+
class DATA_PT_empty(DataButtonsPanel):
bl_label = "Empty"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return context.lamp
+
class DATA_PT_preview(DataButtonsPanel):
bl_label = "Preview"
def draw(self, context):
self.layout.template_preview(context.lamp)
+
class DATA_PT_context_lamp(DataButtonsPanel):
bl_label = ""
bl_show_header = False
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_lamp(DataButtonsPanel):
bl_label = "Lamp"
col.itemR(lamp, "specular")
col.itemR(lamp, "diffuse")
+
class DATA_PT_sunsky(DataButtonsPanel):
bl_label = "Sky & Atmosphere"
sub = col.column()
sub.itemR(lamp, "sun_brightness", text="Brightness")
sub.itemR(lamp, "sun_size", text="Size")
- sub.itemR(lamp, "backscattered_light", slider=True,text="Back Light")
+ sub.itemR(lamp, "backscattered_light", slider=True, text="Back Light")
layout.itemS()
col.itemL(text="Scattering:")
sub = col.column(align=True)
sub.itemR(lamp, "atmosphere_inscattering", slider=True, text="Inscattering")
- sub.itemR(lamp, "atmosphere_extinction", slider=True ,text="Extinction")
+ sub.itemR(lamp, "atmosphere_extinction", slider=True, text="Extinction")
+
class DATA_PT_shadow(DataButtonsPanel):
bl_label = "Shadow"
def poll(self, context):
lamp = context.lamp
- return (lamp and lamp.type in ('POINT','SUN', 'SPOT', 'AREA'))
+ return (lamp and lamp.type in ('POINT', 'SUN', 'SPOT', 'AREA'))
def draw(self, context):
layout = self.layout
sub.active = not lamp.auto_clip_end
sub.itemR(lamp, "shadow_buffer_clip_end", text=" Clip End")
+
class DATA_PT_area(DataButtonsPanel):
bl_label = "Area Shape"
sub.itemR(lamp, "size", text="Size X")
sub.itemR(lamp, "size_y", text="Size Y")
+
class DATA_PT_spot(DataButtonsPanel):
bl_label = "Spot Shape"
if lamp.shadow_method == 'BUFFER_SHADOW':
sub.itemR(lamp, "halo_step", text="Step")
+
class DATA_PT_falloff_curve(DataButtonsPanel):
bl_label = "Falloff Curve"
bl_default_closed = True
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return context.lattice
+
class DATA_PT_context_lattice(DataButtonsPanel):
bl_label = ""
bl_show_header = False
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_lattice(DataButtonsPanel):
bl_label = "Lattice"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return context.mesh
+
class DATA_PT_context_mesh(DataButtonsPanel):
bl_label = ""
bl_show_header = False
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_normals(DataButtonsPanel):
bl_label = "Normals"
col.itemR(mesh, "vertex_normal_flip")
col.itemR(mesh, "double_sided")
+
class DATA_PT_settings(DataButtonsPanel):
bl_label = "Settings"
col = split.column()
col.itemR(mesh, "texture_mesh")
+
class DATA_PT_vertex_groups(DataButtonsPanel):
bl_label = "Vertex Groups"
rows = 2
if group:
- rows= 5
+ rows = 5
row = layout.row()
row.template_list(ob, "vertex_groups", ob, "active_vertex_group_index", rows=rows)
layout.itemR(context.tool_settings, "vertex_group_weight", text="Weight")
+
class DATA_PT_shape_keys(DataButtonsPanel):
bl_label = "Shape Keys"
rows = 2
if kb:
- rows= 5
+ rows = 5
row.template_list(key, "keys", ob, "active_shape_key_index", rows=rows)
col = row.column()
sub.alignment = 'RIGHT'
subrow = sub.row(align=True)
- subrow.active= enable_edit_value
+ subrow.active = enable_edit_value
subrow.itemR(ob, "shape_key_lock", icon='ICON_UNPINNED', text="")
subrow.itemR(kb, "mute", icon='ICON_MUTE_IPO_OFF', text="")
subrow.itemO("object.shape_key_clear", icon='ICON_X', text="")
row.active = enable_edit_value
row.itemR(key, "slurph")
+
class DATA_PT_uv_texture(DataButtonsPanel):
bl_label = "UV Texture"
if lay:
layout.itemR(lay, "name")
+
class DATA_PT_vertex_colors(DataButtonsPanel):
bl_label = "Vertex Colors"
bpy.types.register(DATA_PT_shape_keys)
bpy.types.register(DATA_PT_uv_texture)
bpy.types.register(DATA_PT_vertex_colors)
-
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return context.meta_ball
+
class DATA_PT_context_metaball(DataButtonsPanel):
bl_label = ""
bl_show_header = False
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_metaball(DataButtonsPanel):
bl_label = "Metaball"
layout.itemL(text="Update:")
layout.itemR(mball, "flag", expand=True)
+
class DATA_PT_metaball_element(DataButtonsPanel):
bl_label = "Active Element"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "modifier"
+
class DATA_PT_modifiers(DataButtonsPanel):
bl_label = "Modifiers"
flow.itemR(md, "alive")
flow.itemR(md, "dead")
- layout.itemO("object.explode_refresh", text="Refresh");
+ layout.itemO("object.explode_refresh", text="Refresh")
def FLUID_SIMULATION(self, layout, ob, md):
layout.itemL(text="See Fluid panel.")
if md.path:
row = layout.row()
row.itemR(md, "position", slider=True)
- row.itemR(md, "random_position", text = "Random", slider=True)
+ row.itemR(md, "random_position", text="Random", slider=True)
def PARTICLE_SYSTEM(self, layout, ob, md):
layout.itemL(text="See Particle panel.")
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class DataButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return (context.object and context.object.type == 'TEXT' and context.curve)
+
class DATA_PT_context_text(DataButtonsPanel):
bl_label = ""
bl_show_header = False
split.template_ID(space, "pin_id")
split.itemS()
+
class DATA_PT_shape_text(DataButtonsPanel):
bl_label = "Shape Text"
col.itemL(text="Display:")
col.itemR(curve, "fast", text="Fast Editing")
+
class DATA_PT_geometry_text(DataButtonsPanel):
bl_label = "Geometry"
col.itemL(text="Bevel Object:")
col.itemR(curve, "bevel_object", text="")
+
class DATA_PT_font(DataButtonsPanel):
bl_label = "Font"
col.itemR(text, "ul_position", text="Position")
col.itemR(text, "ul_height", text="Thickness")
+
class DATA_PT_paragraph(DataButtonsPanel):
bl_label = "Paragraph"
col.itemR(text, "offset_x", text="X")
col.itemR(text, "offset_y", text="Y")
+
class DATA_PT_textboxes(DataButtonsPanel):
bl_label = "Text Boxes"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class PhysicsButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
rd = context.scene.render_data
return ob and ob.game and (rd.engine == 'BLENDER_GAME')
+
class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
bl_label = "Physics"
col.itemL(text="Cluster Collision:")
col.itemR(soft, "cluster_rigid_to_softbody")
col.itemR(soft, "cluster_soft_to_softbody")
- sub = col.column()
+ sub = col.column()
sub.active = (soft.cluster_rigid_to_softbody or soft.cluster_soft_to_softbody)
sub.itemR(soft, "cluster_iterations", text="Iterations")
elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
layout.itemR(ob, "restrict_render", text="Invisible")
+
class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
bl_label = "Collision Bounds"
bpy.types.register(PHYSICS_PT_game_physics)
bpy.types.register(PHYSICS_PT_game_collision_bounds)
+
class RenderButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
rd = context.scene.render_data
return (rd.engine == 'BLENDER_GAME')
+
class RENDER_PT_game(RenderButtonsPanel):
bl_label = "Game"
row.itemO("view3d.game_start", text="Start")
row.itemL()
+
class RENDER_PT_game_player(RenderButtonsPanel):
bl_label = "Standalone Player"
if gs.framing_type == 'LETTERBOX':
col.itemR(gs, "framing_color", text="")
+
class RENDER_PT_game_stereo(RenderButtonsPanel):
bl_label = "Stereo"
dome_type = gs.dome_mode
- split=layout.split()
+ split = layout.split()
if dome_type == 'FISHEYE' or \
dome_type == 'TRUNCATED_REAR' or \
dome_type == 'TRUNCATED_FRONT':
- col=split.column()
+ col = split.column()
col.itemR(gs, "dome_angle", slider=True)
col.itemR(gs, "dome_tilt")
- col=split.column()
+ col = split.column()
col.itemR(gs, "dome_tesselation", text="Tesselation")
col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True)
elif dome_type == 'PANORAM_SPH':
- col=split.column()
+ col = split.column()
col.itemR(gs, "dome_tesselation", text="Tesselation")
col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True)
else: # cube map
- col=split.column()
+ col = split.column()
col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True)
layout.itemR(gs, "dome_text")
+
class RENDER_PT_game_shading(RenderButtonsPanel):
bl_label = "Shading"
col.itemR(gs, "glsl_nodes", text="Nodes")
col.itemR(gs, "glsl_extra_textures", text="Extra Textures")
+
class RENDER_PT_game_performance(RenderButtonsPanel):
bl_label = "Performance"
col.itemR(gs, "all_frames")
col.itemR(gs, "display_lists")
+
class RENDER_PT_game_sound(RenderButtonsPanel):
bl_label = "Sound"
bpy.types.register(RENDER_PT_game_performance)
bpy.types.register(RENDER_PT_game_sound)
+
class WorldButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
rd = context.scene.render_data
return (rd.engine == 'BLENDER_GAME')
+
class WORLD_PT_game_context_world(WorldButtonsPanel):
bl_label = ""
bl_show_header = False
elif world:
split.template_ID(space, "pin_id")
+
class WORLD_PT_game_world(WorldButtonsPanel):
bl_label = "World"
row.itemR(world.mist, "start")
row.itemR(world.mist, "depth")
+
class WORLD_PT_game_physics(WorldButtonsPanel):
bl_label = "Physics"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
def active_node_mat(mat):
# TODO, 2.4x has a pipeline section, for 2.5 we need to communicate
# which settings from node-materials are used
return None
+
class MaterialButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
engine = context.scene.render_data.engine
return mat and (engine in self.COMPAT_ENGINES)
+
class MATERIAL_PT_preview(MaterialButtonsPanel):
bl_label = "Preview"
COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
def draw(self, context):
self.layout.template_preview(context.material)
+
class MATERIAL_PT_context_material(MaterialButtonsPanel):
bl_label = ""
bl_show_header = False
if mat:
layout.itemR(mat, "type", expand=True)
+
class MATERIAL_PT_shading(MaterialButtonsPanel):
bl_label = "Shading"
COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
elif mat.type == 'HALO':
layout.itemR(mat, "alpha")
+
class MATERIAL_PT_strand(MaterialButtonsPanel):
bl_label = "Strand"
bl_default_closed = True
col.itemL(text="Shading:")
col.itemR(tan, "width_fade")
ob = context.object
- if ob and ob.type == 'MESH': col.item_pointerR(tan, "uv_layer", ob.data, "uv_textures", text="")
- else: col.itemR(tan, "uv_layer", text="")
+ if ob and ob.type == 'MESH':
+ col.item_pointerR(tan, "uv_layer", ob.data, "uv_textures", text="")
+ else:
+ col.itemR(tan, "uv_layer", text="")
col.itemS()
sub = col.column()
sub.active = (not mat.shadeless)
sub.active = tan.surface_diffuse
sub.itemR(tan, "blend_distance", text="Distance")
+
class MATERIAL_PT_physics(MaterialButtonsPanel):
bl_label = "Physics"
COMPAT_ENGINES = set(['BLENDER_GAME'])
col.itemR(phys, "elasticity", slider=True)
col.itemR(phys, "damp", slider=True)
+
class MATERIAL_PT_options(MaterialButtonsPanel):
bl_label = "Options"
COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
col.itemR(mat, "vertex_color_light")
col.itemR(mat, "object_color")
+
class MATERIAL_PT_shadow(MaterialButtonsPanel):
bl_label = "Shadow"
bl_default_closed = True
sub.active = (not mat.ray_shadow_bias)
sub.itemR(mat, "shadow_ray_bias", text="Ray Bias")
+
class MATERIAL_PT_diffuse(MaterialButtonsPanel):
bl_label = "Diffuse"
COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
row = layout.row()
row.itemR(mat, "diffuse_ramp_factor", text="Factor")
+
class MATERIAL_PT_specular(MaterialButtonsPanel):
bl_label = "Specular"
COMPAT_ENGINES = set(['BLENDER_RENDER', 'BLENDER_GAME'])
row = layout.row()
row.itemR(mat, "specular_ramp_factor", text="Factor")
+
class MATERIAL_PT_sss(MaterialButtonsPanel):
bl_label = "Subsurface Scattering"
bl_default_closed = True
col.itemS()
col.itemR(sss, "error_tolerance", text="Error")
+
class MATERIAL_PT_mirror(MaterialButtonsPanel):
bl_label = "Mirror"
bl_default_closed = True
sub.itemR(raym, "gloss_samples", text="Samples")
sub.itemR(raym, "gloss_anisotropic", text="Anisotropic")
+
class MATERIAL_PT_transp(MaterialButtonsPanel):
- bl_label= "Transparency"
+ bl_label = "Transparency"
bl_default_closed = True
COMPAT_ENGINES = set(['BLENDER_RENDER'])
sub.itemR(rayt, "gloss_threshold", text="Threshold")
sub.itemR(rayt, "gloss_samples", text="Samples")
+
class MATERIAL_PT_halo(MaterialButtonsPanel):
- bl_label= "Halo"
+ bl_label = "Halo"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def poll(self, context):
sub.active = halo.star
sub.itemR(halo, "star_tips")
+
class MATERIAL_PT_flare(MaterialButtonsPanel):
- bl_label= "Flare"
+ bl_label = "Flare"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def poll(self, context):
bpy.types.register(MATERIAL_PT_options)
bpy.types.register(MATERIAL_PT_shadow)
-# Volumetrics
+
class VolumeButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
engine = context.scene.render_data.engine
return mat and (mat.type == 'VOLUME') and (engine in self.COMPAT_ENGINES)
+
class MATERIAL_PT_volume_density(VolumeButtonsPanel):
bl_label = "Density"
bl_default_closed = False
row.itemR(vol, "density")
row.itemR(vol, "density_scale")
+
class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
bl_label = "Shading"
bl_default_closed = False
sub.itemR(vol, "reflection")
sub.itemR(vol, "reflection_color", text="")
+
class MATERIAL_PT_volume_lighting(VolumeButtonsPanel):
bl_label = "Lighting"
bl_default_closed = False
sub.itemR(vol, "ms_spread")
sub.itemR(vol, "ms_intensity")
+
class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
- bl_label= "Transparency"
+ bl_label = "Transparency"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def draw(self, context):
layout.itemR(mat, "transparency_method", expand=True)
+
class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
bl_label = "Integration"
bl_default_closed = False
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class ObjectButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "object"
+
class OBJECT_PT_context_object(ObjectButtonsPanel):
bl_label = ""
bl_show_header = False
row.itemL(text="", icon='ICON_OBJECT_DATA')
row.itemR(ob, "name", text="")
+
class OBJECT_PT_transform(ObjectButtonsPanel):
bl_label = "Transform"
layout.itemR(ob, "rotation_mode")
+
class OBJECT_PT_transform_locks(ObjectButtonsPanel):
bl_label = "Transform Locks"
bl_default_closed = True
row.column().itemR(ob, "lock_scale")
+
class OBJECT_PT_relations(ObjectButtonsPanel):
bl_label = "Relations"
sub.item_pointerR(ob, "parent_bone", parent.data, "bones", text="")
sub.active = parent != None
+
class OBJECT_PT_groups(ObjectButtonsPanel):
bl_label = "Groups"
split.column().itemR(group, "layer", text="Dupli")
split.column().itemR(group, "dupli_offset", text="")
+
class OBJECT_PT_display(ObjectButtonsPanel):
bl_label = "Display"
flow.itemR(ob, "x_ray", text="X-Ray")
flow.itemR(ob, "draw_transparent", text="Transparency")
+
class OBJECT_PT_duplication(ObjectButtonsPanel):
bl_label = "Duplication"
elif ob.dupli_type == 'GROUP':
layout.itemR(ob, "dupli_group", text="Group")
+
class OBJECT_PT_animation(ObjectButtonsPanel):
bl_label = "Animation"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class ConstraintButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def IK(self, context, layout, con):
if context.object.pose.ik_solver == "ITASC":
layout.itemR(con, "ik_type")
- getattr(self, "IK_"+con.ik_type)(context, layout, con)
+ getattr(self, "IK_" + con.ik_type)(context, layout, con)
else:
# Legacy IK constraint
self.target_template(layout, con)
def LIMIT_DISTANCE(self, context, layout, con):
self.target_template(layout, con)
- col = layout.column(align=True);
+ col = layout.column(align=True)
col.itemR(con, "distance")
col.itemO("constraint.limitdistance_reset")
self.space_template(layout, con)
- def SHRINKWRAP (self, context, layout, con):
+ def SHRINKWRAP(self, context, layout, con):
self.target_template(layout, con)
layout.itemR(con, "distance")
row.itemL(text="To:")
row.itemR(con, "track", expand=True)
+
class OBJECT_PT_constraints(ConstraintButtonsPanel):
bl_label = "Constraints"
bl_context = "constraint"
row = layout.row()
row.item_menu_enumO("object.constraint_add", "type")
- row.itemL();
+ row.itemL()
for con in ob.constraints:
self.draw_constraint(context, con)
+
class BONE_PT_inverse_kinematics(ConstraintButtonsPanel):
bl_label = "Inverse Kinematics"
bl_default_closed = True
#row.itemR(pchan, "ik_lin_control", text="Joint Size")
#row.itemR(pchan, "ik_lin_weight", text="Weight", slider=True)
+
class BONE_PT_iksolver_itasc(ConstraintButtonsPanel):
bl_label = "iTaSC parameters"
bl_default_closed = True
row.itemR(itasc, "dampmax", text="Damp", slider=True)
row.itemR(itasc, "dampeps", text="Eps", slider=True)
+
class BONE_PT_constraints(ConstraintButtonsPanel):
bl_label = "Constraints"
bl_context = "bone_constraint"
row = layout.row()
row.item_menu_enumO("pose.constraint_add", "type")
- row.itemL();
+ row.itemL()
for con in pchan.constraints:
self.draw_constraint(context, con)
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
from properties_physics_common import point_cache_ui
from properties_physics_common import basic_force_field_settings_ui
from properties_physics_common import basic_force_field_falloff_ui
+
def particle_panel_enabled(context, psys):
- return psys.point_cache.baked==False and psys.edited==False and (not context.particle_system_editable)
+ return psys.point_cache.baked == False and psys.edited == False and (not context.particle_system_editable)
+
def particle_panel_poll(context):
psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
+ if psys == None:
+ return False
+ if psys.settings == None:
+ return False
return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR')
+
class ParticleButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return particle_panel_poll(context)
+
class PARTICLE_PT_particles(ParticleButtonsPanel):
bl_label = ""
bl_show_header = False
layout.itemL(text="No settings for fluid particles")
return
- row=col.row()
+ row = col.row()
row.enabled = particle_panel_enabled(context, psys)
row.itemR(part, "type", text="")
row.itemR(psys, "seed")
split = layout.split(percentage=0.65)
- if part.type=='HAIR':
- if psys.edited==True:
+ if part.type == 'HAIR':
+ if psys.edited == True:
split.itemO("particle.edited_clear", text="Free Edit")
else:
split.itemL(text="")
row = split.row()
row.enabled = particle_panel_enabled(context, psys)
row.itemR(part, "hair_step")
- if psys.edited==True:
+ if psys.edited == True:
if psys.global_hair:
layout.itemO("particle.connect_hair")
layout.itemL(text="Hair is disconnected.")
else:
layout.itemO("particle.disconnect_hair")
layout.itemL(text="")
- elif part.type=='REACTOR':
+ elif part.type == 'REACTOR':
split.enabled = particle_panel_enabled(context, psys)
split.itemR(psys, "reactor_target_object")
split.itemR(psys, "reactor_target_particle_system", text="Particle System")
+
class PARTICLE_PT_emission(ParticleButtonsPanel):
bl_label = "Emission"
row.itemR(part, "emit_from", expand=True)
row = layout.row()
row.itemR(part, "trand")
- if part.distribution!='GRID':
+ if part.distribution != 'GRID':
row.itemR(part, "even_distribution")
- if part.emit_from=='FACE' or part.emit_from=='VOLUME':
+ if part.emit_from == 'FACE' or part.emit_from == 'VOLUME':
row = layout.row()
row.itemR(part, "distribution", expand=True)
row = layout.row()
- if part.distribution=='JIT':
+ if part.distribution == 'JIT':
row.itemR(part, "userjit", text="Particles/Face")
row.itemR(part, "jitter_factor", text="Jittering Amount", slider=True)
- elif part.distribution=='GRID':
+ elif part.distribution == 'GRID':
row.itemR(part, "grid_resolution")
+
class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
bl_label = "Hair dynamics"
bl_default_closed = True
def poll(self, context):
psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
+ if psys == None:
+ return False
+ if psys.settings == None:
+ return False
return psys.settings.type == 'HAIR'
def draw_header(self, context):
sub.itemR(cloth, "air_damping", text="Air")
col.itemL(text="Quality:")
- col.itemR(cloth, "quality", text="Steps",slider=True)
+ col.itemR(cloth, "quality", text="Steps", slider=True)
+
class PARTICLE_PT_cache(ParticleButtonsPanel):
bl_label = "Cache"
def poll(self, context):
psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
+ if psys == None:
+ return False
+ if psys.settings == None:
+ return False
phystype = psys.settings.physics_type
if phystype == 'NO' or phystype == 'KEYED':
return False
point_cache_ui(self, psys.point_cache, particle_panel_enabled(context, psys), not psys.hair_dynamics, 0)
+
class PARTICLE_PT_velocity(ParticleButtonsPanel):
bl_label = "Velocity"
layout.row().itemL(text="Other:")
split = layout.split()
sub = split.column()
- if part.emit_from=='PARTICLE':
+ if part.emit_from == 'PARTICLE':
sub.itemR(part, "particle_factor")
else:
sub.itemR(part, "object_factor", slider=True)
# sub.itemR(part, "reactor_factor")
# sub.itemR(part, "reaction_shape", slider=True)
+
class PARTICLE_PT_rotation(ParticleButtonsPanel):
bl_label = "Rotation"
sub.itemR(part, "angular_velocity_factor", text="")
+
class PARTICLE_PT_physics(ParticleButtonsPanel):
bl_label = "Physics"
row.itemR(psys, "keyed_timing", text="Use Timing")
layout.itemL(text="Keys:")
- elif part.physics_type=='BOIDS':
+ elif part.physics_type == 'BOIDS':
boids = part.boids
col.itemR(boids, "banking", slider=True)
col.itemR(boids, "height", slider=True)
- if part.physics_type=='KEYED' or part.physics_type=='BOIDS':
- if part.physics_type=='BOIDS':
+ if part.physics_type == 'KEYED' or part.physics_type == 'BOIDS':
+ if part.physics_type == 'BOIDS':
layout.itemL(text="Relations:")
row = layout.row()
key = psys.active_particle_target
if key:
row = layout.row()
- if part.physics_type=='KEYED':
+ if part.physics_type == 'KEYED':
col = row.column()
#doesn't work yet
#col.red_alert = key.valid
col.itemR(key, "object", text="")
col.itemR(key, "system", text="System")
- col = row.column();
+ col = row.column()
col.active = psys.keyed_timing
col.itemR(key, "time")
col.itemR(key, "duration")
layout.itemR(key, "mode", expand=True)
+
class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
bl_label = "Boid Brain"
def poll(self, context):
psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
- if psys.point_cache.external: return False
- return psys.settings.physics_type=='BOIDS'
+ if psys == None:
+ return False
+ if psys.settings == None:
+ return False
+ if psys.point_cache.external:
+ return False
+ return psys.settings.physics_type == 'BOIDS'
def draw(self, context):
layout = self.layout
row = layout.row()
row.itemR(state, "ruleset_type")
- if state.ruleset_type=='FUZZY':
+ if state.ruleset_type == 'FUZZY':
row.itemR(state, "rule_fuzziness", slider=True)
else:
row.itemL(text="")
row.itemR(rule, "distance")
row.itemR(rule, "flee_distance")
+
class PARTICLE_PT_render(ParticleButtonsPanel):
bl_label = "Render"
def poll(self, context):
psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
- return True;
+ if psys == None:
+ return False
+ if psys.settings == None:
+ return False
+ return True
def draw(self, context):
layout = self.layout
row = layout.row()
row.itemR(part, "material")
- row.itemR(psys, "parent");
+ row.itemR(psys, "parent")
split = layout.split()
sub = split.column()
- sub.itemR(part, "emitter");
- sub.itemR(part, "parent");
+ sub.itemR(part, "emitter")
+ sub.itemR(part, "parent")
sub = split.column()
- sub.itemR(part, "unborn");
- sub.itemR(part, "died");
+ sub.itemR(part, "unborn")
+ sub.itemR(part, "died")
row = layout.row()
row.itemR(part, "ren_as", expand=True)
sub.itemR(part, "velocity_length")
elif part.ren_as == 'PATH':
- if (part.type!='HAIR' and part.physics_type!='KEYED' and psys.point_cache.baked==False):
+ if part.type != 'HAIR' and part.physics_type != 'KEYED' and psys.point_cache.baked == False:
box = layout.box()
box.itemL(text="Baked or keyed particles needed for correct rendering.")
return
sub.itemL(text="Timing:")
sub.itemR(part, "abs_path_time")
- sub.itemR(part, "path_start", text="Start", slider= not part.abs_path_time)
- sub.itemR(part, "path_end", text="End", slider= not part.abs_path_time)
+ sub.itemR(part, "path_start", text="Start", slider=not part.abs_path_time)
+ sub.itemR(part, "path_end", text="End", slider=not part.abs_path_time)
sub.itemR(part, "random_length", text="Random", slider=True)
row = layout.row()
col = row.column()
- if part.type=='HAIR' and part.render_strand==True and part.child_type=='FACES':
+ if part.type == 'HAIR' and part.render_strand == True and part.child_type == 'FACES':
layout.itemR(part, "enable_simplify")
- if part.enable_simplify==True:
+ if part.enable_simplify == True:
row = layout.row()
row.itemR(part, "simplify_refsize")
row.itemR(part, "simplify_rate")
row = layout.row()
row.itemR(part, "viewport")
subrow = row.row()
- subrow.active = part.viewport==True
+ subrow.active = part.viewport == True
subrow.itemR(part, "simplify_viewport")
elif part.ren_as == 'OBJECT':
row.itemR(part, "billboard_animation", expand=True)
row.itemL(text="Offset:")
row.itemR(part, "billboard_split_offset", expand=True)
- if part.ren_as == 'HALO' or part.ren_as == 'LINE' or part.ren_as=='BILLBOARD':
+
+ if part.ren_as == 'HALO' or part.ren_as == 'LINE' or part.ren_as == 'BILLBOARD':
row = layout.row()
col = row.column()
col.itemR(part, "trail_count")
col = row.column()
col.itemL(text="")
+
class PARTICLE_PT_draw(ParticleButtonsPanel):
bl_label = "Display"
bl_default_closed = True
def poll(self, context):
psys = context.particle_system
- if psys==None: return False
- if psys.settings==None: return False
- return True;
+ if psys == None:
+ return False
+ if psys.settings == None:
+ return False
+ return True
def draw(self, context):
layout = self.layout
row = layout.row()
row.itemR(part, "draw_as", expand=True)
- if part.draw_as=='NONE' or (part.ren_as=='NONE' and part.draw_as=='RENDER'):
+ if part.draw_as == 'NONE' or (part.ren_as == 'NONE' and part.draw_as == 'RENDER'):
return
- path = (part.ren_as=='PATH' and part.draw_as=='RENDER') or part.draw_as=='PATH'
+ path = (part.ren_as == 'PATH' and part.draw_as == 'RENDER') or part.draw_as == 'PATH'
- if path and part.type!='HAIR' and part.physics_type!='KEYED' and psys.point_cache.baked==False:
+ if path and part.type != 'HAIR' and part.physics_type != 'KEYED' and psys.point_cache.baked == False:
box = layout.box()
box.itemL(text="Baked or keyed particles needed for correct drawing.")
return
row = layout.row()
row.itemR(part, "display", slider=True)
- if part.draw_as!='RENDER' or part.ren_as=='HALO':
+ if part.draw_as != 'RENDER' or part.ren_as == 'HALO':
row.itemR(part, "draw_size")
else:
row.itemL(text="")
col.itemR(part, "draw_step")
else:
subcol = col.column()
- subcol.active = part.material_color==False
+ subcol.active = part.material_color == False
#subcol.itemL(text="color")
#subcol.itemL(text="Override material color")
+
class PARTICLE_PT_children(ParticleButtonsPanel):
bl_label = "Children"
bl_default_closed = True
layout.row().itemR(part, "child_type", expand=True)
- if part.child_type=='NONE':
+ if part.child_type == 'NONE':
return
row = layout.row()
col = row.column(align=True)
- if part.child_type=='FACES':
+ if part.child_type == 'FACES':
col.itemR(part, "virtual_parents", slider=True)
else:
col.itemR(part, "child_radius", text="Radius")
sub = split.column()
sub.itemR(part, "kink_shape", slider=True)
+
class PARTICLE_PT_field_weights(ParticleButtonsPanel):
bl_label = "Field Weights"
bl_default_closed = True
if part.type == 'HAIR':
self.layout.itemR(part.effector_weights, "do_growing_hair")
+
class PARTICLE_PT_force_fields(ParticleButtonsPanel):
bl_label = "Force Field Settings"
bl_default_closed = True
split = layout.split(percentage=0.2)
split.itemL(text="Type 1:")
- split.itemR(part.force_field_1, "type",text="")
+ split.itemR(part.force_field_1, "type", text="")
basic_force_field_settings_ui(self, part.force_field_1)
basic_force_field_falloff_ui(self, part.force_field_1)
split = layout.split(percentage=0.2)
split.itemL(text="Type 2:")
- split.itemR(part.force_field_2, "type",text="")
+ split.itemR(part.force_field_2, "type", text="")
basic_force_field_settings_ui(self, part.force_field_2)
basic_force_field_falloff_ui(self, part.force_field_2)
+
class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
bl_label = "Vertexgroups"
bl_default_closed = True
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
from properties_physics_common import point_cache_ui
from properties_physics_common import effector_weights_ui
+
def cloth_panel_enabled(md):
- return md.point_cache.baked==False
+ return md.point_cache.baked == False
+
class PhysicButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
rd = context.scene.render_data
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
+
class PHYSICS_PT_cloth(PhysicButtonsPanel):
bl_label = "Cloth"
col = split.column()
col.itemL(text="Quality:")
- col.itemR(cloth, "quality", text="Steps",slider=True)
+ col.itemR(cloth, "quality", text="Steps", slider=True)
col.itemL(text="Material:")
sub = col.column(align=True)
col.itemR(cloth, "goal_friction", text="Friction")
"""
+
class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
bl_label = "Cloth Cache"
bl_default_closed = True
md = context.cloth
point_cache_ui(self, md.point_cache, cloth_panel_enabled(md), 0, 0)
+
class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
bl_label = "Cloth Collision"
bl_default_closed = True
sub.itemR(cloth, "self_collision_quality", slider=True, text="Quality")
sub.itemR(cloth, "self_min_distance", slider=True, text="Distance")
+
class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
bl_label = "Cloth Stiffness Scaling"
bl_default_closed = True
sub.itemR(cloth, "bending_stiffness_max", text="Max")
sub.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="")
+
class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel):
bl_label = "Cloth Field Weights"
bl_default_closed = True
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
+# <pep8 compliant>
import bpy
+
def point_cache_ui(self, cache, enabled, particles, smoke):
layout = self.layout
layout.set_context_pointer("PointCache", cache)
row = layout.row()
- row.template_list(cache, "point_cache_list", cache, "active_point_cache_index", rows=2 )
+ row.template_list(cache, "point_cache_list", cache, "active_point_cache_index", rows=2)
col = row.column(align=True)
col.itemO("ptcache.add_new", icon='ICON_ZOOMIN', text="")
col.itemO("ptcache.remove", icon='ICON_ZOOMOUT', text="")
row.enabled = enabled
row.itemO("ptcache.bake_from_cache", text="Current Cache to Bake")
if not smoke:
- row.itemR(cache, "step");
+ row.itemR(cache, "step")
if not smoke:
row = layout.row()
row.itemO("ptcache.free_bake_all", text="Free All Bakes")
layout.itemO("ptcache.bake_all", "bake", False, text="Update All Dynamics to current frame")
+
def effector_weights_ui(self, weights):
layout = self.layout
flow.itemR(weights, "drag", slider=True)
flow.itemR(weights, "boid", slider=True)
+
def basic_force_field_settings_ui(self, field):
layout = self.layout
split = layout.split()
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
from properties_physics_common import basic_force_field_settings_ui
from properties_physics_common import basic_force_field_falloff_ui
+
class PhysicButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
rd = context.scene.render_data
return (context.object) and (not rd.use_game_engine)
+
class PHYSICS_PT_field(PhysicButtonsPanel):
bl_label = "Force Fields"
split = layout.split(percentage=0.2)
split.itemL(text="Type:")
- split.itemR(field, "type",text="")
+ split.itemR(field, "type", text="")
if field.type not in ('NONE', 'GUIDE', 'TEXTURE'):
split = layout.split(percentage=0.2)
col.itemR(field, "use_coordinates")
col.itemR(field, "root_coordinates")
col.itemR(field, "force_2d")
-
- else :
+ else:
basic_force_field_settings_ui(self, field)
if field.type not in ('NONE', 'GUIDE'):
sub.active = field.use_radial_max
sub.itemR(field, "radial_maximum", text="Distance")
+
class PHYSICS_PT_collision(PhysicButtonsPanel):
bl_label = "Collision"
#bl_default_closed = True
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class PhysicButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
rd = context.scene.render_data
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
+
class PHYSICS_PT_fluid(PhysicButtonsPanel):
bl_label = "Fluid"
sub.itemR(fluid, "velocity_strength", text="Strength")
sub.itemR(fluid, "velocity_radius", text="Radius")
+
class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
bl_label = "Domain World"
bl_default_closed = True
sub.itemR(fluid, "grid_levels", slider=True)
sub.itemR(fluid, "compressibility", slider=True)
+
class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
bl_label = "Domain Boundary"
bl_default_closed = True
sub.itemR(fluid, "surface_smoothing", text="Smoothing")
sub.itemR(fluid, "surface_subdivisions", text="Subdivisions")
+
class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
bl_label = "Domain Particles"
bl_default_closed = True
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
from properties_physics_common import point_cache_ui
from properties_physics_common import effector_weights_ui
+
class PhysicButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
rd = context.scene.render_data
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
+
class PHYSICS_PT_smoke(PhysicButtonsPanel):
bl_label = "Smoke"
#elif md.smoke_type == 'TYPE_COLL':
# layout.itemS()
+
class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
bl_label = "Smoke Groups"
bl_default_closed = True
col.itemL(text="Collision Group:")
col.itemR(group, "coll_group", text="")
+
class PHYSICS_PT_smoke_cache(PhysicButtonsPanel):
bl_label = "Smoke Cache"
bl_default_closed = True
md = context.smoke.domain_settings
cache = md.point_cache_low
- point_cache_ui(self, cache, cache.baked==False, 0, 1)
+ point_cache_ui(self, cache, cache.baked == False, 0, 1)
+
class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
bl_label = "Smoke High Resolution"
col.itemR(md, "strength")
col.itemR(md, "viewhighres")
+
class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel):
bl_label = "Smoke High Resolution Cache"
bl_default_closed = True
md = context.smoke.domain_settings
cache = md.point_cache_high
- point_cache_ui(self, cache, cache.baked==False, 0, 1)
+ point_cache_ui(self, cache, cache.baked == False, 0, 1)
+
class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel):
bl_label = "Smoke Field Weights"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
from properties_physics_common import point_cache_ui
from properties_physics_common import effector_weights_ui
+
def softbody_panel_enabled(md):
- return md.point_cache.baked==False
+ return md.point_cache.baked == False
+
class PhysicButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
rd = context.scene.render_data
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
+
class PHYSICS_PT_softbody(PhysicButtonsPanel):
bl_label = "Soft Body"
col.itemL(text="Simulation:")
col.itemR(softbody, "speed")
+
class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
bl_label = "Soft Body Cache"
bl_default_closed = True
md = context.soft_body
point_cache_ui(self, md.point_cache, softbody_panel_enabled(md), 0, 0)
+
class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
bl_label = "Soft Body Goal"
bl_default_closed = True
layout.item_pointerR(softbody, "goal_vertex_group", ob, "vertex_groups", text="Vertex Group")
+
class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
bl_label = "Soft Body Edges"
bl_default_closed = True
col.itemR(softbody, "edge_collision", text="Edge")
col.itemR(softbody, "face_collision", text="Face")
+
class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
bl_label = "Soft Body Collision"
bl_default_closed = True
col.itemR(softbody, "ball_stiff", text="Stiffness")
col.itemR(softbody, "ball_damp", text="Dampening")
+
class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
bl_label = "Soft Body Solver"
bl_default_closed = True
layout.itemL(text="Diagnostics:")
layout.itemR(softbody, "diagnose")
+
class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel):
bl_label = "Soft Body Field Weights"
bl_default_closed = True
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class RenderButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
rd = context.scene.render_data
- return (context.scene and rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
+ return (context.scene and rd.use_game_engine == False) and (rd.engine in self.COMPAT_ENGINES)
+
class RENDER_PT_render(RenderButtonsPanel):
bl_label = "Render"
layout.itemR(rd, "display_mode", text="Display")
+
class RENDER_PT_layers(RenderButtonsPanel):
bl_label = "Layers"
bl_default_closed = True
row.itemR(rl, "pass_refraction")
row.itemR(rl, "pass_refraction_exclude", text="", icon='ICON_X')
+
class RENDER_PT_shading(RenderButtonsPanel):
bl_label = "Shading"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
col.itemR(rd, "color_management")
col.itemR(rd, "alpha_mode", text="Alpha")
+
class RENDER_PT_performance(RenderButtonsPanel):
bl_label = "Performance"
bl_default_closed = True
sub.itemR(rd, "use_instances", text="Instances")
sub.itemR(rd, "use_local_coords", text="Local Coordinates")
+
class RENDER_PT_post_processing(RenderButtonsPanel):
bl_label = "Post Processing"
bl_default_closed = True
sub.itemR(rd, "edge_threshold", text="Threshold", slider=True)
sub.itemR(rd, "edge_color", text="")
+
class RENDER_PT_output(RenderButtonsPanel):
bl_label = "Output"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
split = layout.split()
split.itemR(rd, "tiff_bit")
+
class RENDER_PT_encoding(RenderButtonsPanel):
bl_label = "Encoding"
bl_default_closed = True
col.itemR(rd, "ffmpeg_multiplex_audio")
col.itemR(rd, "ffmpeg_audio_volume")
+
class RENDER_PT_antialiasing(RenderButtonsPanel):
bl_label = "Anti-Aliasing"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
col.itemR(rd, "pixel_filter", text="")
col.itemR(rd, "filter_size", text="Size", slider=True)
+
class RENDER_PT_dimensions(RenderButtonsPanel):
bl_label = "Dimensions"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
col.itemL(text="Frame Rate:")
col.itemR(rd, "fps")
- col.itemR(rd, "fps_base",text="/")
+ col.itemR(rd, "fps_base", text="/")
+
class RENDER_PT_stamp(RenderButtonsPanel):
bl_label = "Stamp"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class SceneButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
def poll(self, context):
return context.scene
+
class SCENE_PT_scene(SceneButtonsPanel):
bl_label = "Scene"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
layout.itemR(scene, "camera")
layout.itemR(scene, "set", text="Background")
+
class SCENE_PT_unit(SceneButtonsPanel):
bl_label = "Units"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
row.itemR(unit, "scale_length", text="Scale")
row.itemR(unit, "use_separate")
+
class SCENE_PT_keying_sets(SceneButtonsPanel):
bl_label = "Keying Sets"
col.itemR(ks, "insertkey_needed", text="Needed")
col.itemR(ks, "insertkey_visual", text="Visual")
+
class SCENE_PT_keying_set_paths(SceneButtonsPanel):
bl_label = "Active Keying Set"
if ksp.grouping == 'NAMED':
col.itemR(ksp, "group")
+
class SCENE_PT_physics(SceneButtonsPanel):
bl_label = "Gravity"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
+# <pep8 compliant>
import bpy
+
def active_node_mat(mat):
if mat:
mat_node = mat.active_node_material
return None
+
def context_tex_datablock(context):
idblock = active_node_mat(context.material)
- if idblock: return idblock
+ if idblock:
+ return idblock
- idblock = context.lamp
- if idblock: return idblock
+ idblock = context.lamp
+ if idblock:
+ return idblock
- idblock = context.world
- if idblock: return idblock
+ idblock = context.world
+ if idblock:
+ return idblock
- idblock = context.brush
+ idblock = context.brush
return idblock
+
class TextureButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
tex = context.texture
return (tex and (tex.type != 'NONE' or tex.use_nodes))
+
class TEXTURE_PT_preview(TextureButtonsPanel):
bl_label = "Preview"
else:
layout.template_preview(tex, slot=slot)
+
class TEXTURE_PT_context_texture(TextureButtonsPanel):
bl_label = ""
bl_show_header = False
context.sculpt_object or
context.vertex_paint_object or
context.weight_paint_object or
- context.texture_paint_object
- ):
+ context.texture_paint_object):
+
split.itemR(space, "brush_texture", text="Brush", toggle=True)
if tex:
split.itemL(text="Type:")
split.itemR(tex, "type", text="")
+
class TEXTURE_PT_colors(TextureButtonsPanel):
bl_label = "Colors"
bl_default_closed = True
# Texture Slot Panels #
+
class TextureSlotPanel(TextureButtonsPanel):
+
def poll(self, context):
- return (
- context.texture_slot and
- TextureButtonsPanel.poll(self, context)
- )
+ return (context.texture_slot and
+ TextureButtonsPanel.poll(self, context))
+
class TEXTURE_PT_mapping(TextureSlotPanel):
bl_label = "Mapping"
split = layout.split(percentage=0.3)
split.itemL(text="Layer:")
ob = context.object
- if ob and ob.type == 'MESH': split.item_pointerR(tex, "uv_layer", ob.data, "uv_textures", text="")
- else: split.itemR(tex, "uv_layer", text="")
+ if ob and ob.type == 'MESH':
+ split.item_pointerR(tex, "uv_layer", ob.data, "uv_textures", text="")
+ else:
+ split.itemR(tex, "uv_layer", text="")
+
elif tex.texture_coordinates == 'OBJECT':
split = layout.split(percentage=0.3)
split.itemL(text="Object:")
class TEXTURE_PT_influence(TextureSlotPanel):
bl_label = "Influence"
+
def poll(self, context):
return context.texture_slot
-
def draw(self, context):
layout = self.layout
# Texture Type Panels #
+
class TextureTypePanel(TextureButtonsPanel):
+
def poll(self, context):
tex = context.texture
return (tex and tex.type == self.tex_type and not tex.use_nodes)
+
class TEXTURE_PT_clouds(TextureTypePanel):
bl_label = "Clouds"
tex_type = 'CLOUDS'
flow.itemR(tex, "noise_depth", text="Depth")
flow.itemR(tex, "nabla", text="Nabla")
+
class TEXTURE_PT_wood(TextureTypePanel):
bl_label = "Wood"
tex_type = 'WOOD'
flow.itemR(tex, "turbulence")
flow.itemR(tex, "nabla")
+
class TEXTURE_PT_marble(TextureTypePanel):
bl_label = "Marble"
tex_type = 'MARBLE'
flow.itemR(tex, "turbulence")
flow.itemR(tex, "nabla")
+
class TEXTURE_PT_magic(TextureTypePanel):
bl_label = "Magic"
tex_type = 'MAGIC'
row.itemR(tex, "noise_depth", text="Depth")
row.itemR(tex, "turbulence")
+
class TEXTURE_PT_blend(TextureTypePanel):
bl_label = "Blend"
tex_type = 'BLEND'
sub.active = (tex.progression in ('LINEAR', 'QUADRATIC', 'EASING', 'RADIAL'))
sub.itemR(tex, "flip_axis", expand=True)
+
class TEXTURE_PT_stucci(TextureTypePanel):
bl_label = "Stucci"
tex_type = 'STUCCI'
row.itemR(tex, "noise_size", text="Size")
row.itemR(tex, "turbulence")
+
class TEXTURE_PT_image(TextureTypePanel):
bl_label = "Image"
tex_type = 'IMAGE'
layout.template_image(tex, "image", tex.image_user)
+
class TEXTURE_PT_image_sampling(TextureTypePanel):
bl_label = "Image Sampling"
bl_default_closed = True
else:
col.itemR(tex, "filter_eccentricity", text="Eccentricity")
+
class TEXTURE_PT_image_mapping(TextureTypePanel):
bl_label = "Image Mapping"
bl_default_closed = True
col.itemR(tex, "crop_max_x", text="X")
col.itemR(tex, "crop_max_y", text="Y")
+
class TEXTURE_PT_plugin(TextureTypePanel):
bl_label = "Plugin"
tex_type = 'PLUGIN'
layout.itemL(text="Nothing yet")
+
class TEXTURE_PT_envmap(TextureTypePanel):
bl_label = "Environment Map"
tex_type = 'ENVIRONMENT_MAP'
layout.itemL(text="Nothing yet")
+
class TEXTURE_PT_musgrave(TextureTypePanel):
bl_label = "Musgrave"
tex_type = 'MUSGRAVE'
row.itemR(tex, "noise_size", text="Size")
row.itemR(tex, "nabla")
+
class TEXTURE_PT_voronoi(TextureTypePanel):
bl_label = "Voronoi"
tex_type = 'VORONOI'
row.itemR(tex, "noise_size", text="Size")
row.itemR(tex, "nabla")
+
class TEXTURE_PT_distortednoise(TextureTypePanel):
bl_label = "Distorted Noise"
tex_type = 'DISTORTED_NOISE'
flow.itemR(tex, "noise_size", text="Size")
flow.itemR(tex, "nabla")
+
class TEXTURE_PT_voxeldata(TextureButtonsPanel):
bl_label = "Voxel Data"
layout.itemR(vd, "extension")
layout.itemR(vd, "intensity")
+
class TEXTURE_PT_pointdensity(TextureButtonsPanel):
bl_label = "Point Density"
if pd.falloff == 'SOFT':
col.itemR(pd, "falloff_softness")
+
class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel):
bl_label = "Turbulence"
bpy.types.register(TEXTURE_PT_colors)
bpy.types.register(TEXTURE_PT_mapping)
bpy.types.register(TEXTURE_PT_influence)
-
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class WorldButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
rd = context.scene.render_data
return (context.world) and (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
+
class WORLD_PT_preview(WorldButtonsPanel):
bl_label = "Preview"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
def draw(self, context):
self.layout.template_preview(context.world)
+
class WORLD_PT_context_world(WorldButtonsPanel):
bl_label = ""
bl_show_header = False
elif world:
split.template_ID(space, "pin_id")
+
class WORLD_PT_world(WorldButtonsPanel):
bl_label = "World"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
col.active = world.blend_sky
row.column().itemR(world, "ambient_color")
+
class WORLD_PT_mist(WorldButtonsPanel):
bl_label = "Mist"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
layout.itemR(world.mist, "falloff")
+
class WORLD_PT_stars(WorldButtonsPanel):
bl_label = "Stars"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
flow.itemR(world.stars, "min_distance", text="Min. Dist")
flow.itemR(world.stars, "average_separation", text="Separation")
+
class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
bl_label = "Ambient Occlusion"
COMPAT_ENGINES = set(['BLENDER_RENDER'])
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class Buttons_HT_header(bpy.types.Header):
bl_space_type = 'PROPERTIES'
so = context.space_data
scene = context.scene
- row= layout.row(align=True)
+ row = layout.row(align=True)
row.template_header()
if context.area.show_menus:
row.itemR(so, "buttons_context", expand=True, text="")
row.itemR(scene, "current_frame")
+
class Buttons_MT_view(bpy.types.Menu):
bl_label = "View"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
+# <pep8 compliant>
import sys
import bpy
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class FILEBROWSER_HT_header(bpy.types.Header):
bl_space_type = 'FILE_BROWSER'
row = layout.row(align=True)
row.active = params.do_filter
- row.itemR(params, "filter_folder", text="");
- row.itemR(params, "filter_blender", text="");
- row.itemR(params, "filter_image", text="");
- row.itemR(params, "filter_movie", text="");
- row.itemR(params, "filter_script", text="");
- row.itemR(params, "filter_font", text="");
- row.itemR(params, "filter_sound", text="");
- row.itemR(params, "filter_text", text="");
+ row.itemR(params, "filter_folder", text="")
+ row.itemR(params, "filter_blender", text="")
+ row.itemR(params, "filter_image", text="")
+ row.itemR(params, "filter_movie", text="")
+ row.itemR(params, "filter_script", text="")
+ row.itemR(params, "filter_font", text="")
+ row.itemR(params, "filter_sound", text="")
+ row.itemR(params, "filter_text", text="")
bpy.types.register(FILEBROWSER_HT_header)
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class IMAGE_MT_view(bpy.types.Menu):
bl_label = "View"
layout.itemS()
- ratios = [[1, 8], [1, 4], [1, 2], [1, 1], [2, 1], [4, 1], [8, 1]];
+ ratios = [[1, 8], [1, 4], [1, 2], [1, 1], [2, 1], [4, 1], [8, 1]]
for a, b in ratios:
text = "Zoom %d:%d" % (a, b)
- layout.item_floatO("image.view_zoom_ratio", "ratio", a/b, text=text)
+ layout.item_floatO("image.view_zoom_ratio", "ratio", a / b, text=text)
layout.itemS()
layout.itemO("image.view_all")
layout.itemO("screen.screen_full_area")
+
class IMAGE_MT_select(bpy.types.Menu):
bl_label = "Select"
layout.itemO("uv.select_pinned")
layout.itemO("uv.select_linked")
+
class IMAGE_MT_image(bpy.types.Menu):
bl_label = "Image"
layout.itemR(sima, "image_painting")
+
class IMAGE_MT_uvs_showhide(bpy.types.Menu):
bl_label = "Show/Hide Faces"
layout.itemO("uv.hide")
layout.item_booleanO("uv.hide", "unselected", True)
+
class IMAGE_MT_uvs_transform(bpy.types.Menu):
bl_label = "Transform"
layout.itemO("tfm.rotate")
layout.itemO("tfm.resize")
+
class IMAGE_MT_uvs_mirror(bpy.types.Menu):
bl_label = "Mirror"
layout = self.layout
layout.operator_context = "EXEC_REGION_WIN"
- props= layout.itemO("tfm.mirror", text="X Axis", properties=True)
- props.constraint_axis[0]= True
+ props = layout.itemO("tfm.mirror", text="X Axis", properties=True)
+ props.constraint_axis[0] = True
+
+ props = layout.itemO("tfm.mirror", text="Y Axis", properties=True)
+ props.constraint_axis[1] = True
- props= layout.itemO("tfm.mirror", text="Y Axis", properties=True)
- props.constraint_axis[1]= True
class IMAGE_MT_uvs_weldalign(bpy.types.Menu):
bl_label = "Weld/Align"
layout.itemO("uv.weld") # W, 1
layout.items_enumO("uv.align", "axis") # W, 2/3/4
+
class IMAGE_MT_uvs(bpy.types.Menu):
bl_label = "UVs"
layout.itemM("IMAGE_MT_uvs_showhide")
+
class IMAGE_HT_header(bpy.types.Header):
bl_space_type = 'IMAGE_EDITOR'
if show_uvedit or sima.image_painting:
layout.itemR(sima, "update_automatically", text="")
+
class IMAGE_PT_image_properties(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
layout.template_image(sima, "image", iuser, compact=True)
+
class IMAGE_PT_game_properties(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
col.itemR(ima, "mapping", expand=True)
-
class IMAGE_PT_view_properties(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
#col.itemR(uvedit, "draw_edges")
#col.itemR(uvedit, "draw_faces")
+
class IMAGE_PT_paint(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
col.itemR(brush, "blend", text="Blend")
+
class IMAGE_PT_paint_stroke(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
row.itemR(brush, "spacing", text="Distance", slider=True)
row.itemR(brush, "use_spacing_pressure", toggle=True, text="")
+
class IMAGE_PT_paint_curve(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
bpy.types.register(IMAGE_PT_paint_curve)
bpy.types.register(IMAGE_PT_game_properties)
bpy.types.register(IMAGE_PT_view_properties)
-
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
import dynamic_menu
# reload(dynamic_menu)
+
class INFO_HT_header(bpy.types.Header):
bl_space_type = 'INFO'
layout.itemO("wm.window_fullscreen_toggle", icon='ICON_ARROW_LEFTRIGHT', text="")
+
class INFO_MT_file(bpy.types.Menu):
bl_label = "File"
dynamic_menu.setup(INFO_MT_file_more)
'''
+
class INFO_MT_file_import(dynamic_menu.DynMenu):
bl_idname = "INFO_MT_file_import"
bl_label = "Import"
def draw(self, context):
self.layout.itemO("WM_OT_collada_import", text="COLLADA (.dae)...")
+
class INFO_MT_file_export(dynamic_menu.DynMenu):
bl_idname = "INFO_MT_file_export"
bl_label = "Export"
def draw(self, context):
self.layout.itemO("WM_OT_collada_export", text="COLLADA (.dae)...")
+
class INFO_MT_file_external_data(bpy.types.Menu):
bl_label = "External Data"
layout.itemO("file.report_missing_files")
layout.itemO("file.find_missing_files")
+
class INFO_MT_mesh_add(dynamic_menu.DynMenu):
bl_idname = "INFO_MT_mesh_add"
bl_label = "Mesh"
+
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
layout.itemO("mesh.primitive_grid_add", icon='ICON_MESH_GRID', text="Grid")
layout.itemO("mesh.primitive_monkey_add", icon='ICON_MESH_MONKEY', text="Monkey")
+
class INFO_MT_add(bpy.types.Menu):
bl_label = "Add"
layout.item_menu_enumO("object.group_instance_add", "type", text="Group Instance", icon='ICON_OUTLINER_OB_EMPTY')
+
class INFO_MT_game(bpy.types.Menu):
bl_label = "Game"
layout.itemR(gs, "show_physics_visualization")
layout.itemR(gs, "deprecation_warnings")
+
class INFO_MT_render(bpy.types.Menu):
bl_label = "Render"
layout.itemO("screen.render_view_show")
+
class INFO_MT_help(bpy.types.Menu):
bl_label = "Help"
# Help operators
+
class HelpOperator(bpy.types.Operator):
+
def execute(self, context):
import webbrowser
webbrowser.open(self._url)
return ('FINISHED',)
+
class HELP_OT_manual(HelpOperator):
'''The Blender Wiki manual'''
bl_idname = "help.manual"
bl_label = "Manual"
_url = 'http://wiki.blender.org/index.php/Manual'
+
class HELP_OT_release_logs(HelpOperator):
'''Information about the changes in this version of Blender'''
bl_idname = "help.release_logs"
bl_label = "Release Logs"
_url = 'http://www.blender.org/development/release-logs/'
+
class HELP_OT_blender_website(HelpOperator):
'''The official Blender website'''
bl_idname = "help.blender_website"
bl_label = "Blender Website"
_url = 'http://www.blender.org/'
+
class HELP_OT_blender_eshop(HelpOperator):
'''Buy official Blender resources and merchandise online'''
bl_idname = "help.blender_eshop"
bl_label = "Blender e-Shop"
_url = 'http://www.blender3d.org/e-shop'
+
class HELP_OT_developer_community(HelpOperator):
'''Get involved with Blender development'''
bl_idname = "help.developer_community"
bl_label = "Developer Community"
_url = 'http://www.blender.org/community/get-involved/'
+
class HELP_OT_user_community(HelpOperator):
'''Get involved with other Blender users'''
bl_idname = "help.user_community"
bl_label = "User Community"
_url = 'http://www.blender.org/community/user-community/'
+
class HELP_OT_report_bug(HelpOperator):
'''Report a bug in the Blender bug tracker'''
bl_idname = "help.report_bug"
bl_label = "Report a Bug"
_url = 'http://projects.blender.org/tracker/?atid=498&group_id=9&func=browse'
+
class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
bl_idname = "help.operator_cheat_sheet"
bl_label = "Operator Cheat Sheet (new textblock)"
+
def execute(self, context):
op_strings = []
tot = 0
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
+# <pep8 compliant>
import bpy
+
class LOGIC_PT_properties(bpy.types.Panel):
bl_space_type = 'LOGIC_EDITOR'
bl_region_type = 'UI'
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class NODE_HT_header(bpy.types.Header):
bl_space_type = 'NODE_EDITOR'
layout.itemR(id.render_data, "free_unused_nodes", text="Free Unused")
layout.itemR(snode, "backdrop")
+
class NODE_MT_view(bpy.types.Menu):
bl_label = "View"
layout.itemO("node.view_all")
layout.itemO("screen.screen_full_area")
+
class NODE_MT_select(bpy.types.Menu):
bl_label = "Select"
layout.itemO("node.select_linked_from")
layout.itemO("node.select_linked_to")
+
class NODE_MT_node(bpy.types.Menu):
bl_label = "Node"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class OUTLINER_HT_header(bpy.types.Header):
bl_space_type = 'OUTLINER'
row = layout.row(align=False)
row.itemL(text="No Keying Set active")
+
class OUTLINER_MT_view(bpy.types.Menu):
bl_label = "View"
col.itemO("outliner.show_one_level")
col.itemO("outliner.show_hierarchy")
+
class OUTLINER_MT_edit_datablocks(bpy.types.Menu):
bl_label = "Edit"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
def act_strip(context):
- try: return context.scene.sequence_editor.active_strip
- except: return None
+ try:
+ return context.scene.sequence_editor.active_strip
+ except:
+ return None
+
-# Header
class SEQUENCER_HT_header(bpy.types.Header):
bl_space_type = 'SEQUENCE_EDITOR'
else:
layout.itemR(st, "display_channel", text="Channel")
+
class SEQUENCER_MT_view(bpy.types.Menu):
bl_label = "View"
"""
+
class SEQUENCER_MT_select(bpy.types.Menu):
bl_label = "Select"
layout.itemO("sequencer.select_all_toggle")
layout.itemO("sequencer.select_inverse")
+
class SEQUENCER_MT_marker(bpy.types.Menu):
bl_label = "Marker (TODO)"
#layout.itemO("sequencer.sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
+
class SEQUENCER_MT_add(bpy.types.Menu):
bl_label = "Add"
layout.itemM("SEQUENCER_MT_add_effect")
+
class SEQUENCER_MT_add_effect(bpy.types.Menu):
bl_label = "Effect Strip..."
layout.item_enumO("sequencer.effect_strip_add", 'type', 'COLOR')
layout.item_enumO("sequencer.effect_strip_add", 'type', 'SPEED')
+
class SEQUENCER_MT_strip(bpy.types.Menu):
bl_label = "Strip"
if strip:
stype = strip.type
- if stype=='EFFECT':
+ if stype == 'EFFECT':
layout.itemS()
layout.itemO("sequencer.effect_change")
layout.itemO("sequencer.effect_reassign_inputs")
- elif stype=='IMAGE':
+ elif stype == 'IMAGE':
layout.itemS()
layout.itemO("sequencer.image_change")
- elif stype=='SCENE':
+ elif stype == 'SCENE':
layout.itemS()
layout.itemO("sequencer.scene_change", text="Change Scene")
- elif stype=='MOVIE':
+ elif stype == 'MOVIE':
layout.itemS()
layout.itemO("sequencer.movie_change")
layout.itemO("sequencer.swap_right")
layout.itemO("sequencer.swap_left")
-# Panels
+
class SequencerButtonsPanel(bpy.types.Panel):
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
def poll(self, context):
return context.space_data.display_mode == 'SEQUENCER' and act_strip(context) != None
+
class SequencerButtonsPanel_Output(bpy.types.Panel):
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
def poll(self, context):
return context.space_data.display_mode != 'SEQUENCER'
+
class SEQUENCER_PT_edit(SequencerButtonsPanel):
bl_label = "Edit Strip"
col.itemR(strip, "start_still", text="Start")
col.itemR(strip, "end_still", text="End")
+
class SEQUENCER_PT_effect(SequencerButtonsPanel):
bl_label = "Effect Strip"
col.itemR(strip, "rotation_start", text="Start")
col.itemR(strip, "rotation_end", text="End")
+
class SEQUENCER_PT_input(SequencerButtonsPanel):
bl_label = "Strip Input"
col.itemR(strip, "animation_start_offset", text="Start")
col.itemR(strip, "animation_end_offset", text="End")
+
class SEQUENCER_PT_sound(SequencerButtonsPanel):
bl_label = "Sound"
row.itemR(strip.sound, "caching")
+
class SEQUENCER_PT_filter(SequencerButtonsPanel):
bl_label = "Filter"
col.itemR(strip.color_balance, "gain")
col.itemR(strip.color_balance, "inverse_gain", text="Inverse")
+
class SEQUENCER_PT_proxy(SequencerButtonsPanel):
bl_label = "Proxy"
flow.itemR(strip.proxy, "directory")
flow.itemR(strip.proxy, "file")
+
class SEQUENCER_PT_view(SequencerButtonsPanel_Output):
bl_label = "View Settings"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class TEXT_HT_header(bpy.types.Header):
bl_space_type = 'TEXT_EDITOR'
if text.dirty:
row.itemL(text="File: *%s (unsaved)" % text.filename)
else:
- row.itemL(text="File: %s" % text.filename )
+ row.itemL(text="File: %s" % text.filename)
else:
if text.library:
row.itemL(text="Text: External")
row = layout.row()
row.itemO("text.run_script")
+
class TEXT_PT_properties(bpy.types.Panel):
bl_space_type = 'TEXT_EDITOR'
bl_region_type = 'UI'
flow.itemR(st, "font_size")
flow.itemR(st, "tab_width")
+
class TEXT_PT_find(bpy.types.Panel):
bl_space_type = 'TEXT_EDITOR'
bl_region_type = 'UI'
row.itemR(st, "find_wrap", text="Wrap")
row.itemR(st, "find_all", text="All")
+
class TEXT_MT_text(bpy.types.Menu):
bl_label = "Text"
layout.itemM("TEXT_MT_templates")
-
class TEXT_MT_templates(bpy.types.Menu):
'''
Creates the menu items by scanning scripts/templates
layout.item_stringO("text.open", "path", path, text=path_to_name(f))
-
class TEXT_MT_edit_view(bpy.types.Menu):
bl_label = "View"
layout.item_enumO("text.move", "type", 'FILE_TOP', text="Top of File")
layout.item_enumO("text.move", "type", 'FILE_BOTTOM', text="Bottom of File")
+
class TEXT_MT_edit_select(bpy.types.Menu):
bl_label = "Select"
layout.itemO("text.select_all")
layout.itemO("text.select_line")
+
class TEXT_MT_edit_markers(bpy.types.Menu):
bl_label = "Markers"
layout.itemO("text.next_marker")
layout.itemO("text.previous_marker")
+
class TEXT_MT_format(bpy.types.Menu):
bl_label = "Format"
layout.item_menu_enumO("text.convert_whitespace", "type")
+
class TEXT_MT_edit_to3d(bpy.types.Menu):
bl_label = "Text To 3D Object"
def draw(self, context):
layout = self.layout
- layout.item_booleanO("text.to_3d_object", "split_lines", False, text="One Object");
- layout.item_booleanO("text.to_3d_object", "split_lines", True, text="One Object Per Line");
+ layout.item_booleanO("text.to_3d_object", "split_lines", False, text="One Object")
+ layout.item_booleanO("text.to_3d_object", "split_lines", True, text="One Object Per Line")
+
class TEXT_MT_edit(bpy.types.Menu):
bl_label = "Edit"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class TIME_HT_header(bpy.types.Header):
bl_space_type = 'TIMELINE'
row.itemO("anim.insert_keyframe", text="", icon='ICON_KEY_HLT')
row.itemO("anim.delete_keyframe", text="", icon='ICON_KEY_DEHLT')
+
class TIME_MT_view(bpy.types.Menu):
bl_label = "View"
layout.itemR(st, "only_selected")
+
class TIME_MT_frame(bpy.types.Menu):
bl_label = "Frame"
#sub.active = tools.enable_auto_key
sub.itemM("TIME_MT_autokey")
+
class TIME_MT_playback(bpy.types.Menu):
bl_label = "Playback"
layout.itemR(scene, "mute_audio")
layout.itemR(scene, "scrub_audio")
+
class TIME_MT_autokey(bpy.types.Menu):
bl_label = "Auto-Keyframing Mode"
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class USERPREF_HT_header(bpy.types.Header):
bl_space_type = 'USER_PREFERENCES'
layout.operator_context = "INVOKE_DEFAULT"
layout.itemO("wm.keyconfig_export", "Export Key Configuration...")
+
class USERPREF_MT_view(bpy.types.Menu):
bl_label = "View"
def draw(self, context):
layout = self.layout
+
class USERPREF_PT_tabs(bpy.types.Panel):
bl_label = ""
bl_space_type = 'USER_PREFERENCES'
layout.itemR(userpref, "active_section", expand=True)
+
class USERPREF_PT_interface(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Interface"
sub1.itemR(view, "open_toplevel_delay", text="Top Level")
sub1.itemR(view, "open_sublevel_delay", text="Sub Level")
+
class USERPREF_PT_edit(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Edit"
sub1.itemR(edit, "duplicate_action", text="Action")
sub1.itemR(edit, "duplicate_particle", text="Particle")
+
class USERPREF_PT_system(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "System"
sub1.itemR(system, "prefetch_frames")
sub1.itemR(system, "memory_cache_limit")
+
class USERPREF_PT_file(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Files"
sub3.enabled = paths.auto_save_temporary_files
sub3.itemR(paths, "auto_save_time", text="Timer (mins)")
+
class USERPREF_PT_input(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Input"
f.write('# Configuration %s\n' % kc.name)
- f.write("wm = bpy.data.windowmanagers[0]\n");
+ f.write("wm = bpy.data.windowmanagers[0]\n")
f.write("kc = wm.add_keyconfig(\'%s\')\n\n" % kc.name)
for km in kc.keymaps:
wm.add_fileselect(self.__operator__)
return ('RUNNING_MODAL',)
+
class WM_OT_keymap_edit(bpy.types.Operator):
"Edit key map."
bl_idname = "wm.keymap_edit"
km.copy_to_user()
return ('FINISHED',)
+
class WM_OT_keymap_restore(bpy.types.Operator):
"Restore key map"
bl_idname = "wm.keymap_restore"
return ('FINISHED',)
+
class WM_OT_keyitem_add(bpy.types.Operator):
"Add key map item."
bl_idname = "wm.keyitem_add"
kmi = km.add_item("", "A", "PRESS")
return ('FINISHED',)
+
class WM_OT_keyitem_remove(bpy.types.Operator):
"Remove key map item."
bl_idname = "wm.keyitem_remove"
bpy.ops.add(WM_OT_keymap_restore)
bpy.ops.add(WM_OT_keyitem_add)
bpy.ops.add(WM_OT_keyitem_remove)
-
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
-
import dynamic_menu
-# ********** Header **********
class VIEW3D_HT_header(bpy.types.Header):
bl_space_type = 'VIEW_3D'
# ********** Utilities **********
+
class VIEW3D_MT_showhide(bpy.types.Menu):
bl_label = "Show/Hide"
_operator_name = ""
layout.itemO("%s.hide" % self._operator_name, text="Hide Selected")
layout.item_booleanO("%s.hide" % self._operator_name, "unselected", True, text="Hide Unselected")
+
class VIEW3D_MT_snap(bpy.types.Menu):
bl_label = "Snap"
# ********** View menus **********
+
class VIEW3D_MT_view(bpy.types.Menu):
bl_label = "View"
layout.itemS()
layout.itemO("screen.animation_play", text="Playback Animation", icon='ICON_PLAY')
+
+
class VIEW3D_MT_view_navigation(bpy.types.Menu):
bl_label = "Navigation"
layout.itemO("view3d.fly")
+
class VIEW3D_MT_view_align(bpy.types.Menu):
bl_label = "Align View"
layout.itemO("view3d.camera_to_view", text="Align Active Camera to View")
layout.itemO("view3d.view_center")
+
class VIEW3D_MT_view_cameras(bpy.types.Menu):
bl_label = "Cameras"
# ********** Select menus, suffix from context.mode **********
+
class VIEW3D_MT_select_object(bpy.types.Menu):
bl_label = "Select"
layout.item_menu_enumO("object.select_grouped", "type", text="Select Grouped...")
layout.itemO("object.select_pattern", text="Select Pattern...")
+
class VIEW3D_MT_select_pose(bpy.types.Menu):
bl_label = "Select"
props.extend = True
props.direction = 'CHILD'
+
class VIEW3D_MT_select_particle(bpy.types.Menu):
bl_label = "Select"
layout.itemO("particle.select_more")
layout.itemO("particle.select_less")
+
class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
bl_label = "Select"
layout.itemO("mesh.loop_to_region")
layout.itemO("mesh.region_to_loop")
+
class VIEW3D_MT_select_edit_curve(bpy.types.Menu):
bl_label = "Select"
layout.itemO("curve.select_more")
layout.itemO("curve.select_less")
+
class VIEW3D_MT_select_edit_surface(bpy.types.Menu):
bl_label = "Select"
layout.itemO("curve.select_more")
layout.itemO("curve.select_less")
+
class VIEW3D_MT_select_edit_metaball(bpy.types.Menu):
bl_label = "Select"
layout.itemO("mball.select_random_metaelems")
+
class VIEW3D_MT_select_edit_lattice(bpy.types.Menu):
bl_label = "Select"
layout.itemO("lattice.select_all_toggle", text="Select/Deselect All")
+
class VIEW3D_MT_select_edit_armature(bpy.types.Menu):
bl_label = "Select"
props.extend = True
props.direction = 'CHILD'
+
class VIEW3D_MT_select_face(bpy.types.Menu):# XXX no matching enum
bl_label = "Select"
# ********** Object menu **********
+
class VIEW3D_MT_object(bpy.types.Menu):
bl_context = "objectmode"
bl_label = "Object"
layout.item_menu_enumO("object.convert", "target")
+
class VIEW3D_MT_object_clear(bpy.types.Menu):
bl_label = "Clear"
layout.itemO("object.scale_clear", text="Scale")
layout.itemO("object.origin_clear", text="Origin")
+
class VIEW3D_MT_object_apply(bpy.types.Menu):
bl_label = "Apply"
layout.itemO("object.parent_set", text="Set")
layout.itemO("object.parent_clear", text="Clear")
+
class VIEW3D_MT_object_track(bpy.types.Menu):
bl_label = "Track"
layout.itemO("object.track_set", text="Set")
layout.itemO("object.track_clear", text="Clear")
+
class VIEW3D_MT_object_group(bpy.types.Menu):
bl_label = "Group"
layout.itemO("group.objects_add_active")
layout.itemO("group.objects_remove_active")
+
class VIEW3D_MT_object_constraints(bpy.types.Menu):
bl_label = "Constraints"
layout.itemO("object.constraint_add_with_targets")
layout.itemO("object.constraints_clear")
+
class VIEW3D_MT_object_showhide(bpy.types.Menu):
bl_label = "Show/Hide"
layout.itemO("object.restrictview_set", text="Hide Selected")
layout.item_booleanO("object.restrictview_set", "unselected", True, text="Hide Unselected")
+
class VIEW3D_MT_make_single_user(bpy.types.Menu):
bl_label = "Make Single User"
# ********** Vertex paint menu **********
+
class VIEW3D_MT_paint_vertex(bpy.types.Menu):
bl_label = "Paint"
# ********** Sculpt menu **********
+
class VIEW3D_MT_sculpt(bpy.types.Menu):
bl_label = "Sculpt"
# ********** Particle menu **********
+
class VIEW3D_MT_particle(bpy.types.Menu):
bl_label = "Particle"
layout.itemM("VIEW3D_MT_particle_showhide")
+
class VIEW3D_MT_particle_showhide(VIEW3D_MT_showhide):
_operator_name = "particle"
# ********** Pose Menu **********
+
class VIEW3D_MT_pose(bpy.types.Menu):
bl_label = "Pose"
layout.itemM("VIEW3D_MT_pose_showhide")
layout.item_menu_enumO("pose.flags_set", 'mode', text="Bone Settings")
+
class VIEW3D_MT_pose_transform(bpy.types.Menu):
bl_label = "Clear Transform"
layout.itemL(text="Origin")
+
class VIEW3D_MT_pose_pose(bpy.types.Menu):
bl_label = "Pose Library"
layout.itemO("poselib.pose_rename", text="Rename Pose...")
layout.itemO("poselib.pose_remove", text="Remove Pose...")
+
class VIEW3D_MT_pose_motion(bpy.types.Menu):
bl_label = "Motion Paths"
layout.itemO("pose.paths_calculate", text="Calculate")
layout.itemO("pose.paths_clear", text="Clear")
+
class VIEW3D_MT_pose_group(bpy.types.Menu):
bl_label = "Bone Groups"
layout.itemO("pose.ik_add")
layout.itemO("pose.ik_clear")
+
class VIEW3D_MT_pose_constraints(bpy.types.Menu):
bl_label = "Constraints"
layout.itemO("pose.constraint_add_with_targets", text="Add (With Targets)...")
layout.itemO("pose.constraints_clear")
+
class VIEW3D_MT_pose_showhide(VIEW3D_MT_showhide):
_operator_name = "pose"
# ********** Edit Menus, suffix from ob.type **********
-# Edit MESH
+
class VIEW3D_MT_edit_mesh(bpy.types.Menu):
bl_label = "Mesh"
layout.itemM("VIEW3D_MT_edit_mesh_showhide")
-# Only used by the menu
+
class VIEW3D_MT_edit_mesh_specials(bpy.types.Menu):
bl_label = "Specials"
layout.itemO("mesh.shape_propagate_to_all")
layout.itemO("mesh.select_vertex_path")
+
class VIEW3D_MT_edit_mesh_vertices(bpy.types.Menu):
bl_label = "Vertices"
layout.itemO("object.vertex_group_blend")
layout.itemO("mesh.shape_propagate_to_all")
+
class VIEW3D_MT_edit_mesh_edges(bpy.types.Menu):
bl_label = "Edges"
layout.itemO("mesh.flip_normals")
+
class VIEW3D_MT_edit_mesh_showhide(VIEW3D_MT_showhide):
_operator_name = "mesh"
# Edit Curve
-
# draw_curve is used by VIEW3D_MT_edit_curve and VIEW3D_MT_edit_surface
+
+
def draw_curve(self, context):
layout = self.layout
layout.itemM("VIEW3D_MT_edit_curve_showhide")
+
class VIEW3D_MT_edit_curve(bpy.types.Menu):
bl_label = "Curve"
draw = draw_curve
+
class VIEW3D_MT_edit_curve_ctrlpoints(bpy.types.Menu):
bl_label = "Control Points"
layout.item_menu_enumO("curve.handle_type_set", "type")
+
class VIEW3D_MT_edit_curve_segments(bpy.types.Menu):
bl_label = "Segments"
layout.itemO("curve.subdivide")
layout.itemO("curve.switch_direction")
+
class VIEW3D_MT_edit_curve_showhide(VIEW3D_MT_showhide):
_operator_name = "curve"
-# Edit SURFACE
+
class VIEW3D_MT_edit_surface(bpy.types.Menu):
bl_label = "Surface"
draw = draw_curve
-# Edit TEXT
+
class VIEW3D_MT_edit_text(bpy.types.Menu):
bl_label = "Text"
layout.itemm("view3d_mt_edit_text_chars")
+
class VIEW3D_MT_edit_text_chars(bpy.types.Menu):
bl_label = "Special Characters"
layout.item_stringO("font.text_insert", "text", b'\xC2\xBF'.decode(), text="Spanish Question Mark|Alt ?")
layout.item_stringO("font.text_insert", "text", b'\xC2\xA1'.decode(), text="Spanish Exclamation Mark|Alt !")
-# Edit META
+
class VIEW3D_MT_edit_meta(bpy.types.Menu):
bl_label = "Metaball"
layout.itemM("VIEW3D_MT_edit_meta_showhide")
+
class VIEW3D_MT_edit_meta_showhide(bpy.types.Menu):
bl_label = "Show/Hide"
layout.itemO("mball.hide_metaelems", text="Hide Selected")
layout.item_booleanO("mball.hide_metaelems", "unselected", True, text="Hide Unselected")
-# Edit LATTICE
+
class VIEW3D_MT_edit_lattice(bpy.types.Menu):
bl_label = "Lattice"
layout.itemR(settings, "proportional_editing")
layout.item_menu_enumR(settings, "proportional_editing_falloff")
-# Edit ARMATURE
+
class VIEW3D_MT_edit_armature(bpy.types.Menu):
bl_label = "Armature"
layout.item_menu_enumO("armature.flags_set", "mode", text="Bone Settings")
+
class VIEW3D_MT_edit_armature_parent(bpy.types.Menu):
bl_label = "Parent"
layout.itemO("armature.parent_set", text="Make")
layout.itemO("armature.parent_clear", text="Clear")
+
class VIEW3D_MT_edit_armature_roll(bpy.types.Menu):
bl_label = "Bone Roll"
# ********** Panel **********
+
class VIEW3D_PT_3dview_properties(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
layout.column().itemR(scene, "cursor_location", text="3D Cursor:")
+
class VIEW3D_PT_3dview_display(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
col.itemR(view, "outline_selected")
col.itemR(view, "all_object_centers")
col.itemR(view, "relationship_lines")
- if ob and ob.type =='MESH':
+ if ob and ob.type == 'MESH':
mesh = context.active_object.data
col.itemR(mesh, "all_edges")
# col.itemR(view, "box_preview")
# col.itemR(view, "box_clip")
+
class VIEW3D_PT_3dview_meshdisplay(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
col.itemR(mesh, "draw_edge_angle")
col.itemR(mesh, "draw_face_area")
+
class VIEW3D_PT_3dview_curvedisplay(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
col.itemR(curve, "draw_normals", text="Normals")
col.itemR(context.scene.tool_settings, "normal_size", text="Normal Size")
+
class VIEW3D_PT_background_image(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
col.itemR(bg, "offset_x", text="X")
col.itemR(bg, "offset_y", text="Y")
+
class VIEW3D_PT_transform_orientations(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
col.itemR(orientation, "name")
col.itemO("tfm.delete_orientation", text="Delete")
+
class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_register = True
bl_undo = True
- pattern = StringProperty(name="Pattern", description="Name filter using '*' and '?' wildcard chars", maxlen= 32, default= "*")
- case_sensitive = BoolProperty(name="Case Sensitive", description="Do a case sensitive compare", default= False)
- extend = BoolProperty(name="Extend", description="Extend the existing selection", default= True)
-
+ pattern = StringProperty(name="Pattern", description="Name filter using '*' and '?' wildcard chars", maxlen=32, default="*")
+ case_sensitive = BoolProperty(name="Case Sensitive", description="Do a case sensitive compare", default=False)
+ extend = BoolProperty(name="Extend", description="Extend the existing selection", default=True)
def execute(self, context):
import fnmatch
- if self.case_sensitive: pattern_match = fnmatch.fnmatchcase
- else: pattern_match = lambda a, b: fnmatch.fnmatchcase(a.upper(), b.upper())
+
+ if self.case_sensitive:
+ pattern_match = fnmatch.fnmatchcase
+ else:
+ pattern_match = lambda a, b: fnmatch.fnmatchcase(a.upper(), b.upper())
for ob in context.visible_objects:
if pattern_match(ob.name, self.pattern):
bpy.types.register(VIEW3D_PT_etch_a_ton)
bpy.ops.add(OBJECT_OT_select_pattern)
-
# http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise
# using this module constitutes acceptance of the terms of this License.
-
+# <pep8 compliant>
import bpy
+
class View3DPanel(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
+
# ********** default tools for objectmode ****************
+
class VIEW3D_PT_tools_objectmode(View3DPanel):
bl_context = "objectmode"
bl_label = "Object Tools"
col.itemO("object.duplicate_move")
col.itemO("object.delete")
- active_object= context.active_object
+ active_object = context.active_object
if active_object and active_object.type == 'MESH':
col = layout.column(align=True)
# ********** default tools for editmode_mesh ****************
+
class VIEW3D_PT_tools_meshedit(View3DPanel):
bl_context = "mesh_edit"
bl_label = "Mesh Tools"
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
+
class VIEW3D_PT_tools_meshedit_options(View3DPanel):
bl_context = "mesh_edit"
bl_label = "Mesh Options"
# ********** default tools for editmode_curve ****************
+
class VIEW3D_PT_tools_curveedit(View3DPanel):
bl_context = "curve_edit"
bl_label = "Curve Tools"
# ********** default tools for editmode_surface ****************
+
class VIEW3D_PT_tools_surfaceedit(View3DPanel):
bl_context = "surface_edit"
bl_label = "Surface Tools"
# ********** default tools for editmode_text ****************
+
class VIEW3D_PT_tools_textedit(View3DPanel):
bl_context = "text_edit"
bl_label = "Text Tools"
# ********** default tools for editmode_armature ****************
+
class VIEW3D_PT_tools_armatureedit(View3DPanel):
bl_context = "armature_edit"
bl_label = "Armature Tools"
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
+
class VIEW3D_PT_tools_armatureedit_options(View3DPanel):
bl_context = "armature_edit"
bl_label = "Armature Options"
# ********** default tools for editmode_mball ****************
+
class VIEW3D_PT_tools_mballedit(View3DPanel):
bl_context = "mball_edit"
bl_label = "Meta Tools"
# ********** default tools for editmode_lattice ****************
+
class VIEW3D_PT_tools_latticeedit(View3DPanel):
bl_context = "lattice_edit"
bl_label = "Lattice Tools"
# ********** default tools for posemode ****************
+
class VIEW3D_PT_tools_posemode(View3DPanel):
bl_context = "posemode"
bl_label = "Pose Tools"
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
+
class VIEW3D_PT_tools_posemode_options(View3DPanel):
bl_context = "posemode"
bl_label = "Pose Options"
# ********** default tools for paint modes ****************
+
class PaintPanel(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
return False
+
class VIEW3D_PT_tools_brush(PaintPanel):
bl_label = "Brush"
row.itemR(brush, "use_jitter_pressure", toggle=True, text="")
'''
+
class VIEW3D_PT_tools_brush_stroke(PaintPanel):
bl_label = "Stroke"
bl_default_closed = True
if texture_paint:
row.itemR(brush, "use_spacing_pressure", toggle=True, text="")
+
class VIEW3D_PT_tools_brush_curve(PaintPanel):
bl_label = "Curve"
bl_default_closed = True
layout.template_curve_mapping(brush, "curve")
layout.item_menu_enumO("brush.curve_preset", property="shape")
+
class VIEW3D_PT_sculpt_options(PaintPanel):
bl_label = "Options"
# ********** default tools for weightpaint ****************
+
class VIEW3D_PT_tools_weightpaint(View3DPanel):
bl_context = "weightpaint"
bl_label = "Weight Tools"
col.itemO("object.vertex_group_invert", text="Invert")
col.itemO("object.vertex_group_clean", text="Clean")
+
class VIEW3D_PT_tools_weightpaint_options(View3DPanel):
bl_context = "weightpaint"
bl_label = "Options"
# ********** default tools for vertexpaint ****************
+
class VIEW3D_PT_tools_vertexpaint(View3DPanel):
bl_context = "vertexpaint"
bl_label = "Options"
# col.itemL(text="Multiply:")
# col.itemR(vpaint, "mul", text="")
-
# ********** default tools for texturepaint ****************
+
class VIEW3D_PT_tools_projectpaint(View3DPanel):
bl_context = "texturepaint"
bl_label = "Project Paint"
ipaint = context.tool_settings.image_paint
settings = context.tool_settings.image_paint
- use_projection= ipaint.use_projection
+ use_projection = ipaint.use_projection
col = layout.column()
sub = col.column()
sub = col.column()
sub.itemR(ipaint, "seam_bleed")
-# ********** default tools for particle mode ****************
class VIEW3D_PT_tools_particlemode(View3DPanel):
+ '''default tools for particle mode'''
bl_context = "particlemode"
bl_label = "Options"
ptcache = ob.particle_systems[ob.active_particle_system_index].point_cache
else:
for md in ob.modifiers:
- if md.type==pe.type:
+ if md.type == pe.type:
ptcache = md.point_cache
if ptcache and len(ptcache.point_cache_list) > 1:
sub.active = pe.fade_time
sub.itemR(pe, "fade_frames", slider=True)
+
bpy.types.register(VIEW3D_PT_tools_weightpaint)
bpy.types.register(VIEW3D_PT_tools_objectmode)
bpy.types.register(VIEW3D_PT_tools_meshedit)