yuki-koyama / blender-cli-rendering

Blender Python scripts for rendering images directly from command-line interface
GNU General Public License v3.0
733 stars 107 forks source link

Error when using cc0assetloader. #21

Closed lemmih closed 4 years ago

lemmih commented 4 years ago

Hi, script number 7 (as well as 8,9,10 and 12) fail with this error:

Blender 2.80 (sub 75)
Traceback (most recent call last):
  File "/home/david/coding/blender-cli-rendering/./07_texturing.py", line 66, in <module>
    focus_target = set_scene_objects()
  File "/home/david/coding/blender-cli-rendering/./07_texturing.py", line 14, in set_scene_objects
    loader.build_pbr_textured_nodes_from_name("Leather05")
  File "/home/david/coding/blender-cli-rendering/external/cc0assetsloader/__init__.py", line 144, in build_pbr_textured_nodes_from_name
    scale=scale)
  File "/home/david/coding/blender-cli-rendering/external/cc0assetsloader/__init__.py", line 124, in build_pbr_textured_nodes
    nodelayout.arrange_nodes(node_tree, use_current_layout_as_initial_guess=False)
AttributeError: module 'nodelayout' has no attribute 'arrange_nodes'

Do I need to install something to make it work?

yuki-koyama commented 4 years ago

Thank you for asking!

This repository uses git submodule to include a dependency, cc0assetsloader https://github.com/yuki-koyama/cc0assetsloader, and so just using git clone or downloading as a zip file does not work.

Also, cc0assetsloader uses git lfs, and so it is more complicated.

I guess the directory ./blender-cli-rendering/external/cc0assetsloader is empty currently. Or, ./blender-cli-rendering/external/cc0assetsloader/nodelayout is empty.

One straightforward solution is to

Another possible solution, which is probably easier, is to

Hope this helps. Sorry for the poor documentation!

lemmih commented 4 years ago

Ah, cloning with --recursive did the trick. I had tried 'git submodule init; git submodule update' but that didn't go deeply enough.