bugfix [#22843] Cannot export to folder with ".blend" on the end.
This commit is contained in:
@@ -1140,7 +1140,7 @@ class Export3DS(bpy.types.Operator):
|
||||
|
||||
# Add to a menu
|
||||
def menu_func(self, context):
|
||||
default_path = bpy.data.filepath.replace(".blend", ".3ds")
|
||||
default_path = os.path.splitext(bpy.data.filepath)[0] + ".3ds"
|
||||
self.layout.operator(Export3DS.bl_idname, text="3D Studio (.3ds)").filepath = default_path
|
||||
|
||||
|
||||
@@ -1154,4 +1154,3 @@ def unregister():
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
|
||||
|
@@ -3437,7 +3437,7 @@ class ExportFBX(bpy.types.Operator):
|
||||
|
||||
|
||||
def menu_func(self, context):
|
||||
default_path = bpy.data.filepath.replace(".blend", ".fbx")
|
||||
default_path = os.path.splitext(bpy.data.filepath)[0] + ".fbx"
|
||||
self.layout.operator(ExportFBX.bl_idname, text="Autodesk FBX (.fbx)").filepath = default_path
|
||||
|
||||
|
||||
|
@@ -183,7 +183,8 @@ class ExportMDD(bpy.types.Operator):
|
||||
|
||||
|
||||
def menu_func(self, context):
|
||||
default_path = bpy.data.filepath.replace(".blend", ".mdd")
|
||||
import os
|
||||
default_path = os.path.splitext(bpy.data.filepath)[0] + ".mdd"
|
||||
self.layout.operator(ExportMDD.bl_idname, text="Lightwave Point Cache (.mdd)").filepath = default_path
|
||||
|
||||
|
||||
|
@@ -964,7 +964,7 @@ class ExportOBJ(bpy.types.Operator):
|
||||
|
||||
|
||||
def menu_func(self, context):
|
||||
default_path = bpy.data.filepath.replace(".blend", ".obj")
|
||||
default_path = os.path.splitext(bpy.data.filepath)[0] + ".obj"
|
||||
self.layout.operator(ExportOBJ.bl_idname, text="Wavefront (.obj)").filepath = default_path
|
||||
|
||||
|
||||
|
@@ -310,7 +310,8 @@ class ExportPLY(bpy.types.Operator):
|
||||
|
||||
|
||||
def menu_func(self, context):
|
||||
default_path = bpy.data.filepath.replace(".blend", ".ply")
|
||||
import os
|
||||
default_path = os.path.splitext(bpy.data.filepath)[0] + ".ply"
|
||||
self.layout.operator(ExportPLY.bl_idname, text="Stanford (.ply)").filepath = default_path
|
||||
|
||||
|
||||
|
@@ -1242,7 +1242,7 @@ class ExportX3D(bpy.types.Operator):
|
||||
|
||||
|
||||
def menu_func(self, context):
|
||||
default_path = bpy.data.filepath.replace(".blend", ".x3d")
|
||||
default_path = os.path.splitext(bpy.data.filepath)[0] + ".x3d"
|
||||
self.layout.operator(ExportX3D.bl_idname, text="X3D Extensible 3D (.x3d)").filepath = default_path
|
||||
|
||||
|
||||
@@ -1259,4 +1259,3 @@ def unregister():
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
|
||||
|
@@ -131,11 +131,11 @@ class SelectHierarchy(bpy.types.Operator):
|
||||
|
||||
if parent:
|
||||
parents.append(parent)
|
||||
|
||||
if obj_act == obj:
|
||||
context.scene.objects.active = parent
|
||||
|
||||
parent.selected = True
|
||||
if obj_act == obj:
|
||||
context.scene.objects.active = parent
|
||||
|
||||
parent.selected = True
|
||||
|
||||
if parents:
|
||||
return {'CANCELLED'}
|
||||
|
@@ -210,7 +210,8 @@ class ExportUVLayout(bpy.types.Operator):
|
||||
|
||||
|
||||
def menu_func(self, context):
|
||||
default_path = bpy.data.filepath.replace(".blend", ".svg")
|
||||
import os
|
||||
default_path = os.path.splitext(bpy.data.filepath)[0] + ".svg"
|
||||
self.layout.operator(ExportUVLayout.bl_idname).filepath = default_path
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user