Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add unique_id to nodes hidden inputs #299

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

Davemane42
Copy link
Contributor

No description provided.

@classmethod
    def INPUT_TYPES(cls):
        return {
            "hidden": {"unique_id": "UNIQUE_ID"},
        }
@WASasquatch
Copy link
Contributor

WASasquatch commented Mar 28, 2023

It would be cool if instead of unique ID it was the incremental count of the occurrence of a node used as an ID that doubles as the target for node. It can be used to easily differentiate nodes on screen VAEDecover 01 (padded) and be passed like this as a hidden field 1 and which is the ID and occurrence, as well as differentiate in workflow dicts (based on GUI for end users). This way the code can be aware of the how many instances it has in the GUI -- as well as target them.

I feel like a unique ID may be too convoluted to keep track of things (from the static end user side), and with the way nodes may rely on it, and workspace loading issues between sessions or changing because of manual user edit, and other users files or whatever, etc, could cause a lot of issues. Counting nodes and assigning them the IDs seems a lot more flexible and dynamic to whatever is on-screen/loaded.

@Davemane42
Copy link
Contributor Author

I only pass the already existing ID, its the same id as the graph no ID. the same that get save to the workflow. im only passing it along so i can acess node properties that i set with js in python

@WASasquatch
Copy link
Contributor

I only pass the already existing ID, its the same id as the graph no ID. the same that get save to the workflow. im only passing it along so i can acess node properties that i set with js in python

Ooh I get it. The "unique" id part through me off as they usually means a UUID which is usually like a huge 128bit random number identifier that shouldn't ever occur again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants