Skip to content

Conversation

@BrendanParmer
Copy link
Owner

@BrendanParmer BrendanParmer commented Nov 16, 2025

Issues

Changes

  • Support for exporting multiple node groups!
    • In script mode, all node groups are created when the script is run
    • In add-on mode, node groups are split out into separate modules. Explicitly added objects each get their own operator. Direct dependencies will go in the module for their object, unless shared by multiple objects, in which case they'll go in a common_* module.
  • Big refactor to how node groups are exported was needed to support this
  • Code is now split into two modules
    • export handles the logic of reading the node groups and spitting out Python code
    • ui defines configuration settings, as well as the UI layout of NodeToPython
  • NTP_OT_* operators are now removed in favor of NodeTreeExporter classes.
    • This allows for exporting node trees independent of being attached to an operator.
    • This also allowed for consolidating some duplicate code
    • A base operator NTP_OT_Export (export/ntp_operator.py) now sets up the options, initializes the files, and determines the node tree export order, which is important for resolving dependencies.
    • NTP_OT_Export then delegates responsibility for actually exporting the node trees to individual NodeTreeExporters.
  • Generated node trees are now referenced using a node_tree_names dictionary, which maps node tree creation functions to the node tree's assigned name after the function has been called. This avoid node tree duplication, while referencing node trees in a safe manner.
  • Added typing to the list of standard modules to import

UI

  • Changed name_override option to just name, as we can have multiple node groups potentially
  • Added default for name ("My Addon-on")
  • Add-on mode export_icon is more appropriate, now FILE_FOLDER (previously CONSOLE)
  • Export button now prompts user to add node groups when none are added
  • Export button now disabled when location is empty

@BrendanParmer BrendanParmer added this to the v4.0 milestone Nov 16, 2025
@BrendanParmer BrendanParmer self-assigned this Nov 16, 2025
@BrendanParmer BrendanParmer added the enhancement New feature or request label Nov 16, 2025
@BrendanParmer BrendanParmer merged commit 7952fc7 into v4.0 Nov 17, 2025
@BrendanParmer BrendanParmer deleted the MultipleNodeGroups branch November 17, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants