fix [#28151] export OBJ don't save the extension
authorCampbell Barton <ideasman42@gmail.com>
Wed, 3 Aug 2011 05:32:07 +0000 (05:32 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 3 Aug 2011 05:32:07 +0000 (05:32 +0000)
also correct some typos

doc/python_api/blender-org/static/default.css_t
release/scripts/modules/bpy_extras/io_utils.py
source/blender/editors/space_view3d/view3d_view.c
source/blender/render/intern/source/rendercore.c

index 6f3f25d..e6fe922 100644 (file)
@@ -219,7 +219,7 @@ div.sphinxsidebarwrapper.fixed {
 }
 
 {%- if theme_stickysidebar|tobool %}
 }
 
 {%- 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 {
    to an anchor */
 /*
 div.related {
index f476b37..4566438 100644 (file)
@@ -37,6 +37,15 @@ import bpy
 from bpy.props import StringProperty, BoolProperty, EnumProperty
 
 
 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",
 class ExportHelper:
     filepath = StringProperty(
             name="File Path",
@@ -70,21 +79,22 @@ class ExportHelper:
         return {'RUNNING_MODAL'}
 
     def check(self, context):
         return {'RUNNING_MODAL'}
 
     def check(self, context):
+        change_ext = False
+        change_axis = _check_axis_conversion(self)
+
         check_extension = self.check_extension
 
         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:
 
 
 class ImportHelper:
@@ -99,6 +109,9 @@ class ImportHelper:
         context.window_manager.fileselect_add(self)
         return {'RUNNING_MODAL'}
 
         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
 
 # Axis conversion function, not pretty LUT
 # use lookup tabes to convert between any axis
index eeaf877..ed0b264 100644 (file)
@@ -1190,7 +1190,7 @@ int ED_view3d_lock(RegionView3D *rv3d)
        return TRUE;
 }
 
        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 */
 void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d)
 {
        if(rv3d->persp==RV3D_CAMOB) {       /* obs/camera */
index a7e19c8..c08d6c0 100644 (file)
@@ -730,7 +730,7 @@ static void atm_tile(RenderPart *pa, RenderLayer *rl)
        
        if(zpass==NULL) return;
 
        
        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))
        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))