Game Editing > Scripts & Support

[ASE] Import/Export scripts for Blender 3D

<< < (4/10) > >>

Franktrog:
Hey kat. I went ahead and upgraded to the newest version of blender, 5.56.0 64bit and placed the file where you said to do so. However the option to export as .ase doesn't appear under file->export.

kat:
Not sure if this will work but try loading it into the script/text view and running it like that the old skool way (Alt+P). Otherwise you'll have to do a system search what "blender" folders you can find and play around with where you put the script. Also... long shot... I don't think the scripts need Python installed to show in the navigation menus but check that option as well.

Muhiz:
Hi

I made few changes to get your ASE exporter working on 2.57 RC2. I haven't tested with older versions like 2.56a but I think it should be fine. I'm not expert with Blender exporters and these modifications are for my own purposes. So feel free to use them in future versions or not.

Here are changes I made:

--- Code: ---# line 22
bl_info = {
    "name": "ASCII Scene Exporter",
    "author": "Richard Bartlett",
    "version": (0, 0, 5),
    "blender": (2, 5, 7),
    "api": 35622,
    "location": "File > Export > ASCII Scene (.ase)",
    "description": "Export ASCII Scene (.ase)",
    "warning": "",
    "wiki_url": "",
    "tracker_url": "",
    "category": "Import-Export"}

#line 437 ( line 427 before additions )
#Sets origin to 3d Cursor -- Transformations need this - Not sure how this behaves
bpy.ops.object.origin_set(type='ORIGIN_CURSOR', center='MEDIAN') 

#line 495 I commented this out because it was annoying to me...
#       This one needed to be changed. Should put warning dialog here though       
#        if os.path.exists(self.properties.filepath):
#            print(self.properties.filepath + ' already exists. Aborting.')
#            return {'CANCELLED'}

# line 524 Same as the lambda function but maybe easier to read
# I added .ase suffix to end because inserting it manually was tedious
def menu_func(self, context):
    default_path = os.path.splitext(bpy.data.filepath)[0] + ".ase"
    self.layout.operator(EXPORT_OT_asel.bl_idname, text="Ascii Scene Export (.ase)").filepath = default_path

#These ones needed the additions or otherwise script wouldn't had worked.
def register():
    bpy.utils.register_module(__name__)
    bpy.types.INFO_MT_file_export.append(menu_func)
   
def unregister():
    bpy.utils.unregister_module(__name__)
    bpy.types.INFO_MT_file_export.remove(menu_func)



--- End code ---

Keep up doing great work, your scripts have served well!

kat:
The scripts are the results of other peoples hard work and diligence, KatsBits just tests and hosts. ;D

WRT your edits, have you just knocked out that over-writing message or are there other changes? I'm not sure why rich_is_bored put that in there originally as you normally you want to do that or version save. Hopefully Blender won't change anything between now and then to break these changes.

Welcome by the way  ;)

Muhiz:

--- Quote from: kat on April 07, 2011, 06:13:01 AM ---The scripts are the results of other peoples hard work and diligence, KatsBits just tests and hosts. ;D

--- End quote ---
Ah, yes of course. :)


--- Quote from: kat on April 07, 2011, 06:13:01 AM ---WRT your edits, have you just knocked out that over-writing message or are there other changes? I'm not sure why rich_is_bored put that in there originally as you normally you want to do that or version save. Hopefully Blender won't change anything between now and then to break these changes.

--- End quote ---


Changes are cosmetic. Most of the changes were to get it working with latest version of Blender and to get it's "install Add-on" working without using command line magic/"old-school" -way for enabling it.

In 2.57 Add-on manager I couldn't see ASE exporter so I made those updates.

Other changes were putting automatic .ase postfix and getting rid of no-overwriting clause. Those changes were made with minimal effort and are mostly untested. I tried to keep my hands off from making any changes regarding the exported data itself.


--- Quote from: kat on April 07, 2011, 06:13:01 AM ---Welcome by the way  ;)

--- End quote ---
Thank you. :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version