Skip to content

Commit bdfc890

Browse files
julienf-unityPaulDemeulenaereiTris666gabrieldelacruzThomas Iché
authored
[10.x.x][VFX] 10.3 backports (#3143)
* Fix Event connected directly to Output Event (revival) #154 * Restore disabled 26_NonUnifomScale due to a wrong merge (need backport to 10.x.x) * [HDRP] Fix debug view material (albedo/normal/...) * Force ui update when shader might be reimported in StaticMeshOutput (#158) * Don't create VFXGraph during import callbacks (#148) * do not Create VFXGraph in import callbacks * error when graph missing. Better test code for asset creation * Select node on create (#166) * Select node on create * Fix for right click in block and add doesn't deselect clicked block * fix for subgraph not being selected on drag and drop * Select converted node/block after convert subgraph * Fix for selection undo separate in some cases. Fixed flow anchor drag context selection. * Fix for undo of add subgraph operator * Dont flag dirty in vfxgraph is the model modified is a copy (#165) * Added excludeFromTAA setting to VFX outputs * Fix Custom Spawn serialization (#132) * Fix case 1294180 : Error feedback throwing an error while changing capacity (#174) * Fix Preset (with exclusion) (#177) * Trick ExcludeFromPreset Since this attribute is declared with "Inherited = false", we can't use it directly on VFXObject. Extend the VFXInfo is valid to filter out preset. * Fix missing ExcludeFromPreset for subgraph * *Update changelog * Fix 1276602 incorrect uchar pcache import (#129) * Base Commit * Updated Documentation with explicit limitations. * Fixed incorrect Merge * Add regression Test * Removed Test as It can't handle Exceptions thrown in Custom Importers * Fixed value divider Co-authored-by: Thomas ICHÉ <[email protected]> * Update gradient test (#151) * Update gradient test * Update CHANGELOG.md Co-authored-by: Julien Fryer <[email protected]> * Fix incorrect compilation condition for linux build (#184) * Fix GPUEvent & SubGraph (#178) * Fix SelectionHasCompleteSystems Detect correctly if there are dependencies due to GPUEvent (or stripAttribute) * Add allDependenciesIncludingNotCompilable in VFXData This helper is usefull for UI + use it in SelectionHasCompleteSystems * Add note without change the beahvior * Remove debug ToArray() * Sample Point Cache operator (#92) * Fix Case 1223747 - NaN caused by normal bending (#181) * [Subgraph] Prevent Pasting Context invalid subgraph (#191) * Fix Mouse Event Binder in player (#175) * Fix missing call to CreateVFXEventAttribute OnValidate is only called in editor, in runtime, we should init cache data with OnEnable * *Update changelog.md * Vfx/docs/bugfixes (#188) * Resolved 1272101 * Resolved 1264943 * Removed uncertainty around 'should' * Resolved 1298031 * Added snippets file * Resolved 1292127 * Fixed typos * Resolved 1295296 Co-authored-by: Lewis Jordan <[email protected]> * Update HDRP project assets * Change VisualEffect inspector "Edit" button to "New" when no asset is set * Spawn State documentation (#195) * Added Spawn State doc * Fixed formatting Co-authored-by: Lewis Jordan <[email protected]> * Added what's new page and moved blocks out one level in the table of … * backout update gradien test * Update ref images + deactivate test 26 * update URP assets * DEactivate test 32 + clean ribbon template vfx Co-authored-by: Paul Demeulenaere <[email protected]> Co-authored-by: Tristan Genevet <[email protected]> Co-authored-by: Gabriel de la Cruz <[email protected]> Co-authored-by: Thomas Iché <[email protected]> Co-authored-by: Thomas ICHÉ <[email protected]> Co-authored-by: Ludovic Theobald <[email protected]> Co-authored-by: Lewis Jordan <[email protected]> Co-authored-by: Lewis Jordan <[email protected]> Co-authored-by: sebastienlagarde <[email protected]>
1 parent d0c4535 commit bdfc890

File tree

312 files changed

+23804
-3404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

312 files changed

+23804
-3404
lines changed

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/CopyPasteTest.vfx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ MonoBehaviour:
603603
blendMode: 1
604604
useAlphaClipping: 0
605605
generateMotionVector: 0
606+
excludeFromTAA: 0
606607
m_SubOutputs:
607608
- {fileID: 8926484042661614564}
608609
cullMode: 0

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/VFXContextTests.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,24 @@ public void MultiLinkSpawnerSpawnerAfterSpawnerInit()
194194
Assert.AreEqual(2, from.outputContexts.Count());
195195
}
196196

