diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-06-24 07:30:50 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-06-24 07:30:50 +0400 |
commit | b429af10d04d727574eb50a7186e8075ae8fb0b8 (patch) | |
tree | dae073488e49cb2a4107d3fe2d553711496bf4f9 /release/scripts/startup/bl_ui | |
parent | 9a2f36b50f818c0c1b659363a1df298f7043e207 (diff) |
merge from trunk #37722
Diffstat (limited to 'release/scripts/startup/bl_ui')
10 files changed, 68 insertions, 31 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 11a129377e8..00d8d08852e 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -113,13 +113,25 @@ class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel): sub.prop(curve, "use_fill_back") col.prop(curve, "use_fill_deform", text="Fill Deformed") - col.label(text="Textures:") - col.prop(curve, "use_uv_as_generated") - col.prop(curve, "use_auto_texspace") - + +class DATA_PT_curve_texture_space(CurveButtonsPanel, bpy.types.Panel): + bl_label = "Texture Space" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + + def draw(self, context): + layout = self.layout + + ob = context.object + curve = context.curve + + row = layout.row() + row.prop(curve, "use_auto_texspace") + row.prop(curve, "use_uv_as_generated") + row = layout.row() - row.column().prop(curve, "texspace_location") - row.column().prop(curve, "texspace_size") + row.column().prop(curve, "texspace_location", text="Location") + row.column().prop(curve, "texspace_size", text="Size") class DATA_PT_geometry_curve(CurveButtonsPanel, bpy.types.Panel): diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index e2c88413177..8c966825aee 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -118,6 +118,7 @@ class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel): 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" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} diff --git a/release/scripts/startup/bl_ui/properties_data_metaball.py b/release/scripts/startup/bl_ui/properties_data_metaball.py index c568d10b3b0..6dda99bc37f 100644 --- a/release/scripts/startup/bl_ui/properties_data_metaball.py +++ b/release/scripts/startup/bl_ui/properties_data_metaball.py @@ -70,10 +70,23 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel): layout.label(text="Update:") layout.prop(mball, "update_method", expand=True) - + + +class DATA_PT_mball_texture_space(DataButtonsPanel, bpy.types.Panel): + bl_label = "Texture Space" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + + def draw(self, context): + layout = self.layout + + mball = context.meta_ball + + layout.prop(mball, "use_auto_texspace") + row = layout.row() - row.column().prop(mball, "texspace_location") - row.column().prop(mball, "texspace_size") + row.column().prop(mball, "texspace_location", text="Location") + row.column().prop(mball, "texspace_size", text="Size") class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel): diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 586675f2ca0..ce6d0990f05 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -485,7 +485,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel): if md.wrap_method == 'PROJECT': split = layout.split(percentage=0.25) - + col = split.column() col.label(text="Axis:") col.prop(md, "use_project_x") diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py index 03823ad7345..5f79dd3127a 100644 --- a/release/scripts/startup/bl_ui/properties_object_constraint.py +++ b/release/scripts/startup/bl_ui/properties_object_constraint.py @@ -655,8 +655,8 @@ 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. + # 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=" %s X" % chr(187)) diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 5da89d0090a..c7e3a9e7220 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -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:") diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 858c619d3c1..c477a2ff62b 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -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): diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index ed4f47860a3..a78a5ceba80 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -24,6 +24,7 @@ import addon_utils from bpy.props import StringProperty, BoolProperty, EnumProperty from blf import gettext as _ + def ui_items_general(col, context): """ General UI Theme Settings (User Interface) """ @@ -94,7 +95,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") @@ -438,6 +439,8 @@ class USERPREF_PT_system(bpy.types.Panel): col.label(text=_("OpenGL:")) col.prop(system, "gl_clip_alpha", slider=True) col.prop(system, "use_mipmaps") + col.label(text=_("Anisotropic Filtering")) + col.prop(system, "anisotropic_filter", text="") col.prop(system, "use_vertex_buffer_objects") #Anti-aliasing is disabled as it breaks broder/lasso select #col.prop(system, "use_antialiasing") @@ -847,17 +850,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): @@ -890,7 +890,7 @@ class USERPREF_PT_addons(bpy.types.Panel): col = split.column() col.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM') col.label(text=_("Categories")) - col.prop(context.window_manager, "addon_filter", text="") # , expand=True, too slow with dynamic enum. + col.prop(context.window_manager, "addon_filter", expand=True) col.label(text=_("Supported Level")) col.prop(context.window_manager, "addon_support", expand=True) diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 76748e61640..6a518e15f95 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -20,6 +20,7 @@ import bpy from blf import gettext as _ + class VIEW3D_HT_header(bpy.types.Header): bl_space_type = 'VIEW_3D' @@ -98,6 +99,8 @@ class VIEW3D_HT_header(bpy.types.Header): row.prop(toolsettings, "use_snap_peel_object", text="") elif toolsettings.snap_element == 'FACE': row.prop(toolsettings, "use_snap_project", text="") + if toolsettings.use_snap_project and obj.mode == 'EDIT': + row.prop(toolsettings, "use_snap_project_self", text="") # OpenGL render row = layout.row(align=True) diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 5bb41942e7c..b02f7dd75c1 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -20,6 +20,7 @@ import bpy from blf import gettext as _ + class View3DPanel(): bl_space_type = 'VIEW_3D' bl_region_type = 'TOOLS' |