diff options
author | Joerg Mueller <nexyon@gmail.com> | 2011-08-03 16:44:52 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2011-08-03 16:44:52 +0400 |
commit | eb9d591898e93dbbe9e28865018175b9da730596 (patch) | |
tree | 3209caefe505273e834a936e54f6146a4185e83b /release | |
parent | 6d7490632f13f9744c6b3e507c838a34f3481846 (diff) | |
parent | f1fb54e126824ff38b8bf26fa80f3f46c886bd45 (diff) |
* Merging trunk up to r38981.
* Fixing a minor issue in a previous commit.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/bpy/path.py | 4 | ||||
-rw-r--r-- | release/scripts/modules/bpy_extras/io_utils.py | 35 | ||||
-rw-r--r-- | release/scripts/presets/ffmpeg/xvid.py | 3 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_material.py | 12 |
4 files changed, 34 insertions, 20 deletions
diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py index a01745fec0a..284fef97795 100644 --- a/release/scripts/modules/bpy/path.py +++ b/release/scripts/modules/bpy/path.py @@ -136,7 +136,7 @@ def display_name(name): def display_name_from_filepath(name): """ - Returns the path stripped of directort and extension, + Returns the path stripped of directory and extension, ensured to be utf8 compatible. """ name = _os.path.splitext(basename(name))[0] @@ -204,7 +204,7 @@ def resolve_ncase(path): def ensure_ext(filepath, ext, case_sensitive=False): """ - Return the path with the extension added its its not alredy set. + Return the path with the extension added if it is not already set. :arg ext: The extension to check for. :type ext: string diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py index f476b371d0c..45664384efa 100644 --- a/release/scripts/modules/bpy_extras/io_utils.py +++ b/release/scripts/modules/bpy_extras/io_utils.py @@ -37,6 +37,15 @@ import bpy from bpy.props import StringProperty, BoolProperty, EnumProperty +def _check_axis_conversion(op): + if hasattr(op, "axis_forward") and hasattr(op, "axis_up"): + return axis_conversion_ensure(op, + "axis_forward", + "axis_up", + ) + return False + + class ExportHelper: filepath = StringProperty( name="File Path", @@ -70,21 +79,22 @@ class ExportHelper: return {'RUNNING_MODAL'} def check(self, context): + change_ext = False + change_axis = _check_axis_conversion(self) + check_extension = self.check_extension - if check_extension is None: - return False + if check_extension is not None: + filepath = bpy.path.ensure_ext(self.filepath, + self.filename_ext + if check_extension + else "") - filepath = bpy.path.ensure_ext(self.filepath, - self.filename_ext - if check_extension - else "") + if filepath != self.filepath: + self.filepath = filepath + change_ext = True - if filepath != self.filepath: - self.filepath = filepath - return True - - return False + return (change_ext or change_axis) class ImportHelper: @@ -99,6 +109,9 @@ class ImportHelper: context.window_manager.fileselect_add(self) return {'RUNNING_MODAL'} + def check(self, context): + return _check_axis_conversion(self) + # Axis conversion function, not pretty LUT # use lookup tabes to convert between any axis diff --git a/release/scripts/presets/ffmpeg/xvid.py b/release/scripts/presets/ffmpeg/xvid.py index fa64562e566..c006ba267cc 100644 --- a/release/scripts/presets/ffmpeg/xvid.py +++ b/release/scripts/presets/ffmpeg/xvid.py @@ -1,8 +1,7 @@ import bpy is_ntsc = (bpy.context.scene.render.fps != 25) -bpy.context.scene.render.ffmpeg_format = "AVI" -bpy.context.scene.render.ffmpeg_codec = "XVID" +bpy.context.scene.render.ffmpeg_format = "XVID" if is_ntsc: bpy.context.scene.render.ffmpeg_gopsize = 18 diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 2a52ae23782..296c05d78f5 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -247,15 +247,17 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel): row.prop(mat, "diffuse_fresnel_factor", text="Factor") if mat.use_diffuse_ramp: - layout.separator() - layout.template_color_ramp(mat, "diffuse_ramp", expand=True) - layout.separator() + col = layout.column() + col.active = (not mat.use_shadeless) + col.separator() + col.template_color_ramp(mat, "diffuse_ramp", expand=True) + col.separator() - row = layout.row() + row = col.row() row.prop(mat, "diffuse_ramp_input", text="Input") row.prop(mat, "diffuse_ramp_blend", text="Blend") - layout.prop(mat, "diffuse_ramp_factor", text="Factor") + col.prop(mat, "diffuse_ramp_factor", text="Factor") class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel): |