Commit Graph

878 Commits

Author SHA1 Message Date
luc rosenzweig
47187a5b36 Added copyright boilerplate to SGraphNodeMaterialCustom.cpp
#jira UE-146779
#rb jason.nadro

[CL 26678553 by luc rosenzweig in ue5-main branch]
2023-07-28 13:24:36 -04:00
luc rosenzweig
c9eb19e6cd This changelist contains both a refactor of the material graph system, as well as an improved custom HLSL node.
The first series of changes relate to modifying the way that SGraphNode* inheritants are created. Previously, NodeFactory was responsible of creating the SGraphNode* inheritants based on some runtime type checking (which basically means a series of if statements checking if the passed in pointer is of a certain child class type). Now, the UMaterialGraph* inheritants (the controller classes in the MVC paradigm of the material graph) are responsible for creating their own UI components (SGraphNode* inheritants). This just means that we now polymorphically create the proper SGraphNode* for the given UMaterialGraph* inheritant.

This refactor allows us to more flexibly create a variety of nodes types instead of relying on SGraphNodeMaterialBase as a one size fits all solution, leading to the new HLSL custom node. Previously, this node didn't support showing the syntax-highlighted code inline in the node itself. Because we now use polymorphism to create the nodes, it was very easy to create new UMaterialGraph* and SGraphNode* inheritants to support this new change.

Other changes which relate to propagating changes (to affect previews) in MaterialGraphNode.cpp are needed because there previously wasn't the mechanism to do so (which may have been a bug). For instance, suppose you had a constant vector3 feeding into a custom HLSL node which just outputs the color coming from that constant vector3 node. It would be obvious that changing the vector3, requires a preview update of the HLSL node. However, that wouldn't happen - the preview on the HLSL node just stayed the same. These changes addresses that issue.

