[FREE] AutoSizeComments

@Louspirit For the plugin to function, I need a unique id for each node on the graph which will persist after closing the editor. Usually this is simply found by accessing Node->NodeGuid. Unlike other graphs the nodes you see on a control rig graph are proxy nodes and their NodeGuid is randomized every time you reopen the graph. I couldn’t figure out a way to get around this, so it is disabled.

OK.
I have another bug that may be related to what you’re talking about. Quite often, when I open a blueprint, each comment is in place but not connected to the underlaying nodes anymore. I have to reselect them individually and press Alt to join them.

Sadly this is a ongoing bug which I have not figured out and you might be onto something here. Perhaps somehow all the nodes are regenerating their GUID for some reason.

I should try add some check for this and display an error message so I can confirm this is the case.

Indeed it could mess up blueprints with many comments pretty bad.
Tell us if we can help by providing logs after repro etc.

Maybe you can run auto-include for comments when incorrect GUID are found?

1 Like

Just wanted to say I use comments so much more and my graphs are 500% more understandable when I come back to them 6 months later. Thanks for the awesome plugin :sparkling_heart:

2 Likes

Thank you for awesome plugin , I have been using it for quite sometime, only issues I had so far were with control rig graphs and when trying to copy codes & code with comments on blueprintue website ( this crashes the editor sadly).

Thanks @BULLSEYEliTe, sadly Control Rig graphs are unable to work correctly due to the way this graph works in the background.

Do let me know if you have a replicable case for the blueprintue crash, I’ll have a look at this.

1 Like

I tried copy and pasting this into a material graph which does for a split second before crash , Currently on 5.3.2 Launcher, win11.

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION writing address 0x00000000000000c8
UnrealEditor_UnrealEd
UnrealEditor_AutoSizeComments!SAutoSizeCommentsGraphNode::ResizeToFit() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AutoSizeComments\Source\AutoSizeComments\Private\AutoSizeCommentsGraphNode.cpp:1496]
UnrealEditor_AutoSizeComments!SAutoSizeCommentsGraphNode::UpdateRefreshDelay() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AutoSizeComments\Source\AutoSizeComments\Private\AutoSizeCommentsGraphNode.cpp:1221]
UnrealEditor_AutoSizeComments!SAutoSizeCommentsGraphNode::Tick() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\AutoSizeComments\Source\AutoSizeComments\Private\AutoSizeCommentsGraphNode.cpp:440]
UnrealEditor_SlateCore
UnrealEditor_GraphEditor
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_SlateCore
UnrealEditor_Slate

Hmm this is an interesting bug. So there seems to be an engine bug where the material graph comment is not initialized correctly. If you look at this comment that is copied from blueprintue:

Begin Object Class=/Script/UnrealEd.MaterialGraphNode_Comment Name="MaterialGraphNode_Comment_3" ExportPath="/Script/UnrealEd.MaterialGraphNode_Comment'/Engine/Transient.M_VDB02:MaterialGraph_0.MaterialGraphNode_Comment_3'"
   bCommentBubbleVisible_InDetailsPanel=False
   CommentDepth=-2
   NodePosX=-1552
   NodePosY=-432
   NodeWidth=1213
   NodeHeight=711
   bCommentBubblePinned=False
   bCommentBubbleVisible=False
   NodeComment="Blackbody from Temperature"
   NodeGuid=72D8BBC04CCD07ADA0864CBA120A480C
End Object

and compare it to a normal comment you create on a graph:

