This commit is contained in:
Chris
2025-09-25 09:55:57 +10:00
parent c5e1cc80a0
commit 3bbcea179b
5 changed files with 40 additions and 23 deletions
+5
View File
@@ -0,0 +1,5 @@
{
"python-envs.defaultEnvManager": "ms-python.python:conda",
"python-envs.defaultPackageManager": "ms-python.python:conda",
"python-envs.pythonProjects": []
}
+11 -3
View File
@@ -35,7 +35,12 @@ export function input_changed(node, slot, connect, link_info) {
if (connect) {
const type = get_type(node, link_info)
if (app.ui.settings.getSettingValue("Use Everywhere.Options.use_output_name") && link_info) {
const out_slot = node.graph.getNodeById(link_info.origin_id)?.outputs[link_info.origin_slot]
var out_slot
if (link_info.origin_id==-10) {
out_slot = node.graph.inputNode?.allSlots[link_info.origin_slot]
} else {
out_slot = node.graph.getNodeById(link_info.origin_id)?.outputs[link_info.origin_slot]
}
node.inputs[slot].label = out_slot?.label || out_slot?.localized_name || out_slot?.name || i18n(type);
} else {
node.inputs[slot].label = i18n(type);
@@ -47,7 +52,7 @@ export function input_changed(node, slot, connect, link_info) {
node.inputs[slot].color_on = undefined;
node.inputs[slot].type = '*'
}
fix_inputs(node, "input_changed")
}
@@ -88,9 +93,12 @@ This is called in various places (node load, creation, link change) to ensure th
var fix_call_message;
function fix_star_inputs(node) {
node.inputs.filter((input)=>(!input.link)).forEach((input)=>{
input.type = '*'
})
node.inputs.filter((input)=>(input.type=='*' && input.link)).forEach((input)=>{
const llink = node.graph.links[input.link]
if (llink.type) input.type = llink
if (llink.type) input.type = llink.type
})
}
+1 -3
View File
@@ -67,14 +67,12 @@ app.registerExtension({
if (this.IS_UE && side==1) { // side 1 is input
input_changed(this, slot, connect, link_info)
// I suspect this is no longer needed... in which case the whole Deferred can be dumped!
if (!shared.graph_being_configured) {
// do the fix at the end of graph change
deferred_actions.push( { fn:fix_inputs, args:[this,"deferred",]} )
deferred_actions.push( { fn:fix_inputs, args:[this,"deferred onConnectionsChange",]} )
// disconnecting doesn't trigger graphChange call?
setTimeout(deferred_actions.execute.bind(deferred_actions), 100)
}
// ...to here
}
linkRenderController?.mark_link_list_outdated();
onConnectionsChange?.apply(this, arguments);
+1
View File
@@ -84,6 +84,7 @@ class GraphAnalyser extends Pausable {
if (node && !node.properties.rejects_ue_links) {
//if (!real_node._widget_name_map) real_node._widget_name_map = real_node.widgets?.map(w => w.name) || [];
node.inputs?.forEach((input,index) => {
if (!input) return; // NoteNode has input = [undefined,] !
if (is_connected(input, treat_bypassed_as_live, node_graph(node))) return;
if (node.reject_ue_connection && node.reject_ue_connection(input)) return;
if (is_connectable(node, input.name)) connectable.push({node, input, index});
+22 -17
View File
@@ -133,29 +133,34 @@ class GraphConverter {
}
}
// fix the localized names
node.inputs = node.inputs.map((input) => {
if (!input.localized_name || input.localized_name.startsWith(i18n('anything'))) input.localized_name = input.name
return input;
node.inputs = node.inputs.forEach((input) => {
if (input) {
if (!input.localized_name || input.localized_name.startsWith(i18n('anything'))) input.localized_name = input.name
} else {
let brteakpoint;
}
})
// set types to match
node.inputs.forEach((input) => {
if (input.type=='*') {
const graph = node_graph(node);
if (input.link) {
const llink = graph.links[input.link];
if (link_is_from_subgraph_input(llink)) {
input.type = get_subgraph_input_type(graph, llink.origin_slot);
if (node.inputs) {
node.inputs.forEach((input) => {
if (input.type=='*') {
const graph = node_graph(node);
if (input.link) {
const llink = graph.links[input.link];
if (link_is_from_subgraph_input(llink)) {
input.type = get_subgraph_input_type(graph, llink.origin_slot);
} else {
input.type = llink.type;
}
} else {
input.type = llink.type;
input.type = (input.label && input.label!=i18n('anything')) ? input.label : input.name
}
} else {
input.type = (input.label && input.label!=i18n('anything')) ? input.label : input.name
}
}
});
});
Logger.log_detail(`clean_ue_node ${node.id} (${node.type})`, node.inputs);
Logger.log_detail(`clean_ue_node ${node.id} (${node.type})`, node.inputs);
}
}
convert_if_pre_116(node) {
@@ -335,7 +340,7 @@ export function get_connection(node, i) {
const in_link = node?.inputs[i]?.link;
if (in_link) {
var llink = graph.links[in_link]
llink = handle_bypass(llink, llink.type)
llink = handle_bypass(llink, llink.type, graph)
if (!llink) {
Logger.log_problem(`handle_bypass failing - subgraph issue?`)
llink = graph.links[in_link]