There is one last series of changes which relates to collapsing the HLSL code in the node. We want to make sure that this change doesn't mess up the layouts of artists' already made material graphs which use the custom HLSL node. In order to address this, we added the ability to collapse the code in order to hide it. Furthermore, we had to make sure that projects which previously used a custom HLSL node, have the code collapsed by default (because it wasn't there before). However, creating a new HLSL node once this change comes in, would yield an uncollapsed node. The collapsing of nodes uses the "Advanced Pins" chevron/collapser which doesn't save its state after saving and exiting the material. It was crucial, in order to preserve the layout of the material graph, that the saving happens. However, previously, the only way to save state, was to go through a recompile/regeneration of the previews. Therefore, it was necessary to add a special function in the material editor utilities which would just mark the material as dirty such that states like whether the code was collapsed save throughout sessions.

#jira UE-146779
#rb jason.nadro

[CL 26677757 by luc rosenzweig in ue5-main branch]
2023-07-28 13:01:00 -04:00
jordan hoffmann
91c069406a [BugFix] False positive "Link Moved" diff callouts on Blueprint Diff tool
#jira UE-186242
#rb dan.oconnor, jodon.karlik

[CL 26558817 by jordan hoffmann in ue5-main branch]
2023-07-24 18:55:16 -04:00
tyson brochu
d5364aa75a GraphEditor: add a new delegate that is called when the user single-clicks on a node
Cloth Editor: fix for interactive tool starting when the user drags a node in the dataflow graph editor


#jira UE-190816
#rb daren.cheng alex.mcadams

[CL 26547957 by tyson brochu in ue5-main branch]
2023-07-24 12:55:46 -04:00
ben hoffman
c5763e7ee0 Add custom styleset support for K2Nodes
#rb JeanMichel.Dignard

#ushell-cherrypick of 26229658 by kristof.morva1

[CL 26232169 by ben hoffman in ue5-main branch]
2023-06-26 09:13:49 -04:00
marc audy
dbe38354bf Remove #pragma once in cpp
#rnx
#jira

[CL 26023553 by marc audy in ue5-main branch]
2023-06-15 15:43:09 -04:00
charles derousiers
8e2b49e234 Fix CIS issue.
#rb none

[CL 26008408 by charles derousiers in ue5-main branch]
2023-06-15 06:30:59 -04:00
charles derousiers
6e8c3956cb Fix CIS issue.
#rb none

[CL 26007973 by charles derousiers in ue5-main branch]
2023-06-15 06:07:01 -04:00
sebastien hillaire
2659a75eed Substrate - added support for progressive simplification of material, starting from operators at the bottom.
#rb none
[FYI] charles.derousiers

[CL 26006829 by sebastien hillaire in ue5-main branch]
2023-06-15 05:22:20 -04:00
charles derousiers
399028fca0 Change Substrate topology node color.
#rb none

[CL 26006822 by charles derousiers in ue5-main branch]
2023-06-15 05:22:15 -04:00
charles derousiers
604f834cb5 Add Subsutrate topology previsualization on the Substrate node within material editor.
#rb none
[FYI] sebastien.hillaire

[CL 26006816 by charles derousiers in ue5-main branch]
2023-06-15 05:22:00 -04:00
marc audy
d1f48fc5c8 Fix implicit capture of this using [=] deprecated in C++20
#jira
#rnx

[CL 25989494 by marc audy in ue5-main branch]
2023-06-14 15:07:58 -04:00
bryan sefcik
62d3f94e73 Removed public module dependencies because they aren't used by the module making them public and they create circular dependency issues.
#preflight 6478a35ec26e3b2449f1afcf
#jira

[CL 25745177 by bryan sefcik in ue5-main branch]
2023-06-01 17:53:45 -04:00
kevin ortegren
0fdb62b687 Expose single click action within SGraphPanel to allow hooking custom logic
#rb JeanMichel.Dignard
#preflight 64764fb58137a37b8558e9bc
#p4v-cherrypick 25675485

[CL 25686356 by kevin ortegren in ue5-main branch]
2023-05-30 16:07:48 -04:00
kirill zorin
de8db5ff76 Converting ARO-facing raw pointers to TObjectPtr ahead of raw pointer ARO API deprecation.
#rb zousar.shaker
#rb markus.breyer
#rb robert.manuszewski

#preflight 646391406b1406b54ab15460

[CL 25489627 by kirill zorin in ue5-main branch]
2023-05-16 10:52:49 -04:00
Steve Robb
042ec884a9 Fixed mismatched copy constructor/assignment operator in FEdGraphNodeHandle and FEdGraphPinHandle.
#rb none
#jira none
#preflight none

[CL 25196861 by Steve Robb in ue5-main branch]
2023-04-26 09:22:13 -04:00
Sebastien Hillaire
12875a6491 Substrate - Editor HUD upgdate.
#preflight https://horde.devtools.epicgames.com/job/6448f21cf451a62211e8eef3
#rb none
#fyi charles.derousiers

[CL 25195523 by Sebastien Hillaire in ue5-main branch]
2023-04-26 06:16:31 -04:00
patrick boutot
7b306e0840 MVVM: Add the FieldNotify pattern to the base Blueprint. The pattern will be removed from the Widget and from the ViewmodelBase class. A BP variable that has the FieldNotify flag will use a different setter. If the variable is replicated, the OnRep function will broadcast the FieldNotification event. FieldNotify variables cannot be used as a ref argument.
#rb dan.oconnor, leon.huang
#jira UE-182297
#preflight 6436d2cef12d5de7056ef8d9

[CL 25026926 by patrick boutot in ue5-main branch]
2023-04-13 11:55:18 -04:00
sara schvartzman
ec292c5aa9 Fix crash when undoing node creation
#jira UE-181748
#rb trivial
#preflight https://horde.devtools.epicgames.com/job/642af8dfc6769c6082c41f15

[CL 24894240 by sara schvartzman in ue5-main branch]
2023-04-03 12:14:12 -04:00
dan oconnor
d2f5aa0de2 Optimize async blueprint context menu building by avoiding resorting and inserting nodes in the desired order
#rb Phillip.Kavan
#jira UE-167392
#preflight 6419ef73ec01de1664d727e3

[CL 24742868 by dan oconnor in ue5-main branch]
2023-03-21 19:49:22 -04:00
dan oconnor
0310413299 Make sure we don't dereference GraphPinObj after GraphData has been invalidated
#rb Phillip.Kavan
#preflight

[CL 24665416 by dan oconnor in ue5-main branch]
2023-03-15 19:45:45 -04:00
sara schvartzman
bc153f9e5e Control Rig: Fix crash when removing dot nodes
#rb helge.mathee
#preflight https://horde.devtools.epicgames.com/job/640f5610af3fc35292bf6d43

[CL 24632731 by sara schvartzman in ue5-main branch]
2023-03-14 06:43:16 -04:00
dan oconnor
2534a73014 Remove needless BroadcastChanged calls, which refresh the entire graph of a blueprint, from various nodes. Add GRAPHACTION_EditNode to synchronously update a node's SGraphNode after a change is made.
Also requires 24595399

#jira UE-158391
#preflight 640f706e0e1f02786bf205d8
#rb Ben.Hoffman

[CL 24623042 by dan oconnor in ue5-main branch]
2023-03-13 17:52:48 -04:00
dan oconnor
d3cf046ac7 Lay groundwork for avoiding SGraphPanel refreshes after making a change to a single node by adding a NotifyNodeChanged routine to UEdGraph, currently implemented to just invoke NotifyGraphChanged with no additional context
#rb Justin.Hare, Andrew.Davidson
#preflight 640a9da7d778f88975ed4702
#jira UE-158391

[CL 24601445 by dan oconnor in ue5-main branch]
2023-03-10 20:03:26 -05:00
sara schvartzman
d0e09f3102 Control Rig: Spline from transforms
#jira UE-173015
#preflight https://horde.devtools.epicgames.com/job/6408cb216c1b9295b9b72053

[CL 24573223 by sara schvartzman in ue5-main branch]
2023-03-09 05:29:59 -05:00