Skip to content

Commit

Permalink
5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgoringe committed Aug 6, 2024
1 parent e099fe6 commit 1f56c38
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ UE nodes mostly work with group nodes. But there are a couple of important thing

## Latest updates

5.0 (6th August 2024)
- Significant change to core logic. Should greatly reduce incompatibility issues, but may have unexpoected consequences!
- Added to right-click menu on nodes the option to make a node reject all UE connections.

4.9 (2nd May 2024)
- Fix incompatibility with Efficiency Nodes (#182)

Expand Down Expand Up @@ -147,6 +151,10 @@ For more on this, see [this discussion](https://github.com/chrisgoringe/cg-use-e

# Other features

## Reject links

Right click on a node and you can set it to reject UE links

## Show links - visualisation and animation.

If you want to see the UE links, you can turn them on and off by right-clicking on the canvas. For finer control, the main settings menu has options to show links when the mouse moves over the node at either end, or when one of those nodes is selected.
Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .use_everywhere import SeedEverywhere, AnythingEverywherePrompts

UE_VERSION = "4.8.6"
UE_VERSION = "5.0"

NODE_CLASS_MAPPINGS = { "Seed Everywhere": SeedEverywhere }

Expand Down
5 changes: 3 additions & 2 deletions js/use_everywhere.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { LinkRenderController } from "./use_everywhere_ui.js";
import { autoCreateMenu } from "./use_everywhere_autocreate.js";
import { add_autoprompts } from "./use_everywhere_autoprompt.js";
import { GraphAnalyser } from "./use_everywhere_graph_analysis.js";
import { main_menu_settings, node_menu_settings, canvas_menu_settings } from "./use_everywhere_settings.js";
import { main_menu_settings, node_menu_settings, canvas_menu_settings, non_ue_menu_settings } from "./use_everywhere_settings.js";
import { add_debug } from "./ue_debug.js";

/*
Expand Down Expand Up @@ -83,7 +83,8 @@ app.registerExtension({
getExtraMenuOptions?.apply(this, arguments);
if (is_UEnode(this)) {
node_menu_settings(options, this);

} else {
non_ue_menu_settings(options, this);
}
// any right click action can make the list dirty
inject_outdating_into_objects(options,'callback',`menu option on ${this.id}`);
Expand Down
2 changes: 1 addition & 1 deletion js/use_everywhere_graph_analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class GraphAnalyser {
// Look for unconnected inputs and see if we can connect them
live_nodes.filter((node) => !is_UEnode(node)).forEach(node => {
const nd = get_real_node(node.id, Logger.INFORMATION);
if (nd) {
if (nd && !nd.rejects_ue_links) {
var gpData = GroupNodeHandler.getGroupData(nd);
const isGrp = !!gpData;
const o2n = isGrp ? Object.entries(gpData.oldToNewInputMap) : null;
Expand Down
13 changes: 12 additions & 1 deletion js/use_everywhere_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ function priority_boost_submenu(value, options, e, menu, node) {
if (current_element) current_element.style.borderLeft = "2px solid #484";
}

function non_ue_menu_settings(options, node) {
options.push(null);
options.push(
{
content: node.rejects_ue_links ? "Allow UE Links" : "Reject UE Links",
has_submenu: false,
callback: () => { node.rejects_ue_links = !!!node.rejects_ue_links },
}
)
}

function node_menu_settings(options, node) {
options.push(null);
if (has_priority_boost(node)) options.push(
Expand Down Expand Up @@ -168,4 +179,4 @@ function canvas_menu_settings(options) {
options.push(null); // divider
}

export { main_menu_settings, node_menu_settings, canvas_menu_settings }
export { main_menu_settings, node_menu_settings, canvas_menu_settings, non_ue_menu_settings }
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "cg-use-everywhere"
description = "A set of nodes that allow data to be 'broadcast' to some or all unconnected inputs. Greatly reduces link spaghetti."
version = "4.8.6"
version = "5.0"
license = { file = "LICENSE" }

[project.urls]
Expand Down

0 comments on commit 1f56c38

Please sign in to comment.