BrendanParmer / NodeToPython

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

Any update for more optimized addon outputs? #127

Open Kereemgd opened 2 months ago

Kereemgd commented 2 months ago

Hi, I was wondering if this addon can produce more raw and structured outputs. I've attached two text files: one contains a handwritten material code, and the other is the output generated by the addon. Do you plan to add a feature that removes lines with default values and default strings to create a cleaner and more structured output, similar to the handwritten version?

Thanks for your attention.

Note: I erased the comments from addon output file.

AddonOutput.txt Rocky_Lava.txt

BrendanParmer commented 2 months ago

It's been on my mind for awhile now. I'd like to add it at some point because the NTP outputs can be a little verbose sometimes. My main concerns are reliability, compatibility between versions of Blender, and the amount of manual effort that'd go into developing and maintaining the feature. Right now I'm leaning towards writing some sort of tool that generates the default state for all nodes for each version of Blender, storing the results in a similar fashion to node_settings.py, but I haven't fully committed to that plan yet

Kereemgd commented 2 months ago

Thanks, waiting with excitement.

Where can ı add a primitive default value blocker in your code ?

BrendanParmer commented 2 months ago

Most of it in your current example is setting the various input sockets. These are set with the _set_input_defaults() function in NodeToPython/ntp_operator.py, which is only called in one place that can be commented out. You may have to set some input sockets manually.

Kereemgd commented 2 months ago

Thanks !