fix [#28151] export OBJ don't save the extension

also correct some typos
This commit is contained in:
Campbell Barton 2011-08-03 05:32:07 +00:00
parent 6233430c23
commit a10245a1fa
4 changed files with 27 additions and 14 deletions

View File

@ -219,7 +219,7 @@ div.sphinxsidebarwrapper.fixed {
}
{%- if theme_stickysidebar|tobool %}
/* this is nice, but it it leads to hidden headings when jumping
/* this is nice, but it leads to hidden headings when jumping
to an anchor */
/*
div.related {

View File

@ -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

View File

@ -1190,7 +1190,7 @@ int ED_view3d_lock(RegionView3D *rv3d)
return TRUE;
}
/* dont set windows active in in here, is used by renderwin too */
/* dont set windows active in here, is used by renderwin too */
void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d)
{
if(rv3d->persp==RV3D_CAMOB) { /* obs/camera */

View File

@ -730,7 +730,7 @@ static void atm_tile(RenderPart *pa, RenderLayer *rl)
if(zpass==NULL) return;
/* check for at least one sun lamp that its atmosphere flag is is enabled */
/* check for at least one sun lamp that its atmosphere flag is enabled */
for(go=R.lights.first; go; go= go->next) {
lar= go->lampren;
if(lar->type==LA_SUN && lar->sunsky && (lar->sunsky->effect_type & LA_SUN_EFFECT_AP))