Files
miranbrajsa 02676765b4 Enhanced Groups (#6)
* Added forced rate and size properties to python. Implemented client-based show/hide logic.

* Refactoring. Fixed backward-compatibility issues.

* Added VHS' force size and rate functionality.

* Removed 'force_rate' as it didn't make sense in our case.

* Initial refactoring.

* Additional refactoring.

* Added placeholder method for canvas menu extension. Minor refactoring. Updated group menu.

* Bugfix.

* Added logic for storing group's node IDs into group itself.

* Registered 'add group' function.

* Created extended groups folder on startup. Minor cleanup.

* BE refactoring.

* Minor bugfix.

* Implemented basic group fetch from the saved JSON files.

* Minor refactoring.

* Implemented basic graph data load from the version file.

* Trying to import group items into scene without removing the previous content.

* Frame positioning bugfix.

* Final fixes.

* Added saved nodes to graph.

* Updated nodes' ids during load.

* Added groups and links.

* Minor bugfixes.

* Implemented group repositioning depending on the touch location of the menu.

* Updated version structure.

* Implemented version data persistence across serialization and configuration for groups.

* Separated versioned/unversioned groups menu context.

* Implemented unversioned group save.

* Implemented group data update as well as object update upon first group save.

* Implemented existing group save.

* Removed unneeded data ID rewrite.

* Minor stylistic changes.

* Added support for saving as new version.

* Added support for loading old versions.

* Fixed a bug where links wouldn't get stored in a version file.

* Fixed an issue where "null" link would get storred.

* Added last change timestamp so we get more info about a specific version on the client.

* Final link bugfix.

* Minor stylistic changes.

* Group object/value bugfix.

* Added version info to the right of the group name.

* Replaced delete version option and a refresh option. Minor refactoring and cleanup.

* Removed unneeded code.

* Minor bugfix.

* Added more verbose versioning info to groups.

* Minor stylistic changes.

* Implemented versioned group data removal in case that the corresponding history data isn't found in the local comfy history folder.

* Fixed an issue where links from initial group load on an empty canvas weren't displayed.

* Implemented README for enhanced groups.

* Update README.md

* Uploaded images.

* Removed all deprecated versions.

* Fixed an issue where clamp wasn't working.

* Updated the way duration is calculated.

* Bugfix.

* Additional bugfix.

* Made sure that web video player encompases all frames.

* Fixed video generation on the backend.

* Group creation bugfix.

* Moved config and serialization overrides earlier in the group extension lifecycle.

* Fixed an issue where a group wouldn't retain versioning data upon reload.

* Reverted drawing of off-screen nodes.

* Implemented immediate group versioning display in the group title.

* Fixed an issue where the first refresh would cause some nodes not to get deleted.
2024-09-16 23:15:32 +02:00

32 lines
890 B
Python

import os
from folder_paths import base_path
group_extension_folder_path = ""
def setup_version_data(group_data):
storage_data = {
"node_data": {},
}
if "nodes" in group_data:
storage_data["node_data"]["nodes"] = group_data["nodes"]
if "links" in group_data:
storage_data["node_data"]["links"] = group_data["links"]
if "group" in group_data:
storage_data["node_data"]["group"] = group_data["group"]
return storage_data
def setup_group_extension_folders(base_path, source_control_output_path):
path = source_control_output_path
if not os.path.isabs(source_control_output_path):
path = os.path.join(base_path, source_control_output_path)
if not os.path.exists(path):
os.makedirs(path)
return path
group_extension_folder_path = setup_group_extension_folders(base_path, "lnl_enhanced_groups")