Results 1 to 13 of 13
  1. #1
    Member OrchidFace's Avatar
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    335

    [Addon] Unity Simple Export

    Holy cow its been a long time since I posted here! I wrote an exporter addon people working with Unity might be interested in. Its meant to be ultra fast for simple static mesh assets. Your model comes into unity as a single mesh (with submaterials if needed) and 0, 0, 0 on all transforms (including rotation). It uses Empties to represent props, so you can export multiple assets from a single blender scene. I find this useful for sets of related props. It also supports Dupligroups (if any one uses those, I certainly do). I wrote it for my own production, but I figured someone else might find it useful.



    I was too lazy to put it on the wiki. I hope a zip attachment is sufficient.

    UnitySimpleExport_v1_4.zip

    EDIT - I've stopped supporting this script, and removed the video showing how to use it. I'm leaving the file here if you want it, but use it at your own risk.

    Danny
    Last edited by OrchidFace; 24-Jan-17 at 00:27.



  2. #2
    Member Spirou4D's Avatar
    Join Date
    Jul 2010
    Location
    Lille, France
    Posts
    1,235
    Hi Orchidface,


    Very nice add-on very useful. I have a remark, if I can, it's not very difficult to add a popup menu to setup the URI to the assetfolder or a textbox in the tool panel to write the URI... I had yet make this kind of code here:
    http://wiki.blender.org/index.php/De...pets/Interface

    Good Luck!
    Spirou4D
    Words are Images that loosed Light!
    Linux Mint 18.1 Serena Bi-Quad Intel 2.66Ghz x64Bytes - Nvidia OpenGL GT 630 4Go-vram



  3. #3
    nice work, but I have still some like this: 0 out of 0 props have exported



  4. #4
    Member OrchidFace's Avatar
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    335
    Originally Posted by Spirou4D View Post
    Hi Orchidface,


    Very nice add-on very useful. I have a remark, if I can, it's not very difficult to add a popup menu to setup the URI to the assetfolder or a textbox in the tool panel to write the URI... I had yet make this kind of code here:
    http://wiki.blender.org/index.php/De...pets/Interface

    Good Luck!
    Spirou4D
    Ah that does look pretty strait forward. I'll have to look into that.

    Originally Posted by floo View Post
    nice work, but I have still some like this: 0 out of 0 props have exported
    You've made sure the empty is a cube type? In the tutorial I use plain axes but I changed the script to only look for cube empties now so that you can use other empty types for other things and not have it mess with the exporter.



  5. #5



  6. #6
    Looks really useful. Needs a GUI element though. Maybe an "Export To Unity" panel in the Export tab, with a directory selector as Spirou4D mentioned and a button. Or, preferably (to keep the UI consistent), an entry in the File > Export menu.



  7. #7
    Argh - I'd really love this awesome Addon, OrchidFace - it looks just like what I need to highly optimize my workflow.

    However I keep getting permission errors - I presume it's due to me being on OSX and the Unix OS behind is different / you being on Windows? Not sure, I'm not familiar with how this works, here's my error message, any help would be highly appreciated, thank you very much

    ****

    Traceback (most recent call last):
    File "/Users/fritslyneborg/Library/Application Support/Blender/2.74/scripts/addons/UnitySimpleExport_v1_2.py", line 34, in execute
    bpy.ops.wm.save_mainfile() #simply saves
    File "/Applications/Blender/blender.app/Contents/MacOS/../Resources/2.74/scripts/modules/bpy/ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
    RuntimeError: Error: Cannot open file untitled.blend@ for writing: Permission denied


    location: <unknown location>:-1



  8. #8
    Member OrchidFace's Avatar
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    335
    Originally Posted by FritsLyneborg View Post
    Argh - I'd really love this awesome Addon, OrchidFace - it looks just like what I need to highly optimize my workflow.

    However I keep getting permission errors - I presume it's due to me being on OSX and the Unix OS behind is different / you being on Windows? Not sure, I'm not familiar with how this works, here's my error message, any help would be highly appreciated, thank you very much

    ****

    Traceback (most recent call last):
    File "/Users/fritslyneborg/Library/Application Support/Blender/2.74/scripts/addons/UnitySimpleExport_v1_2.py", line 34, in execute
    bpy.ops.wm.save_mainfile() #simply saves
    File "/Applications/Blender/blender.app/Contents/MacOS/../Resources/2.74/scripts/modules/bpy/ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
    RuntimeError: Error: Cannot open file untitled.blend@ for writing: Permission denied


    location: <unknown location>:-1
    Did you save the file as something first? Or is it a fresh unsaved untitled file?



  9. #9
    Originally Posted by OrchidFace View Post
    Did you save the file as something first? Or is it a fresh unsaved untitled file?
    First: Wow - I was certain I had double checked that -- but you are right; I had not!

    Second: Yaw! - When I do everything correct, just nothing happens! No message in the console, no file saved, it's like I never started your script.

    * I have saved first (now - the reason I had not before must have been that I thought I did something wrong when I got no feedback, so I must have been irratic in my testing - sorry)

    * Everything has a material

    * I have also tried to leave the path as "", and even "\\" with the same result: Nothing saved next to the .blend file, and no mesage what so ever in the console.

    * I have uninstalled and installed and opened fres files as I'm trying not to look even more like a fool It appears - at least to me - that there's just no feedback what so ever, no matter what - only if I am not saving first, I get the permission-error.

    * I have tried to mess about in other ways, to see if 'anybody is there' - and yes: All is responsive, look at something like this error message for example, provoked on purpose:

    ***
    Traceback (most recent call last):
    File "/Applications/Blender/blender.app/Contents/MacOS/../Resources/2.74/scripts/modules/addon_utils.py", line 306, in enable
    mod = __import__(module_name)
    File "/Users/fritslyneborg/Library/Application Support/Blender/2.74/scripts/addons/UnitySimpleExport_v1_2.py", line 2
    Path = “greencheese” # absolute path with a double backslash at the end. Blank quotes ("") will dump into the current .blend path.
    ^
    SyntaxError: invalid character in identifier

    ***

    Thanks a lot - any help is highly appreciated, I feel I'm so close to a better workflow..



  10. #10
    Member OrchidFace's Avatar
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    335
    Originally Posted by FritsLyneborg View Post
    First: Wow - I was certain I had double checked that -- but you are right; I had not!

    Second: Yaw! - When I do everything correct, just nothing happens! No message in the console, no file saved, it's like I never started your script.

    * I have saved first (now - the reason I had not before must have been that I thought I did something wrong when I got no feedback, so I must have been irratic in my testing - sorry)

    * Everything has a material

    * I have also tried to leave the path as "", and even "\\" with the same result: Nothing saved next to the .blend file, and no mesage what so ever in the console.

    * I have uninstalled and installed and opened fres files as I'm trying not to look even more like a fool It appears - at least to me - that there's just no feedback what so ever, no matter what - only if I am not saving first, I get the permission-error.

    * I have tried to mess about in other ways, to see if 'anybody is there' - and yes: All is responsive, look at something like this error message for example, provoked on purpose:

    ***
    Traceback (most recent call last):
    File "/Applications/Blender/blender.app/Contents/MacOS/../Resources/2.74/scripts/modules/addon_utils.py", line 306, in enable
    mod = __import__(module_name)
    File "/Users/fritslyneborg/Library/Application Support/Blender/2.74/scripts/addons/UnitySimpleExport_v1_2.py", line 2
    Path = “greencheese” # absolute path with a double backslash at the end. Blank quotes ("") will dump into the current .blend path.
    ^
    SyntaxError: invalid character in identifier

    ***

    Thanks a lot - any help is highly appreciated, I feel I'm so close to a better workflow..
    I posted a newer version (v1_4) in the original post. You're path is greencheese? Is that a valid path? Don't you need a drive or something? Also use all double backslashes (I didn't explain this in previous versions). If you want the file to dump into the same path as your .blend you can do blank quotes like "". You might try that to debug if your path string is the issue.

    Also make sure to use a cube empty. It wasn't shown in the tutorial video because I added that later. I tried to include that in the video annotations. Additionally make sure your stuff is parented properly. To find more information toggle the system console in Window.

    As people have mentioned I really need a UI for this addon and save the string into blender user preferences, but this feature wouldn't save me any time and it would take me a long time to implement (because I've never done any GUI stuff with the blender API) so its hard for me to justify doing it when my game is pressing and my money is dwindling. I hope you can get it working let me know if "" as the path works.
    Last edited by OrchidFace; 06-May-15 at 02:20.



  11. #11
    Refresh the topic.

    Hello all.
    Does anyone have guide.
    Video no longer works.



  12. #12
    Member OrchidFace's Avatar
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    335
    Originally Posted by Ron82 View Post
    Refresh the topic.

    Hello all.
    Does anyone have guide.
    Video no longer works.
    Sorry about this. I decided to stop supporting the script so I took down the video. I still use the script every day, but since so few people seemed to be interested in it, it didn't seem worth it to maintain it.



  13. #13
    Hi, i am in need of a script that exports multiple files from one blend file into many .blend/.fbx files. Im sure blender used to do this back in the day. Does your script maintain the position of the meshs that it is exporting ? if you are not sure do you mind if i take it and try and modify it ?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •