Merge with trunk r37475.
This commit is contained in:
@@ -37,6 +37,11 @@ def is_dict(obj):
|
||||
return hasattr(obj, 'keys') and hasattr(getattr(obj, 'keys'), '__call__')
|
||||
|
||||
|
||||
def is_struct_seq(obj):
|
||||
"""Returns whether obj is a structured sequence subclass: sys.float_info"""
|
||||
return isinstance(obj, tuple) and hasattr(obj, 'n_fields')
|
||||
|
||||
|
||||
def complete_names(word, namespace):
|
||||
"""Complete variable names or attributes
|
||||
|
||||
@@ -174,7 +179,7 @@ def complete(word, namespace, private=True):
|
||||
if type(obj) in (bool, float, int, str):
|
||||
return []
|
||||
# an extra char '[', '(' or '.' will be added
|
||||
if hasattr(obj, '__getitem__'):
|
||||
if hasattr(obj, '__getitem__') and not is_struct_seq(obj):
|
||||
# list or dictionary
|
||||
matches = complete_indices(word, namespace, obj)
|
||||
elif hasattr(obj, '__call__'):
|
||||
|
||||
@@ -120,15 +120,25 @@ def expand(line, cursor, namespace, private=True):
|
||||
from . import complete_calltip
|
||||
matches, word, scrollback = complete_calltip.complete(line,
|
||||
cursor, namespace)
|
||||
prefix = os.path.commonprefix(matches)[len(word):]
|
||||
no_calltip = False
|
||||
else:
|
||||
matches, word = complete(line, cursor, namespace, private)
|
||||
prefix = os.path.commonprefix(matches)[len(word):]
|
||||
if len(matches) == 1:
|
||||
scrollback = ''
|
||||
else:
|
||||
scrollback = ' '.join([m.split('.')[-1] for m in matches])
|
||||
# causes blender bug [#27495] since string keys may contain '.'
|
||||
# scrollback = ' '.join([m.split('.')[-1] for m in matches])
|
||||
word_prefix = word + prefix
|
||||
scrollback = ' '.join(
|
||||
[m[len(word_prefix):]
|
||||
if (word_prefix and m.startswith(word_prefix))
|
||||
else m.split('.')[-1]
|
||||
for m in matches])
|
||||
|
||||
no_calltip = True
|
||||
prefix = os.path.commonprefix(matches)[len(word):]
|
||||
|
||||
if prefix:
|
||||
line = line[:cursor] + prefix + line[cursor:]
|
||||
cursor += len(prefix)
|
||||
|
||||
@@ -80,7 +80,7 @@ def get_console(console_id):
|
||||
if console_data:
|
||||
console, stdout, stderr = console_data
|
||||
|
||||
# XXX, bug in python 3.1.2 ? (worked in 3.1.1)
|
||||
# XXX, bug in python 3.1.2, 3.2 ? (worked in 3.1.1)
|
||||
# seems there is no way to clear StringIO objects for writing, have to make new ones each time.
|
||||
import io
|
||||
stdout = io.StringIO()
|
||||
|
||||
@@ -22,10 +22,9 @@ from mathutils import Vector
|
||||
import bpy
|
||||
from bpy.props import BoolProperty, EnumProperty, IntProperty, FloatProperty, FloatVectorProperty
|
||||
|
||||
|
||||
class MakeFur(bpy.types.Operator):
|
||||
bl_idname = "object.make_fur"
|
||||
bl_label = "Make Fur"
|
||||
class QuickFur(bpy.types.Operator):
|
||||
bl_idname = "object.quick_fur"
|
||||
bl_label = "Quick Fur"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
density = EnumProperty(items=(
|
||||
@@ -79,6 +78,155 @@ class MakeFur(bpy.types.Operator):
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
class QuickExplode(bpy.types.Operator):
|
||||
bl_idname = "object.quick_explode"
|
||||
bl_label = "Quick Explode"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
style = EnumProperty(items=(
|
||||
('EXPLODE', "Explode", ""),
|
||||
('BLEND', "Blend", "")),
|
||||
name="Explode Style",
|
||||
description="",
|
||||
default='EXPLODE')
|
||||
|
||||
amount = IntProperty(name="Amount of pieces",
|
||||
default=100, min=2, max=10000, soft_min=2, soft_max=10000)
|
||||
|
||||
duration = IntProperty(name="Duration",
|
||||
default=50, min=1, max=10000, soft_min=1, soft_max=10000)
|
||||
|
||||
start_frame = IntProperty(name="Start Frame",
|
||||
default=1, min=1, max=10000, soft_min=1, soft_max=10000)
|
||||
|
||||
end_frame = IntProperty(name="End Frame",
|
||||
default=10, min=1, max=10000, soft_min=1, soft_max=10000)
|
||||
|
||||
velocity = FloatProperty(name="Outwards Velocity",
|
||||
default=1, min=0, max=1000, soft_min=0, soft_max=10)
|
||||
|
||||
fade = BoolProperty(name="Fade",
|
||||
description="Fade the pieces over time.",
|
||||
default=True)
|
||||
|
||||
invert_order = BoolProperty(name="Invert Order",
|
||||
description="Blend objects in the opposite direction (only for Blend style explosion).",
|
||||
default=False)
|
||||
|
||||
def execute(self, context):
|
||||
fake_context = bpy.context.copy()
|
||||
mesh_objects = [obj for obj in context.selected_objects if obj.type == 'MESH']
|
||||
|
||||
if self.style == 'BLEND' and len(mesh_objects) != 2:
|
||||
self.report({'ERROR'}, "Select two mesh objects.")
|
||||
return {'CANCELLED'}
|
||||
elif not mesh_objects:
|
||||
self.report({'ERROR'}, "Select at least one mesh object.")
|
||||
return {'CANCELLED'}
|
||||
|
||||
for obj in mesh_objects:
|
||||
if len(obj.particle_systems) > 0:
|
||||
self.report({'ERROR'}, "Selected object's can't have particle systems.")
|
||||
return {'CANCELLED'}
|
||||
|
||||
if self.fade:
|
||||
tex = bpy.data.textures.new("Explode fade", 'BLEND')
|
||||
tex.use_color_ramp = True
|
||||
|
||||
if self.style == 'BLEND':
|
||||
tex.color_ramp.elements[0].position = 0.333
|
||||
tex.color_ramp.elements[1].position = 0.666
|
||||
|
||||
tex.color_ramp.elements[0].color[3] = 1
|
||||
tex.color_ramp.elements[1].color[3] = 0
|
||||
|
||||
if self.style == 'BLEND':
|
||||
if self.invert_order:
|
||||
from_obj = mesh_objects[1]
|
||||
to_obj = mesh_objects[0]
|
||||
else:
|
||||
from_obj = mesh_objects[0]
|
||||
to_obj = mesh_objects[1]
|
||||
|
||||
for obj in mesh_objects:
|
||||
fake_context["object"] = obj
|
||||
bpy.ops.object.particle_system_add(fake_context)
|
||||
|
||||
settings = obj.particle_systems[-1].settings
|
||||
settings.count = self.amount
|
||||
settings.frame_start = self.start_frame
|
||||
settings.frame_end = self.end_frame - self.duration
|
||||
settings.lifetime = self.duration
|
||||
settings.normal_factor = self.velocity
|
||||
settings.render_type = 'NONE'
|
||||
|
||||
bpy.ops.object.modifier_add(fake_context, type='EXPLODE')
|
||||
explode = obj.modifiers[-1]
|
||||
explode.use_edge_cut = True
|
||||
|
||||
if self.fade:
|
||||
explode.show_dead = False
|
||||
bpy.ops.mesh.uv_texture_add(fake_context);
|
||||
uv = obj.data.uv_textures[-1]
|
||||
uv.name = "Explode fade"
|
||||
explode.particle_uv = uv.name
|
||||
|
||||
if len(obj.material_slots) == 0:
|
||||
obj.data.materials.append(bpy.data.materials.new("Explode fade"))
|
||||
|
||||
mat = obj.data.materials[0]
|
||||
mat.use_transparency = True
|
||||
mat.use_transparent_shadows = True
|
||||
mat.alpha = 0
|
||||
mat.specular_alpha = 0
|
||||
|
||||
tex_slot = mat.texture_slots.add()
|
||||
|
||||
tex_slot.texture = tex
|
||||
tex_slot.texture_coords = 'UV'
|
||||
tex_slot.uv_layer = uv.name
|
||||
|
||||
tex_slot.use_map_alpha = True
|
||||
|
||||
if self.style == 'BLEND':
|
||||
if obj == to_obj:
|
||||
tex_slot.alpha_factor = -1
|
||||
elem = tex.color_ramp.elements[1]
|
||||
elem.color[0] = mat.diffuse_color[0]
|
||||
elem.color[1] = mat.diffuse_color[1]
|
||||
elem.color[2] = mat.diffuse_color[2]
|
||||
else:
|
||||
elem = tex.color_ramp.elements[0]
|
||||
elem.color[0] = mat.diffuse_color[0]
|
||||
elem.color[1] = mat.diffuse_color[1]
|
||||
elem.color[2] = mat.diffuse_color[2]
|
||||
else:
|
||||
tex_slot.use_map_color_diffuse = False
|
||||
|
||||
if self.style == 'BLEND':
|
||||
settings.physics_type = 'KEYED'
|
||||
settings.use_emit_random = False
|
||||
settings.rotation_mode = 'NOR'
|
||||
|
||||
psys = obj.particle_systems[-1]
|
||||
|
||||
fake_context["particle_system"] = obj.particle_systems[-1]
|
||||
bpy.ops.particle.new_target(fake_context)
|
||||
bpy.ops.particle.new_target(fake_context)
|
||||
|
||||
if obj == from_obj:
|
||||
psys.targets[1].object = to_obj
|
||||
else:
|
||||
psys.targets[0].object = from_obj
|
||||
settings.normal_factor = -self.velocity
|
||||
explode.show_unborn = False
|
||||
explode.show_dead = True
|
||||
else:
|
||||
settings.factor_random = self.velocity
|
||||
settings.angular_velocity_factor = self.velocity/10
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def obj_bb_minmax(obj, min_co, max_co):
|
||||
for i in range(0, 8):
|
||||
@@ -92,9 +240,9 @@ def obj_bb_minmax(obj, min_co, max_co):
|
||||
max_co[2] = max(bb_vec[2], max_co[2])
|
||||
|
||||
|
||||
class MakeSmoke(bpy.types.Operator):
|
||||
bl_idname = "object.make_smoke"
|
||||
bl_label = "Make Smoke"
|
||||
class QuickSmoke(bpy.types.Operator):
|
||||
bl_idname = "object.quick_smoke"
|
||||
bl_label = "Quick Smoke"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
style = EnumProperty(items=(
|
||||
@@ -201,9 +349,9 @@ class MakeSmoke(bpy.types.Operator):
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class MakeFluid(bpy.types.Operator):
|
||||
bl_idname = "object.make_fluid"
|
||||
bl_label = "Make Fluid"
|
||||
class QuickFluid(bpy.types.Operator):
|
||||
bl_idname = "object.quick_fluid"
|
||||
bl_label = "Quick Fluid"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
style = EnumProperty(items=(
|
||||
@@ -293,4 +441,4 @@ class MakeFluid(bpy.types.Operator):
|
||||
if self.start_baking:
|
||||
bpy.ops.fluid.bake()
|
||||
|
||||
return {'FINISHED'}
|
||||
return {'FINISHED'}
|
||||
@@ -326,7 +326,7 @@ class AddPresetOperator(AddPresetBase, bpy.types.Operator):
|
||||
|
||||
ret = []
|
||||
for prop_id, prop in operator_rna.properties.items():
|
||||
if (not prop.is_hidden) and prop_id not in properties_blacklist:
|
||||
if (not (prop.is_hidden or prop.is_skip_save)) and prop_id not in properties_blacklist:
|
||||
ret.append("op.%s" % prop_id)
|
||||
|
||||
return ret
|
||||
|
||||
@@ -106,7 +106,7 @@ class WM_OT_context_set_boolean(bpy.types.Operator):
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_boolean"
|
||||
bl_label = "Context Set Boolean"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = BoolProperty(name="Value",
|
||||
@@ -119,7 +119,7 @@ class WM_OT_context_set_int(bpy.types.Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_int"
|
||||
bl_label = "Context Set"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = IntProperty(name="Value", description="Assign value", default=0)
|
||||
@@ -132,7 +132,7 @@ class WM_OT_context_scale_int(bpy.types.Operator):
|
||||
'''Scale an int context value.'''
|
||||
bl_idname = "wm.context_scale_int"
|
||||
bl_label = "Context Set"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = FloatProperty(name="Value", description="Assign value", default=1.0)
|
||||
@@ -168,7 +168,7 @@ class WM_OT_context_set_float(bpy.types.Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_float"
|
||||
bl_label = "Context Set Float"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = FloatProperty(name="Value",
|
||||
@@ -182,7 +182,7 @@ class WM_OT_context_set_string(bpy.types.Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_string"
|
||||
bl_label = "Context Set String"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = StringProperty(name="Value",
|
||||
@@ -195,7 +195,7 @@ class WM_OT_context_set_enum(bpy.types.Operator):
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_enum"
|
||||
bl_label = "Context Set Enum"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = StringProperty(name="Value",
|
||||
@@ -209,7 +209,7 @@ class WM_OT_context_set_value(bpy.types.Operator):
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_value"
|
||||
bl_label = "Context Set Value"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = StringProperty(name="Value",
|
||||
@@ -227,7 +227,7 @@ class WM_OT_context_toggle(bpy.types.Operator):
|
||||
'''Toggle a context value.'''
|
||||
bl_idname = "wm.context_toggle"
|
||||
bl_label = "Context Toggle"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
|
||||
@@ -246,7 +246,7 @@ class WM_OT_context_toggle_enum(bpy.types.Operator):
|
||||
'''Toggle a context value.'''
|
||||
bl_idname = "wm.context_toggle_enum"
|
||||
bl_label = "Context Toggle Values"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value_1 = StringProperty(name="Value", \
|
||||
@@ -273,7 +273,7 @@ class WM_OT_context_cycle_int(bpy.types.Operator):
|
||||
'''vertex keys, groups' etc.'''
|
||||
bl_idname = "wm.context_cycle_int"
|
||||
bl_label = "Context Int Cycle"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
reverse = rna_reverse_prop
|
||||
@@ -307,7 +307,7 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
|
||||
'''Toggle a context value.'''
|
||||
bl_idname = "wm.context_cycle_enum"
|
||||
bl_label = "Context Enum Cycle"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
reverse = rna_reverse_prop
|
||||
@@ -360,7 +360,7 @@ class WM_OT_context_cycle_array(bpy.types.Operator):
|
||||
Useful for cycling the active mesh edit mode.'''
|
||||
bl_idname = "wm.context_cycle_array"
|
||||
bl_label = "Context Array Cycle"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
reverse = rna_reverse_prop
|
||||
@@ -406,7 +406,7 @@ class WM_MT_context_menu_enum(bpy.types.Menu):
|
||||
class WM_OT_context_menu_enum(bpy.types.Operator):
|
||||
bl_idname = "wm.context_menu_enum"
|
||||
bl_label = "Context Enum Menu"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
data_path = rna_path_prop
|
||||
|
||||
def execute(self, context):
|
||||
@@ -420,7 +420,7 @@ class WM_OT_context_set_id(bpy.types.Operator):
|
||||
'''Toggle a context value.'''
|
||||
bl_idname = "wm.context_set_id"
|
||||
bl_label = "Set Library ID"
|
||||
bl_options = {'UNDO'}
|
||||
bl_options = {'UNDO', 'INTERNAL'}
|
||||
|
||||
data_path = rna_path_prop
|
||||
value = StringProperty(name="Value",
|
||||
@@ -462,6 +462,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
|
||||
'''Adjust arbitrary values with mouse input'''
|
||||
bl_idname = "wm.context_modal_mouse"
|
||||
bl_label = "Context Modal Mouse"
|
||||
bl_options = {'INTERNAL'}
|
||||
|
||||
data_path_iter = StringProperty(description="The data path relative to the context, must point to an iterable.")
|
||||
data_path_item = StringProperty(description="The data path from each iterable to the value (int or float)")
|
||||
|
||||
@@ -116,6 +116,10 @@ class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel):
|
||||
col.label(text="Textures:")
|
||||
col.prop(curve, "use_uv_as_generated")
|
||||
col.prop(curve, "use_auto_texspace")
|
||||
|
||||
row = layout.row()
|
||||
row.column().prop(curve, "texspace_location")
|
||||
row.column().prop(curve, "texspace_size")
|
||||
|
||||
|
||||
class DATA_PT_geometry_curve(CurveButtonsPanel, bpy.types.Panel):
|
||||
|
||||
@@ -99,8 +99,9 @@ class DATA_PT_normals(MeshButtonsPanel, bpy.types.Panel):
|
||||
split.prop(mesh, "show_double_sided")
|
||||
|
||||
|
||||
class DATA_PT_settings(MeshButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Settings"
|
||||
class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Texture Space"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
def draw(self, context):
|
||||
@@ -109,8 +110,13 @@ class DATA_PT_settings(MeshButtonsPanel, bpy.types.Panel):
|
||||
mesh = context.mesh
|
||||
|
||||
layout.prop(mesh, "texture_mesh")
|
||||
layout.prop(mesh, "use_auto_texspace")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.prop(mesh, "use_auto_texspace")
|
||||
row = layout.row()
|
||||
row.column().prop(mesh, "texspace_location", text="Location")
|
||||
row.column().prop(mesh, "texspace_size", text="Size")
|
||||
|
||||
class DATA_PT_vertex_groups(MeshButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Vertex Groups"
|
||||
|
||||
@@ -70,6 +70,10 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
|
||||
|
||||
layout.label(text="Update:")
|
||||
layout.prop(mball, "update_method", expand=True)
|
||||
|
||||
row = layout.row()
|
||||
row.column().prop(mball, "texspace_location")
|
||||
row.column().prop(mball, "texspace_size")
|
||||
|
||||
|
||||
class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
|
||||
|
||||
@@ -483,11 +483,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
|
||||
col.label(text="Mode:")
|
||||
col.prop(md, "wrap_method", text="")
|
||||
|
||||
split = layout.split(percentage=0.25)
|
||||
|
||||
col = split.column()
|
||||
|
||||
if md.wrap_method == 'PROJECT':
|
||||
split = layout.split(percentage=0.25)
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Axis:")
|
||||
col.prop(md, "use_project_x")
|
||||
col.prop(md, "use_project_y")
|
||||
@@ -499,7 +498,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
|
||||
col.prop(md, "use_positive_direction")
|
||||
|
||||
col = split.column()
|
||||
|
||||
col.label(text="Cull Faces:")
|
||||
col.prop(md, "cull_face", expand=True)
|
||||
|
||||
|
||||
@@ -660,17 +660,19 @@ class ConstraintButtonsPanel():
|
||||
row = col.row()
|
||||
row.label(text="Source to Destination Mapping:")
|
||||
|
||||
# note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't
|
||||
# open it. Thus we are using the hardcoded value instead.
|
||||
row = col.row()
|
||||
row.prop(con, "map_to_x_from", expand=False, text="")
|
||||
row.label(text=" -> X")
|
||||
row.label(text=" %s X" % chr(187))
|
||||
|
||||
row = col.row()
|
||||
row.prop(con, "map_to_y_from", expand=False, text="")
|
||||
row.label(text=" -> Y")
|
||||
row.label(text=" %s Y" % chr(187))
|
||||
|
||||
row = col.row()
|
||||
row.prop(con, "map_to_z_from", expand=False, text="")
|
||||
row.label(text=" -> Z")
|
||||
row.label(text=" %s Z" % chr(187))
|
||||
|
||||
split = layout.split()
|
||||
|
||||
|
||||
@@ -257,6 +257,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
|
||||
col.prop(fluid, "slip_type", text="")
|
||||
if fluid.slip_type == 'PARTIALSLIP':
|
||||
col.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
|
||||
col.prop(fluid, "surface_noobs")
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Surface:")
|
||||
|
||||
@@ -172,8 +172,130 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
|
||||
row.prop(rl, "exclude_refraction", text="")
|
||||
|
||||
|
||||
class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Dimensions"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
scene = context.scene
|
||||
rd = scene.render
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label)
|
||||
row.operator("render.preset_add", text="", icon="ZOOMIN")
|
||||
row.operator("render.preset_add", text="", icon="ZOOMOUT").remove_active = True
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
sub = col.column(align=True)
|
||||
sub.label(text="Resolution:")
|
||||
sub.prop(rd, "resolution_x", text="X")
|
||||
sub.prop(rd, "resolution_y", text="Y")
|
||||
sub.prop(rd, "resolution_percentage", text="")
|
||||
|
||||
sub.label(text="Aspect Ratio:")
|
||||
sub.prop(rd, "pixel_aspect_x", text="X")
|
||||
sub.prop(rd, "pixel_aspect_y", text="Y")
|
||||
|
||||
row = col.row()
|
||||
row.prop(rd, "use_border", text="Border")
|
||||
sub = row.row()
|
||||
sub.active = rd.use_border
|
||||
sub.prop(rd, "use_crop_to_border", text="Crop")
|
||||
|
||||
col = split.column()
|
||||
sub = col.column(align=True)
|
||||
sub.label(text="Frame Range:")
|
||||
sub.prop(scene, "frame_start", text="Start")
|
||||
sub.prop(scene, "frame_end", text="End")
|
||||
sub.prop(scene, "frame_step", text="Step")
|
||||
|
||||
sub.label(text="Frame Rate:")
|
||||
if rd.fps_base == 1:
|
||||
fps_rate = round(rd.fps / rd.fps_base)
|
||||
else:
|
||||
fps_rate = round(rd.fps / rd.fps_base, 2)
|
||||
|
||||
# TODO: Change the following to iterate over existing presets
|
||||
custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 59.94, 60})
|
||||
|
||||
if custom_framerate == True:
|
||||
fps_label_text = "Custom (" + str(fps_rate) + " fps)"
|
||||
else:
|
||||
fps_label_text = str(fps_rate) + " fps"
|
||||
|
||||
sub.menu("RENDER_MT_framerate_presets", text=fps_label_text)
|
||||
|
||||
if custom_framerate or (bpy.types.RENDER_MT_framerate_presets.bl_label == "Custom"):
|
||||
sub.prop(rd, "fps")
|
||||
sub.prop(rd, "fps_base", text="/")
|
||||
subrow = sub.row(align=True)
|
||||
subrow.label(text="Time Remapping:")
|
||||
subrow = sub.row(align=True)
|
||||
subrow.prop(rd, "frame_map_old", text="Old")
|
||||
subrow.prop(rd, "frame_map_new", text="New")
|
||||
|
||||
|
||||
class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Anti-Aliasing"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
rd = context.scene.render
|
||||
|
||||
self.layout.prop(rd, "use_antialiasing", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render
|
||||
layout.active = rd.use_antialiasing
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.row().prop(rd, "antialiasing_samples", expand=True)
|
||||
sub = col.row()
|
||||
sub.enabled = not rd.use_border
|
||||
sub.prop(rd, "use_full_sample")
|
||||
|
||||
col = split.column()
|
||||
col.prop(rd, "pixel_filter_type", text="")
|
||||
col.prop(rd, "filter_size", text="Size")
|
||||
|
||||
|
||||
class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Sampled Motion Blur"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
rd = context.scene.render
|
||||
return not rd.use_full_sample and (rd.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
rd = context.scene.render
|
||||
|
||||
self.layout.prop(rd, "use_motion_blur", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render
|
||||
layout.active = rd.use_motion_blur
|
||||
|
||||
row = layout.row()
|
||||
row.prop(rd, "motion_blur_samples")
|
||||
row.prop(rd, "motion_blur_shutter")
|
||||
|
||||
|
||||
class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Shading"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw(self, context):
|
||||
@@ -254,8 +376,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
|
||||
col.prop(rd, "use_compositing")
|
||||
col.prop(rd, "use_sequencer")
|
||||
|
||||
col = split.column()
|
||||
col.prop(rd, "dither_intensity", text="Dither", slider=True)
|
||||
split.prop(rd, "dither_intensity", text="Dither", slider=True)
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -276,6 +397,51 @@ class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
|
||||
sub.prop(rd, "edge_color", text="")
|
||||
|
||||
|
||||
class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Stamp"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
rd = context.scene.render
|
||||
|
||||
self.layout.prop(rd, "use_stamp", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render
|
||||
|
||||
layout.active = rd.use_stamp
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(rd, "use_stamp_time", text="Time")
|
||||
col.prop(rd, "use_stamp_date", text="Date")
|
||||
col.prop(rd, "use_stamp_render_time", text="RenderTime")
|
||||
col.prop(rd, "use_stamp_frame", text="Frame")
|
||||
col.prop(rd, "use_stamp_scene", text="Scene")
|
||||
col.prop(rd, "use_stamp_camera", text="Camera")
|
||||
col.prop(rd, "use_stamp_lens", text="Lens")
|
||||
col.prop(rd, "use_stamp_filename", text="Filename")
|
||||
col.prop(rd, "use_stamp_marker", text="Marker")
|
||||
col.prop(rd, "use_stamp_sequencer_strip", text="Seq. Strip")
|
||||
|
||||
col = split.column()
|
||||
col.active = rd.use_stamp
|
||||
col.prop(rd, "stamp_foreground", slider=True)
|
||||
col.prop(rd, "stamp_background", slider=True)
|
||||
col.separator()
|
||||
col.prop(rd, "stamp_font_size", text="Font Size")
|
||||
|
||||
row = layout.split(percentage=0.2)
|
||||
row.prop(rd, "use_stamp_note", text="Note")
|
||||
sub = row.row()
|
||||
sub.active = rd.use_stamp_note
|
||||
sub.prop(rd, "stamp_note_text", text="")
|
||||
|
||||
|
||||
class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Output"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
@@ -433,172 +599,6 @@ class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
|
||||
split.prop(rd, "ffmpeg_audio_volume", slider=True)
|
||||
|
||||
|
||||
class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Anti-Aliasing"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
rd = context.scene.render
|
||||
|
||||
self.layout.prop(rd, "use_antialiasing", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render
|
||||
layout.active = rd.use_antialiasing
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.row().prop(rd, "antialiasing_samples", expand=True)
|
||||
sub = col.row()
|
||||
sub.enabled = not rd.use_border
|
||||
sub.prop(rd, "use_full_sample")
|
||||
|
||||
col = split.column()
|
||||
col.prop(rd, "pixel_filter_type", text="")
|
||||
col.prop(rd, "filter_size", text="Size")
|
||||
|
||||
|
||||
class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Sampled Motion Blur"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
rd = context.scene.render
|
||||
return not rd.use_full_sample and (rd.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
rd = context.scene.render
|
||||
|
||||
self.layout.prop(rd, "use_motion_blur", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render
|
||||
layout.active = rd.use_motion_blur
|
||||
|
||||
row = layout.row()
|
||||
row.prop(rd, "motion_blur_samples")
|
||||
row.prop(rd, "motion_blur_shutter")
|
||||
|
||||
|
||||
class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Dimensions"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
scene = context.scene
|
||||
rd = scene.render
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label)
|
||||
row.operator("render.preset_add", text="", icon="ZOOMIN")
|
||||
row.operator("render.preset_add", text="", icon="ZOOMOUT").remove_active = True
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
sub = col.column(align=True)
|
||||
sub.label(text="Resolution:")
|
||||
sub.prop(rd, "resolution_x", text="X")
|
||||
sub.prop(rd, "resolution_y", text="Y")
|
||||
sub.prop(rd, "resolution_percentage", text="")
|
||||
|
||||
sub.label(text="Aspect Ratio:")
|
||||
sub.prop(rd, "pixel_aspect_x", text="X")
|
||||
sub.prop(rd, "pixel_aspect_y", text="Y")
|
||||
|
||||
row = col.row()
|
||||
row.prop(rd, "use_border", text="Border")
|
||||
sub = row.row()
|
||||
sub.active = rd.use_border
|
||||
sub.prop(rd, "use_crop_to_border", text="Crop")
|
||||
|
||||
col = split.column()
|
||||
sub = col.column(align=True)
|
||||
sub.label(text="Frame Range:")
|
||||
sub.prop(scene, "frame_start", text="Start")
|
||||
sub.prop(scene, "frame_end", text="End")
|
||||
sub.prop(scene, "frame_step", text="Step")
|
||||
|
||||
sub.label(text="Frame Rate:")
|
||||
if rd.fps_base == 1:
|
||||
fps_rate = round(rd.fps / rd.fps_base)
|
||||
else:
|
||||
fps_rate = round(rd.fps / rd.fps_base, 2)
|
||||
|
||||
# TODO: Change the following to iterate over existing presets
|
||||
custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 59.94, 60})
|
||||
|
||||
if custom_framerate == True:
|
||||
fps_label_text = "Custom (" + str(fps_rate) + " fps)"
|
||||
else:
|
||||
fps_label_text = str(fps_rate) + " fps"
|
||||
|
||||
sub.menu("RENDER_MT_framerate_presets", text=fps_label_text)
|
||||
|
||||
if custom_framerate or (bpy.types.RENDER_MT_framerate_presets.bl_label == "Custom"):
|
||||
sub.prop(rd, "fps")
|
||||
sub.prop(rd, "fps_base", text="/")
|
||||
subrow = sub.row(align=True)
|
||||
subrow.label(text="Time Remapping:")
|
||||
subrow = sub.row(align=True)
|
||||
subrow.prop(rd, "frame_map_old", text="Old")
|
||||
subrow.prop(rd, "frame_map_new", text="New")
|
||||
|
||||
|
||||
class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Stamp"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
rd = context.scene.render
|
||||
|
||||
self.layout.prop(rd, "use_stamp", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
rd = context.scene.render
|
||||
|
||||
layout.active = rd.use_stamp
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(rd, "use_stamp_time", text="Time")
|
||||
col.prop(rd, "use_stamp_date", text="Date")
|
||||
col.prop(rd, "use_stamp_render_time", text="RenderTime")
|
||||
col.prop(rd, "use_stamp_frame", text="Frame")
|
||||
col.prop(rd, "use_stamp_scene", text="Scene")
|
||||
col.prop(rd, "use_stamp_camera", text="Camera")
|
||||
col.prop(rd, "use_stamp_lens", text="Lens")
|
||||
col.prop(rd, "use_stamp_filename", text="Filename")
|
||||
col.prop(rd, "use_stamp_marker", text="Marker")
|
||||
col.prop(rd, "use_stamp_sequencer_strip", text="Seq. Strip")
|
||||
|
||||
col = split.column()
|
||||
col.active = rd.use_stamp
|
||||
col.prop(rd, "stamp_foreground", slider=True)
|
||||
col.prop(rd, "stamp_background", slider=True)
|
||||
col.separator()
|
||||
col.prop(rd, "stamp_font_size", text="Font Size")
|
||||
|
||||
row = layout.split(percentage=0.2)
|
||||
row.prop(rd, "use_stamp_note", text="Note")
|
||||
sub = row.row()
|
||||
sub.active = rd.use_stamp_note
|
||||
sub.prop(rd, "stamp_note_text", text="")
|
||||
|
||||
|
||||
class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Bake"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
@@ -613,29 +613,42 @@ class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
|
||||
|
||||
layout.prop(rd, "bake_type")
|
||||
|
||||
if rd.bake_type == 'NORMALS':
|
||||
layout.prop(rd, "bake_normal_space")
|
||||
elif rd.bake_type in {'DISPLACEMENT', 'AO'}:
|
||||
layout.prop(rd, "use_bake_normalize")
|
||||
multires_bake = False
|
||||
if rd.bake_type in ['NORMALS', 'DISPLACEMENT']:
|
||||
layout.prop(rd, 'use_bake_multires')
|
||||
multires_bake = rd.use_bake_multires
|
||||
|
||||
# col.prop(rd, "bake_aa_mode")
|
||||
# col.prop(rd, "use_bake_antialiasing")
|
||||
if not multires_bake:
|
||||
if rd.bake_type == 'NORMALS':
|
||||
layout.prop(rd, "bake_normal_space")
|
||||
elif rd.bake_type in {'DISPLACEMENT', 'AO'}:
|
||||
layout.prop(rd, "use_bake_normalize")
|
||||
|
||||
layout.separator()
|
||||
# col.prop(rd, "bake_aa_mode")
|
||||
# col.prop(rd, "use_bake_antialiasing")
|
||||
|
||||
split = layout.split()
|
||||
layout.separator()
|
||||
|
||||
col = split.column()
|
||||
col.prop(rd, "use_bake_clear")
|
||||
col.prop(rd, "bake_margin")
|
||||
col.prop(rd, "bake_quad_split", text="Split")
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(rd, "use_bake_clear")
|
||||
col.prop(rd, "bake_margin")
|
||||
col.prop(rd, "bake_quad_split", text="Split")
|
||||
|
||||
col = split.column()
|
||||
col.prop(rd, "use_bake_selected_to_active")
|
||||
sub = col.column()
|
||||
sub.active = rd.use_bake_selected_to_active
|
||||
sub.prop(rd, "bake_distance")
|
||||
sub.prop(rd, "bake_bias")
|
||||
else:
|
||||
if rd.bake_type == 'DISPLACEMENT':
|
||||
layout.prop(rd, "use_bake_lores_mesh")
|
||||
|
||||
layout.prop(rd, "use_bake_clear")
|
||||
layout.prop(rd, "bake_margin")
|
||||
|
||||
col = split.column()
|
||||
col.prop(rd, "use_bake_selected_to_active")
|
||||
sub = col.column()
|
||||
sub.active = rd.use_bake_selected_to_active
|
||||
sub.prop(rd, "bake_distance")
|
||||
sub.prop(rd, "bake_bias")
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
bpy.utils.register_module(__name__)
|
||||
|
||||
@@ -42,7 +42,7 @@ class SEQUENCER_HT_header(bpy.types.Header):
|
||||
sub = row.row(align=True)
|
||||
sub.menu("SEQUENCER_MT_view")
|
||||
|
||||
if (st.view_type == 'SEQUENCER') or (st.view_type == 'SEQUENCER_PREVIEW'):
|
||||
if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
|
||||
sub.menu("SEQUENCER_MT_select")
|
||||
sub.menu("SEQUENCER_MT_marker")
|
||||
sub.menu("SEQUENCER_MT_add")
|
||||
@@ -50,17 +50,17 @@ class SEQUENCER_HT_header(bpy.types.Header):
|
||||
|
||||
layout.prop(st, "view_type", expand=True, text="")
|
||||
|
||||
if (st.view_type == 'PREVIEW') or (st.view_type == 'SEQUENCER_PREVIEW'):
|
||||
if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
|
||||
layout.prop(st, "display_mode", expand=True, text="")
|
||||
|
||||
if (st.view_type == 'SEQUENCER'):
|
||||
if st.view_type == 'SEQUENCER':
|
||||
row = layout.row(align=True)
|
||||
row.operator("sequencer.copy", text="", icon='COPYDOWN')
|
||||
row.operator("sequencer.paste", text="", icon='PASTEDOWN')
|
||||
|
||||
layout.separator()
|
||||
layout.operator("sequencer.refresh_all")
|
||||
elif (st.view_type == 'SEQUENCER_PREVIEW'):
|
||||
elif st.view_type == 'SEQUENCER_PREVIEW':
|
||||
layout.separator()
|
||||
layout.operator("sequencer.refresh_all")
|
||||
layout.prop(st, "display_channel", text="Channel")
|
||||
@@ -101,9 +101,9 @@ class SEQUENCER_MT_view(bpy.types.Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
if (st.view_type == 'SEQUENCER') or (st.view_type == 'SEQUENCER_PREVIEW'):
|
||||
if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
|
||||
layout.operator("sequencer.view_all", text='View all Sequences')
|
||||
if (st.view_type == 'PREVIEW') or (st.view_type == 'SEQUENCER_PREVIEW'):
|
||||
if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
|
||||
layout.operator_context = 'INVOKE_REGION_PREVIEW'
|
||||
layout.operator("sequencer.view_all_preview", text='Fit preview in window')
|
||||
layout.operator("sequencer.view_zoom_ratio", text='Show preview 1:1').ratio = 1.0
|
||||
@@ -300,7 +300,7 @@ class SequencerButtonsPanel():
|
||||
|
||||
@staticmethod
|
||||
def has_sequencer(context):
|
||||
return (context.space_data.view_type == 'SEQUENCER') or (context.space_data.view_type == 'SEQUENCER_PREVIEW')
|
||||
return (context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'})
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -313,7 +313,7 @@ class SequencerButtonsPanel_Output():
|
||||
|
||||
@staticmethod
|
||||
def has_preview(context):
|
||||
return (context.space_data.view_type == 'PREVIEW') or (context.space_data.view_type == 'SEQUENCER_PREVIEW')
|
||||
return (context.space_data.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'})
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -657,11 +657,17 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, bpy.types.Panel):
|
||||
|
||||
layout.template_ID(strip, "scene")
|
||||
|
||||
scene = strip.scene
|
||||
if scene:
|
||||
layout.prop(scene.render, "use_sequencer")
|
||||
|
||||
layout.label(text="Camera Override")
|
||||
layout.template_ID(strip, "scene_camera")
|
||||
|
||||
sce = strip.scene
|
||||
layout.label(text="Original frame range: %d-%d (%d)" % (sce.frame_start, sce.frame_end, sce.frame_end - sce.frame_start + 1))
|
||||
if scene:
|
||||
sta = scene.frame_start
|
||||
end = scene.frame_end
|
||||
layout.label(text="Original frame range: %d-%d (%d)" % (sta, end, end - sta + 1))
|
||||
|
||||
|
||||
class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel):
|
||||
|
||||
@@ -42,7 +42,7 @@ class TEXT_HT_header(bpy.types.Header):
|
||||
|
||||
if text and text.is_modified:
|
||||
row = layout.row()
|
||||
# row.color(redalert)
|
||||
row.alert = True
|
||||
row.operator("text.resolve_conflict", text="", icon='HELP')
|
||||
|
||||
layout.template_ID(st, "text", new="text.new", unlink="text.unlink")
|
||||
|
||||
@@ -94,7 +94,7 @@ class USERPREF_HT_header(bpy.types.Header):
|
||||
layout.operator("wm.keyconfig_import")
|
||||
elif userpref.active_section == 'ADDONS':
|
||||
layout.operator("wm.addon_install")
|
||||
layout.menu("USERPREF_MT_addons_dev_guides", text=" Addons Developer Guides", icon='INFO')
|
||||
layout.menu("USERPREF_MT_addons_dev_guides")
|
||||
elif userpref.active_section == 'THEMES':
|
||||
layout.operator("ui.reset_default_theme")
|
||||
|
||||
@@ -848,17 +848,14 @@ class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
|
||||
|
||||
|
||||
class USERPREF_MT_addons_dev_guides(bpy.types.Menu):
|
||||
bl_label = "Addons develoment guides"
|
||||
bl_label = "Develoment Guides"
|
||||
|
||||
# menu to open webpages with addons development guides
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.operator('wm.url_open', text='API Concepts'
|
||||
).url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
|
||||
layout.operator('wm.url_open', text='Addons guidelines',
|
||||
).url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons'
|
||||
layout.operator('wm.url_open', text='How to share your addon',
|
||||
).url = 'http://wiki.blender.org/index.php/Dev:Py/Sharing'
|
||||
layout.operator('wm.url_open', text='API Concepts', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
|
||||
layout.operator('wm.url_open', text='Addon Guidelines', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons'
|
||||
layout.operator('wm.url_open', text='How to share your addon', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:Py/Sharing'
|
||||
|
||||
|
||||
class USERPREF_PT_addons(bpy.types.Panel):
|
||||
|
||||
@@ -689,6 +689,7 @@ class VIEW3D_MT_object(bpy.types.Menu):
|
||||
|
||||
layout.operator("ed.undo")
|
||||
layout.operator("ed.redo")
|
||||
layout.operator("ed.undo_history")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1053,6 +1054,7 @@ class VIEW3D_MT_paint_weight(bpy.types.Menu):
|
||||
|
||||
layout.operator("ed.undo")
|
||||
layout.operator("ed.redo")
|
||||
layout.operator("ed.undo_history")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1133,6 +1135,7 @@ class VIEW3D_MT_particle(bpy.types.Menu):
|
||||
|
||||
layout.operator("ed.undo")
|
||||
layout.operator("ed.redo")
|
||||
layout.operator("ed.undo_history")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1186,6 +1189,7 @@ class VIEW3D_MT_pose(bpy.types.Menu):
|
||||
|
||||
layout.operator("ed.undo")
|
||||
layout.operator("ed.redo")
|
||||
layout.operator("ed.undo_history")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1377,6 +1381,7 @@ class VIEW3D_MT_edit_mesh(bpy.types.Menu):
|
||||
|
||||
layout.operator("ed.undo")
|
||||
layout.operator("ed.redo")
|
||||
layout.operator("ed.undo_history")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1848,6 +1853,7 @@ class VIEW3D_MT_edit_meta(bpy.types.Menu):
|
||||
|
||||
layout.operator("ed.undo")
|
||||
layout.operator("ed.redo")
|
||||
layout.operator("ed.undo_history")
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user