Page 1 of 2 12 LastLast
Results 1 to 20 of 25

Thread: [Add-on] NodeIO

  1. #1
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288

    [Add-on] NodeIO

    NodeIO, previously MaterialIO, is an import/export add-on for node trees. NodeIO allows things such as materials and other node setups to be saved to a file so they can be used later or distributed without having to share the whole .blend file. Currently, four different node systems are supported:
    1. Cycles nodes
    2. Blender Render nodes
    3. Mitsuba nodes
    4. Animation nodes (from the Animation Nodes add-on)
    5. Sverchok (Group Support Added)


    Latest Release
    The project is hosted on GitHub
    Issues can be reported here

    This add-on is still in the early stage, especially when it comes to Animation nodes and Sverchok, so if anyone finds data that isn't being exported and re-imported, or comes across any errors, then please report them at the link above.
    Last edited by Jacob Morris; 12-Jan-17 at 19:00.



  2. #2
    Member
    Join Date
    Oct 2013
    Location
    Belgium
    Posts
    296
    Thanks works fine with cycles materials , Thanks



  3. #3
    interesting.

    btw, for sverchok we started an ongoing implemention of IO through JSON 2 years ago. ... i feel your pain



  4. #4
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288
    I just added primary support for Sverchok, currently all nodes are importing and exporting and I believe all necessary information is being collected, but more testing is still needed.



  5. #5
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288
    Originally Posted by zeffii View Post
    interesting.

    btw, for sverchok we started an ongoing implemention of IO through JSON 2 years ago. ... i feel your pain
    Adding Sverchok wasn't that bad, about 10 or so lines for initial support. The most interesting part is that SvGetPropNode and SvSetPropNode don't play nice with inspect.getmembers(), which is what my code uses to get fields/attributes. Calling inspect.getmembers() with those nodes leads to a NameError, which is something that I didn't encounter with any of the other node systems I worked on importing and exporting.



  6. #6
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288
    I made a couple commits over the last day that added support for Sverchok groups, as well as fixed some other things, so as far as I can tell everything within Mitsuba, Cycles, BI, Animation, and Sverchok is working correctly.



  7. #7
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288
    I just released a new version to fix to really bad bugs. The one which prevented node setups with groups from being exported and imported properly. The other was with exporting images with Relative filepaths, which wasn't creating the new folder properly for the images.



  8. #8
    Member MmAaXx's Avatar
    Join Date
    Jun 2008
    Location
    Tokyo
    Posts
    1,719
    thanks a lot!



  9. #9
    Member MmAaXx's Avatar
    Join Date
    Jun 2008
    Location
    Tokyo
    Posts
    1,719
    just tested but I get an error while importing a simple material with a group


    Traceback (most recent call last):
    File "C:\Users\Max\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_node.py" , line 716, in execute
    import_node_tree(self, context)
    File "C:\Users\Max\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_node.py" , line 567, in import_node_tree
    o = nt.nodes[link[0]].outputs[link[1]]
    IndexError: bpy_prop_collection[index]: index 1 out of range, size 1

    location: <unknown location>:-1

    here is the dropbox link
    FILE



  10. #10
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288
    Thought I had this fixed...I'll hopefully have a patch up soon



  11. #11
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288
    Ok, this issue does not appear to be with my code, but rather a bug within Blender itself. I have figured out a workaround, but I still haven't determined the best way to implement it.



  12. #12
    Member MmAaXx's Avatar
    Join Date
    Jun 2008
    Location
    Tokyo
    Posts
    1,719
    thankyou for your time.



  13. #13
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288
    Ok, I just added a fix that should workaround the bug within Blender. Groups are now importing properly.



  14. #14
    Member MmAaXx's Avatar
    Join Date
    Jun 2008
    Location
    Tokyo
    Posts
    1,719
    uhmuhm I still got an error

    Traceback (most recent call last):
    File "C:\Users\max\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_node.py" , line 716, in execute
    import_node_tree(self, context)
    File "C:\Users\max\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_node.py" , line 532, in import_node_tree
    i['values'][val_key]))
    File "<string>", line 1, in <module>
    IndexError: bpy_prop_collection[index]: index 0 out of range, size 0

    location: <unknown location>:-1






  15. #15
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288
    Originally Posted by MmAaXx View Post
    uhmuhm I still got an error

    Traceback (most recent call last):
    File "C:\Users\max\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_node.py" , line 716, in execute
    import_node_tree(self, context)
    File "C:\Users\max\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\io_node.py" , line 532, in import_node_tree
    i['values'][val_key]))
    File "<string>", line 1, in <module>
    IndexError: bpy_prop_collection[index]: index 0 out of range, size 0

    location: <unknown location>:-1



    That's odd, I tested several node setups and it worked fine for me. Could you attach a blend file?



  16. #16
    Member MmAaXx's Avatar
    Join Date
    Jun 2008
    Location
    Tokyo
    Posts
    1,719
    sure, here is the link!

    >LINK<


    thankyou!



  17. #17
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288
    Originally Posted by MmAaXx View Post
    sure, here is the link!

    >LINK<


    thankyou!
    Ok, I was able to export and import this material without any errors. Could you post a link to the files that you are trying to import? Also, when you exported the material, did you use relative or absolute dependencies filepaths?



  18. #18
    Member
    Join Date
    Apr 2012
    Location
    Pennsylvania, USA
    Posts
    288
    I just released version 0.5 which includes the workaround for the bug within Blender relating to importing groups. Zipped files are not automatically unzipped and imported, and dependencies are no longer duplicated within the file.



  19. #19
    Member
    Join Date
    Oct 2014
    Location
    Chernivtsi, Ukraine
    Posts
    148
    Thanks a lot



  20. #20
    Member MmAaXx's Avatar
    Join Date
    Jun 2008
    Location
    Tokyo
    Posts
    1,719
    wohoo!

    for some reasons now it works!
    anyway I always use absolute path, not a big fan of relative path.

    THANKYOU!
    you made my day



Page 1 of 2 12 LastLast

Posting Permissions

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