* Merging trunk up to r38981.
* Fixing a minor issue in a previous commit.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user