Begin Object Class=/Script/UnrealEd.MaterialGraphNode_Comment Name="MaterialGraphNode_Comment_16" ExportPath="/Script/UnrealEd.MaterialGraphNode_Comment'/Engine/Transient.BA_MATERIAL:MaterialGraph_0.MaterialGraphNode_Comment_16'"
   Begin Object Class=/Script/Engine.MaterialExpressionComment Name="MaterialExpressionComment_16" ExportPath="/Script/Engine.MaterialExpressionComment'/Engine/Transient.BA_MATERIAL:MaterialGraph_0.MaterialGraphNode_Comment_16.MaterialExpressionComment_16'"
   End Object
   Begin Object Name="MaterialExpressionComment_16" ExportPath="/Script/Engine.MaterialExpressionComment'/Engine/Transient.BA_MATERIAL:MaterialGraph_0.MaterialGraphNode_Comment_16.MaterialExpressionComment_16'"
      SizeX=400
      SizeY=100
      Text="Comment"
      MaterialExpressionEditorX=-1831
      MaterialExpressionEditorY=1255
      MaterialExpressionGuid=A73E8B8243EE582D38532886B9C7458D
   End Object
   MaterialExpressionComment="/Script/Engine.MaterialExpressionComment'MaterialExpressionComment_16'"
   bCommentBubbleVisible_InDetailsPanel=False
   NodePosX=-1831
   NodePosY=1255
   bCommentBubblePinned=False
   bCommentBubbleVisible=False
   NodeComment="Comment"
   NodeGuid=DE75286A499BC870FB6FE989C3CA7F2F
End Object

You can see that is is malformed and when you copy it into the material graph certain variables are not initialized properly. Without AutoSizeComments installed, if you try to resize this malformed comment it will also crash.

I’m not exactly sure how to generate this malformed comment. Perhaps it might have been an issue from upgrading the material from an old unreal version?

Anyway I believe this issue requires an engine source change. When I have some time, I might try to make a pull request to fix this.

1 Like

Thanks for looking into it and sorry I mistook it as plugin’s fault, I should’ve tested it with plugin disabled but I blame my laziness for it.

Hello, is the support for Metasound graphs on the roadmap?

Hi @Louspirit, sadly no.

I had a bug report recently about this graph not working and looked into it. The workflow to register the ASC graph node factory is being overriden by how MetaSound module and I couldn’t see a good way of working around this.

This issue happens really often to me and mess up lots of bp comments, can we try troubleshoot it?

Couldn’t it be related to source control? Feel likes it appears more when enabled.

I am using this plugin for GIT : GitHub - ProjectBorealis/UEGitPlugin: Unreal Engine Git Source Control Plugin (refactored)

Edit: finally it happens also when source control disabled…

Hi Louspirit, I have fixed an issue with this in 3.2.4 but this could also be caused by source control.

A few questions:

  • Are your other team members also using the ASC plugin?
  • In your settings, what is the “Cache Save Method” set to (defaults to Package Meta Data)?

Hello,

I am using 3.2.4 (I’m not sure if the bug happens more frequently because of the last update or because I reset my Saved folder recently).
I try recurrently exporting the Editor Preferences, but there is an engine bug I think, because the file’s never exported.

Are your other team members also using the ASC plugin?

Yes, but mostly, I am the one editing the BP code, and it happens several times by work session.
To the point I fear adding new nodes to comments and certainly not pressing ctrl+R :scream:

In your settings, what is the “Cache Save Method” set to (defaults to Package Meta Data)?

I use Package Meta Data.

Thanks for your help.:kissing_smiling_eyes:

Edit: I tried switching to File > Plugin, but the issue still occurs.

Yeah sorry about this one, really dumb bug I introduced in a recent commit. You can grab the fix from github otherwise it should be on the marketplace in a few days.

1 Like

Hello,
Thank you, I am released! :smile:

While I’m here, I noticed that the work done by CTRL+SHIFT+R is messed up when I compile the blueprint:
K60Gbwr

Cheers

Hmm, I am not sure why this would be happening. Is it just this case or does it happens for all your comments?

Also what “resizing mode” do you use? (can be found in the ASC settings)

My resizing mode is Reactive.
It happens in some situations (but reproduces at the same place if I reopen the blueprint).
UnrealEditor_Owx5fFpZaG

When I move the comment nodes, I suspect that it has something to do with knot nodes?

If you remove these reroute nodes from the comment, does it fix it? Or does running format add them back in?

Do you perhaps have the setting UseKnotNodePool enabled in the BA plugin? I believe this might also be the cause of this bug.