This commit is contained in:
Chris
2025-10-15 11:32:25 +11:00
parent 7157274f67
commit 5aaaaa5e14
5 changed files with 10 additions and 11 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import { any_restrictions, describe_restrictions } from "./ue_properties.js";
import { app } from "../../scripts/app.js";
import { create } from "./use_everywhere_utilities.js";
import { create, is_UEnode } from "./use_everywhere_utilities.js";
import { edit_window } from "./floating_window.js";
import { settingsCache } from "./use_everywhere_cache.js";
@@ -46,7 +46,7 @@ export function maybe_show_tooltip() {
if (!node) return hide_tooltip()
if (edit_window.showing) return hide_tooltip()
if (!(node.IS_UE && any_restrictions(node))) return hide_tooltip()
if (!(is_UEnode(node) && any_restrictions(node))) return hide_tooltip()
if (ue_tooltip_element.showing) return
+3 -4
View File
@@ -1,4 +1,4 @@
import { version_at_least, create } from "./use_everywhere_utilities.js"
import { version_at_least, create, is_UEnode } from "./use_everywhere_utilities.js"
import { i18n, i18n_functional, GROUP_RESTRICTION_OPTIONS, COLOR_RESTRICTION_OPTIONS } from "./i18n.js";
import { shared } from "./shared.js";
import { fix_inputs } from "./connections.js";
@@ -74,7 +74,6 @@ If the graph is still being configured, then that means the node is being create
In that case the properties need to be set later, in setup_ue_properties_onload
*/
export function setup_ue_properties_oncreate(node) {
node.IS_UE = true
if (shared.graph_being_configured) return
if (!node.properties) node.properties = {}
node.properties.ue_properties = {...DEFAULT_PROPERTIES}
@@ -87,7 +86,7 @@ Convert node properties when loaded.
export function setup_ue_properties_onload(node) {
if (!node.properties?.ue_properties) node.properties.ue_properties = {}
if ( !version_at_least(node.properties?.ue_properties?.version, "7.0") ) {
if (node.IS_UE) {
if (is_UEnode(node)) {
// convert a pre 7.0 UE node
node.properties.ue_properties = {
version : VERSION,
@@ -117,7 +116,7 @@ export function setup_ue_properties_onload(node) {
}
function convert_node_types(node) {
if (!node.IS_UE) return
if (!is_UEnode(node)) return
if (node.type=="Anything Everywhere?") {
node.widgets.forEach((w)=>{w.hidden=true})
+2 -2
View File
@@ -64,7 +64,7 @@ app.registerExtension({
const onConnectionsChange = nodeType.prototype.onConnectionsChange;
nodeType.prototype.onConnectionsChange = function (side,slot,connect,link_info,output) {
if (is_combo_clone(this) && !shared.prompt_being_queued) comboclone_on_connection(this, link_info, connect)
if (this.IS_UE && side==1) { // side 1 is input
if (is_UEnode(this) && side==1) { // side 1 is input
input_changed(this, slot, connect, link_info)
if (!shared.graph_being_configured) {
@@ -307,7 +307,7 @@ app.registerExtension({
app.canvas.canvas.addEventListener('litegraph:canvas', (e)=>{
if (e?.detail?.subType=='node-double-click') {
const node = e.detail.node
if (node.IS_UE) {
if (is_UEnode(node)) {
if (app.ui.settings.getSettingValue('Comfy.Node.DoubleClickTitleToEdit') && e.detail.originalEvent.canvasY<node.pos[1]) return
edit_restrictions(null, null, null, null, node)
}
+1 -1
View File
@@ -172,7 +172,7 @@ class GraphConverter {
if (node.properties?.ue_properties?.widget_ue_connectable) return
if (node.properties?.widget_ue_connectable) return // pre 7.0 node which will be converted
if (node.IS_UE) {
if (is_UEnode(node)) {
if (node.properties?.ue_properties?.version) return
this.clean_ue_node(node)
}
+2 -2
View File
@@ -67,8 +67,8 @@ class SeedEverywhere(io.ComfyNode):
)
@classmethod
def execute(cls, string): # type: ignore
return io.NodeOutput(string)
def execute(cls, seed): # type: ignore
return io.NodeOutput(seed)
class AnythingEverywhere(io.ComfyNode):
@classmethod