BrendanParmer / NodeToPython

Convert Blender node groups to a Python add-on
MIT License
236 stars 21 forks source link

Why can't the NodeSocket of the node group be automatically generated? #50

Closed chenpaner closed 1 year ago

chenpaner commented 1 year ago

Why can't the node group automatically generate the corresponding NodeSocket after using the plug-in to export python in blender 3.5? Snipaste_2023-05-23_16-09-54

Snipaste_2023-05-23_16-14-48

BrendanParmer commented 1 year ago

Hi @chenpaner, thanks for pointing out this bug. The latest commit should fix this, let me know if you're still having any issues

chenpaner commented 1 year ago

I've updated to yesterday's version 2.1, but there's this bug!

Python: Traceback (most recent call last): File "C:\Users\CP\AppData\Roaming\Blender Foundation\Blender\Big addons\addons\NodeToPython\materials.py", line 212, in execute process_mat_node_group(nt, 2, node_vars, used_vars) File "C:\Users\CP\AppData\Roaming\Blender Foundation\Blender\Big addons\addons\NodeToPython\materials.py", line 169, in process_mat_node_group process_mat_node_group(node_nt, level + 1, node_vars, used_vars) File "C:\Users\CP\AppData\Roaming\Blender Foundation\Blender\Big addons\addons\NodeToPython\materials.py", line 192, in process_mat_node_group if img.source in {'FILE', 'GENERATED', 'TILED'}: AttributeError: 'NoneType' object has no attribute 'source'

Snipaste_2023-05-25_00-55-14

BrendanParmer commented 1 year ago

Should be fixed now, thanks for reporting! If you find any other bugs submit a new issue and I'm happy to take a look

chenpaner commented 1 year ago

I have tried the latest version and it works fine, thank you so much! By the way, you wrote version 2.1.1, but in fact the plugin wrote 2.1.0!