KatsBits Community

[ASE] Import/Export scripts for Blender 3D

kat · 50 · 185024

0 Members and 2 Guests are viewing this topic.

Offline Franktrog

  • Newbie
    • Posts: 2
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.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
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.


Offline Muhiz

  • Newbie
    • Posts: 2
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: [Select]
# 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)



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


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
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  ;)


Offline Muhiz

  • Newbie
    • Posts: 2
The scripts are the results of other peoples hard work and diligence, KatsBits just tests and hosts. ;D
Ah, yes of course. :)

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.


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.

Welcome by the way  ;)
Thank you. :)



Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Still one or two features to finalise but this works for 2.57 (I'll update the original post here once this script goes final).


Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
Hey kat! Long time no see :)

I guess I can wait on final script. Any ETA on that?


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
MCampagnini (the author) says he's just got multiple UV export to sort out then then script should be done and dusted. No real ETA except "when it's done" ;)


Offline simonheffer

  • Newbie
    • Posts: 2
Hi,

I'm a complete noob as far as blender's concerned and my initial requirement is just to convert various model types to .ase for use with Muvizu.

I've put various export scripts in the scripts/io folder but as for Franktrog nothing appears in the export menu.
It's not in the user prefs stuff either (not sure whether it should have been but just looking for answers  ;) .
I've got the latest Blender 2.58a 64 bit for Win7 64bit.


Do I need an update of some sort?

Si


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
They've changed the location of the "script/io" again in 2.58. For Windows users is should be in the same directory Blender is installed to.. i.e. this is where mine is;

Code: [Select]
D:\Program Files\Blender Foundation\Blender 2.58a\2.58\scripts\addons
You'll notice there's no "io" folder now either, all scripts are dumped into the "addons" folder. If you can't find it, search your system for "addon" that should bring it up. Try those and see if that fixes the problem (I've not yet tested the script with 2.58 yet so don't know if it fully works so keep that in mind).


Offline simonheffer

  • Newbie
    • Posts: 2
Yes, found my copy of that folder but still no joy.
The python parser seems quite picky when I tried the copy-into-text-window route.
I'm trying the Richard Bartlett 2.53 Beta version.
Running the script gave me a greyed out menu item called export-ase.py so it's nearly registered but probably needs some work.
I'll check back when I return from hols.
Thanks for your reply,
Si


Offline motorsep

  • Jr. Member
  • *
    • Posts: 75
Blender 2.59 is out. Has anyone tested ASE exporter with it and can confirm the script is working with 2.59 ? Thanks.


Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Not yet.

[EDIT] no it doesn't. Another internal change breaks the script from 2.56 - 2.58/59; it can be tweaked to appear in the Export list (AddOn) but it's disabled from use.

I don't currently recommend the other one because smoothing is no longer based on marking edges (it's based on angle) so we longer have full control over smooth group assignments - it's too much of a hit-n-miss process to be useful when you're trying to do things properly IMHO.