197+
198+
[Test] //see fogbugz 1269756
199+
public void Link_Fail_From_Event_To_OutputEvent()
200+
{
201+
var from = ScriptableObject.CreateInstance<VFXBasicEvent>();
202+
var to = ScriptableObject.CreateInstance<VFXOutputEvent>();
203+
Assert.IsFalse(VFXContext.CanLink(from, to));
204+
}
205+
206+
[Test]
207+
public void Link_Fail_From_Event_To_Initialize()
208+
{
209+
//For now, we can't use direct link from event to initialize context.
210+
var from = ScriptableObject.CreateInstance<VFXBasicEvent>();
211+
var to = ScriptableObject.CreateInstance<VFXBasicInitialize>();
212+
Assert.IsFalse(VFXContext.CanLink(from, to));
213+
}
214+
197215
[Test]
198216
public void Link_Fail()
199217
{

TestProjects/VisualEffectGraph_HDRP/Assets/AllTests/Editor/Tests/VFXControllerTests.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,45 @@ public void ConvertToSubgraph()
940940

941941
window.graphView.controller = null;
942942
}
943+
944+
[Test]
945+
public void Subgraph_Event_Link_To_Spawn()
946+
{
947+
VFXViewWindow window = VFXViewWindow.GetWindow<VFXViewWindow>();
948+
window.LoadAsset(AssetDatabase.LoadAssetAtPath<VisualEffectAsset>(testAssetName), null);
949+
950+
//Create Spawner in subgraph
951+
{
952+
var spawner = ScriptableObject.CreateInstance<VFXBasicSpawner>();
953+
m_ViewController.graph.AddChild(spawner);
954+
m_ViewController.LightApplyChanges();
955+
956+
var controller = window.graphView.Query<VFXContextUI>().ToList().Select(t => t.controller).Cast<Controller>();
957+
Assert.AreEqual(1, controller.Count());
958+
VFXConvertSubgraph.ConvertToSubgraphContext(window.graphView, controller, Rect.zero, testSubgraphSubAssetName);
959+
}
960+
961+
var subGraphController = m_ViewController.allChildren.OfType<VFXContextController>().FirstOrDefault(o => o.model is VFXSubgraphContext);
962+
Assert.IsNotNull(subGraphController);
963+
964+
//Create Event Context & Link the two input flow
965+
var subGraphContext = subGraphController.model;
966+
var eventContext = ScriptableObject.CreateInstance<VFXBasicEvent>();
967+
968+
Assert.IsTrue(VFXContext.CanLink(eventContext, subGraphContext, 0, 0));
969+
Assert.IsTrue(VFXContext.CanLink(eventContext, subGraphContext, 0, 1));
970+
971+
eventContext.LinkTo(subGraphContext, 0, 0);
972+
eventContext.LinkTo(subGraphContext, 0, 1);
973+
974+
var flow = eventContext.outputFlowSlot.First().link;
975+
Assert.AreEqual(2, flow.Count());
976+
Assert.IsTrue(flow.All(o => o.context == subGraphContext));
977+
Assert.IsTrue(flow.Any(o => o.slotIndex == 0));
978+
Assert.IsTrue(flow.Any(o => o.slotIndex == 1));
979+
980+
window.graphView.controller = null;
981+
}
943982
}
944983
}
945984
#endif

0 commit comments

Comments
 (0)