Let a function node's own settings be edited
A python node's params reach process() as whatever its author put there, but there was no way to put anything there: the settings form is built from a type's declared schema, and a function node declares none. Node types now say whether they take settings beyond their schema, and the panel offers a key/value editor for the ones that do — named, typed as text, number, on/off or JSON, and laid out like the port list beside it. Rows are keyed by position rather than by name, so renaming a setting does not remount the row and lose what was being typed into it. Verified in the running app in both themes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011LF61rxW1FG5YCD2J9YqjY
This commit is contained in:
@@ -831,6 +831,11 @@ export const NodeTypeInfoSchema = {
|
||||
title: 'Has Source',
|
||||
default: false
|
||||
},
|
||||
free_params: {
|
||||
type: 'boolean',
|
||||
title: 'Free Params',
|
||||
default: false
|
||||
},
|
||||
plugin: {
|
||||
anyOf: [
|
||||
{
|
||||
|
||||
@@ -264,6 +264,7 @@ export type NodeTypeInfo = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
has_source?: boolean;
|
||||
free_params?: boolean;
|
||||
plugin?: (string | null);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user