[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1072] contrib/py/scripts/addons: fix for md3 menu
Campbell Barton
ideasman42 at gmail.com
Mon Sep 20 13:39:00 CEST 2010
Revision: 1072
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1072
Author: campbellbarton
Date: 2010-09-20 13:39:00 +0200 (Mon, 20 Sep 2010)
Log Message:
-----------
fix for md3 menu
Modified Paths:
--------------
contrib/py/scripts/addons/io_export_md3.py
contrib/py/scripts/addons/text_editor_pasteall.py
Modified: contrib/py/scripts/addons/io_export_md3.py
===================================================================
--- contrib/py/scripts/addons/io_export_md3.py 2010-09-20 11:33:37 UTC (rev 1071)
+++ contrib/py/scripts/addons/io_export_md3.py 2010-09-20 11:39:00 UTC (rev 1072)
@@ -684,7 +684,7 @@
return context.active_object is not None
def menu_func(self, context):
- newpath = os.path.splitext(bpy.context.main.filepath)[0] + ".md3"
+ newpath = os.path.splitext(bpy.context.blend_data.filepath)[0] + ".md3"
self.layout.operator(ExportMD3.bl_idname, text="Quake Model 3 (.md3)").filepath = newpath
def register():
@@ -694,4 +694,4 @@
bpy.types.INFO_MT_file_export.remove(menu_func)
if __name__ == "__main__":
- register()
\ No newline at end of file
+ register()
Modified: contrib/py/scripts/addons/text_editor_pasteall.py
===================================================================
--- contrib/py/scripts/addons/text_editor_pasteall.py 2010-09-20 11:33:37 UTC (rev 1071)
+++ contrib/py/scripts/addons/text_editor_pasteall.py 2010-09-20 11:39:00 UTC (rev 1072)
@@ -82,7 +82,7 @@
# get the selected text
text = self.get_selected_text(st.text)
# if no text is selected send the whole file
- if text == None: text = st.text.as_string()
+ if text is None: text = st.text.as_string()
# get the file type based on the extension
format = self.get_file_format(st.text)
@@ -90,14 +90,14 @@
# send the text and receive the returned page
html = self.send_text(text, format)
- if html == None:
+ if html is None:
self.report('ERROR', "Error in sending the text to the server.")
return {'CANCELLED'}
# get the link of the posted page
page = self.get_page(str(html))
- if page == None or page == "":
+ if page is None or page == "":
self.report('ERROR', "Error in retrieving the page.")
return {'CANCELLED'}
else:
More information about the Bf-extensions-cvs
mailing list