Comments (2)
I did some investigation of this issue and found the root of it.
When copying selected nodes, editor allows to copy nodes if any of the nodes can be duplicated/copied. Actual checking for each node is located inside FCustomizableTextObjectFactory::ProcessBuffer. It takes node's class, then its CDO and call CanDuplicateNode(). If we look into UFlowGraphNode's implementation of CanDuplicateNode(), we will see that it requires FlowNode instance to be set, and CDO do not have it, therefore for CDO this function will always return true.
I came up to 4 possible solutions to this issue:
-
(Preffered by me as a general case) Filter out nodes, which can't be duplicated, in CopySelectedNodes. Working example:
-
(Only applicable to Start node) Automaticaly replace Start node to CustomInput node. It would be similar behaviour to copying CustomEvent nodes in Blueprints.
-
Modify UFlowGraphNode::CanDuplicateNode to take into account AssignedNodeClasses. It would be perfectly fine in case of single element in AssignedNodeClasses, but what if there are two classes and each have different bCanDuplicate value? Working(?) example:
-
Store bCanDuplicate directly in UFlowGraphNode. This is not very flexible as for noncopyable custom UFlowNode user would have to specify special UFlowGraphNode with bCanDuplicate == false.
I don't know which fix would be better fit (maybe something else), so leave it to @MothDoctor to decide.
from flowgraph.
Thanks, you have a great ideas to solve this problem, I gonna try those.
from flowgraph.
Related Issues (20)
- Refactor numbered pins support, so it would fully safe to add regular pins
- Component Observer may continue triggering outputs if the last component triggered a finish during UFlowNode_ComponentObserver::StartObserving HOT 3
- Wrong number of newly added output pin on Sequence node HOT 1
- Make LoadRootFlow & LoadSubFlow accessible to Blueprints
- Double-Clicks of Nodes open C++ class. HOT 1
- Play Level Sequence: "Pause at End" does nothing HOT 1
- RootInstances not removing flow graph when graph has finished HOT 3
- Unreal Editor Crashing due to custom node HOT 4
- Reroute node does not format correctly when going in reverse HOT 1
- Alignment feature does not work in the FlowGraph HOT 1
- Add to the "Plugin Downloader" HOT 1
- Palette does not indent headers for sub-categories
- Nodes with Context Pins, loose ALL pins on CTRL+Z / can lead to crash HOT 2
- [Question] I'm curious about how you create and release versions different versions of engine all at once? HOT 1
- Create Welcome window when opening editor with Flow Graph for the first time
- Editor bug: drag pin connection HOT 2
- Copy Pasting comments broken in 5.x
- The Discord Server Link in documentation no longer works
- [Feature] Usability Improvements HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowgraph.