Copy Paste local variable in collapsed graph within function

I have a function MyFunction in my Character BP. Within MyFunction, I have local float NewBlend defined. Also within MyFunction is a Collapsed Graph called MyCollapsedGraph.

Double click on MyCollapsedGraph to edit. Under the Local Variables section in the My Blueprint tab all the local variables from MyFunction appear to be in the scope of MyCollapsedGraph - a scope that probably shouldn’t exist.

Drag out NewBlend as a Get node. Wire it to a Print node. The graph compiles without warnings…

Duplicate or cut / paste the NewBlend node and wire the newly pasted version to the Print node. Compile and see the warning: ‘Scope expected: MyFunction; Scope found: MyCollapsedGraph’ This happens on Set nodes as well.

Seems like this could be a bug. Does it do it if you re-expand your collapsed nodes (or collapsed graph as you called it), copy/paste/duplicate then collapse the nodes again?

Interesting, I never noticed the verbiage on that, I assumed it was called collapsed node throughout. Sorry I can’t be of any help.

No - the problem seems to be Pasting into the collapsed node. If I copy from the expanded version, collapse them, open the collapsed graph, paste - the warning occurs again. If all the cut/copy/paste occurs in the parent and then the nodes collapsed - everything is fine.

‘Collapse Nodes’ is the menu item describing something that can be performed on selected nodes. The resulting node, as it sits in the parent, has ‘Collapsed Graph’ displayed below the node name so that seemed like the thing to call it.

No apologies needed - paste problem is easy enough to avoid but it would be nice see it work correctly.

Hi DavidBN,

Does this occur in a clean, blank project with no additional content or is this limited to one project? Do any other variables produce the same result?

Yes, on a blank project and seemingly all variable types. See

.

Hi DavidBN,

I was able to reproduce this and have entered a bug report, UE-20350, to be assessed by the development staff.

Still same in 4.10.4. I must copy a very big function to another bp but I am not able to do this because of this bug. I think this is a critical bug. Is there a timeline for this?

Hi,

I am happy to report that this has been fixed internally and is slated for a future release. Please keep an eye on the [Announcements and Releases][1] section for release notes.

[1]:

Still happens in 2021 in 4.26. If its still waiting there for 5 years, could you say hi from us?