Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VFX] 10.2 fixes #2290

Merged
merged 190 commits into from
Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
645a10e
property attributes not serialized (#253)
julienf-unity Mar 23, 2020
f0e09f2
Remove shader warnings (#261)
julienf-unity Mar 27, 2020
ba38685
Vfx/feature/filter enum (#243)
iTris666 Mar 30, 2020
c0e13e5
Remove raytracing enumerator filter as it was removed from HDRP enum
julienf-unity Mar 31, 2020
6aac856
Remove irrelevant render queues from some HDRP outputs (#263)
julienf-unity Apr 3, 2020
d64a8bd
Fixed Flipbook Texture Names
peeweek Apr 17, 2020
45ab417
Update CHANGELOG.md
Apr 20, 2020
257a4de
Merge pull request #9 from unity/vfx/fix/flipbook-asset-names
Apr 20, 2020
8c9c4b7
Merge remote-tracking branch 'srp/master' into vfx/staging
julienf-unity Apr 20, 2020
3734160
Fix exception when creating new category on new visual effect asset.
iTris666 Apr 21, 2020
6f4f572
Forward port - Dont remove suboutputs objects if it cannot be deseria…
julienf-unity Apr 22, 2020
b0c452e
Merge branch 'master' into vfx/staging
PaulDemeulenaere Apr 24, 2020
c63e6d9
Fix to graft : support for flag enum in inspector
PaulDemeulenaere Apr 29, 2020
3390036
*Update changelog
PaulDemeulenaere Apr 29, 2020
f1f7f8c
Merge pull request #11 from unity/vfx/fix/new-category
iTris666 Apr 29, 2020
4c49282
Merge pull request #13 from unity/vfx/fix/enum-flag-in-inspector
PaulDemeulenaere Apr 30, 2020
f26a487
Revert "Fix Enum Flag" (#15)
PaulDemeulenaere Apr 30, 2020
18803f2
"Fix Enum Flag" (#16)
PaulDemeulenaere Apr 30, 2020
adfdce9
Fix for Initial Event field height, (#17)
iTris666 May 4, 2020
dd47610
Merge remote-tracking branch 'srp/master' into vfx/staging
julienf-unity May 4, 2020
9b568b6
Vfx/fix colorfield height (#19)
iTris666 May 13, 2020
c0f5529
Mesh Sampling (revival) (#1)
PaulDemeulenaere May 14, 2020
b8ec5e0
Update experimental disclaimers (#367)
JordanL8 May 14, 2020
99aacf9
Merge branch 'vfx/staging' of github.com:Unity-Technologies/Graphics …
julienf-unity May 14, 2020
1405b00
[HDRP] MSAA & MotionVector (#12)
PaulDemeulenaere May 14, 2020
0779451
Allow an object slot to have null as its value (#25)
iTris666 May 14, 2020
990ee1c
Vfx/fix/prevent capacity change locked (#24)
iTris666 May 14, 2020
2ad32f1
Merge branch 'master' into vfx/staging
PaulDemeulenaere May 14, 2020
e7f360c
*Update all vfx (had to do it manually...)
PaulDemeulenaere May 14, 2020
ba1d189
Restore missing enty in hdrp changelog (bad resolve conflict from me)
PaulDemeulenaere May 14, 2020
103d2d3
Fix 1233044 - capacity cannot be zero (#21)
julienf-unity May 14, 2020
3463f0c
Vfx/fix/param order (#22)
iTris666 May 14, 2020
3735779
Fix minor issue with VFXPreviousPositionBinder.cs (#23)
PaulDemeulenaere May 14, 2020
fa9dfce
Vfx/fix/sgoperator create context drag (#28)
iTris666 May 18, 2020
0654337
Vfx/fix/context no blocks (#27)
iTris666 May 18, 2020
733b227
PropertyBinder : Minor Fixes (#29)
PaulDemeulenaere May 18, 2020
657a61f
Add Update Modes & Time Access (revival) (#4)
PaulDemeulenaere May 25, 2020
db7d767
Fix editor test
PaulDemeulenaere May 25, 2020
8cab507
Read Attribute in Spawn Context (#6)
PaulDemeulenaere Jun 2, 2020
907b889
Merge branch 'master' into vfx/staging
julienf-unity Jun 7, 2020
2f49340
Update VFX
julienf-unity Jun 7, 2020
78ee098
Misc small fixes (#36)
julienf-unity Jun 11, 2020
eef590a
Test for Override resetted (#26)
PaulDemeulenaere Jun 11, 2020
66aa776
Add test to cover https://fogbugz.unity3d.com/f/cases/1232862/ (#20)
PaulDemeulenaere Jun 11, 2020
7ae1939
New Test : total time is sum of delta time (#7)
PaulDemeulenaere Jun 12, 2020
e7e4645
Merge branch 'master' into vfx/staging
PaulDemeulenaere Jun 12, 2020
ecfc936
Merge branch 'master' into vfx/staging
PaulDemeulenaere Jun 15, 2020
ab25368
[Fix] Disable reset option (#41)
PaulDemeulenaere Jun 15, 2020
d8e8fca
Fix minor issue with PreviousPropertyBinder (bis) (#31)
PaulDemeulenaere Jun 15, 2020
d5c8f55
Fix culture issues when generating attributes defines in shaders (#40)
julienf-unity Jun 15, 2020
6bf79b5
[PropertyBinder] Move Update to LateUpdate (#38)
PaulDemeulenaere Jun 15, 2020
687b56c
Call resyncslots on shadergraph dependent models. (#10)
iTris666 Jun 15, 2020
f376be5
update vfx and settings
julienf-unity Jun 15, 2020
f4a5b2f
Renable 009_MultiCamera in URP project
PaulDemeulenaere Jun 15, 2020
e0c4e37
Easy Wins (Small Workflow / Cosmetic fixes) (#37)
Jun 16, 2020
9f60bf0
Vfx/docs/compatability disclaimer (#43)
JordanL8 Jun 16, 2020
c4865df
Save a specific vfx asset and its sugraphs only (#35)
iTris666 Jun 18, 2020
f4bc4bc
Remove some unecessary compilation (not all) (#46)
julienf-unity Jun 24, 2020
a3bc32d
New TransformVector4 and GetTextureDimensions operators (#18)
julienf-unity Jun 26, 2020
e11292a
Merge remote-tracking branch 'graphics/master' into vfx/staging
julienf-unity Jun 29, 2020
eb3d805
Merge remote-tracking branch 'graphics/master' into vfx/staging
julienf-unity Jun 29, 2020
6ff5aff
Output Event (#5)
PaulDemeulenaere Jun 29, 2020
2b603be
*Fix build
PaulDemeulenaere Jun 29, 2020
0dbb008
Vfx/feature/enum parameter (#8)
iTris666 Jun 29, 2020
0940ed3
Merge branch 'vfx/staging' of github.cds.internal.unity3d.com:unity/v…
julienf-unity Jun 29, 2020
17cf298
Merge branch 'master' into vfx/staging
julienf-unity Jun 29, 2020
4d05d31
Merge remote-tracking branch 'graphics/virtualtexturing-shader-lib-fi…
julienf-unity Jun 30, 2020
5fc843d
Vfx/docs/new operator docs (#50)
JordanL8 Jun 30, 2020
b78a9a6
Fix creation of StringPropertyRM (#51)
iTris666 Jun 30, 2020
30f8704
Fix input of event emitting block beeing to small because of output
iTris666 Jun 30, 2020
36078e9
Multi-mesh output, LODs and compute culling (#14)
julienf-unity Jul 1, 2020
5f6c25b
Simulate headers on enum values in SlotContainerEditor (#49)
iTris666 Jul 1, 2020
dabba9d
Merge remote-tracking branch 'graphics/master' into vfx/staging
julienf-unity Jul 2, 2020
af03309
Update VFX
julienf-unity Jul 2, 2020
a526606
Fix for blackboard scrollable element hidden by resize.
iTris666 Jul 2, 2020
23b0db0
Disable LOD test for XR
julienf-unity Jul 2, 2020
1f5a122
Fix test threshold that was reset to 0...
julienf-unity Jul 3, 2020
fe156b6
Ignoer graphviz folder
julienf-unity Jul 3, 2020
650ffc2
Merge branch 'vfx/staging' of github.cds.internal.unity3d.com:unity/v…
iTris666 Jul 6, 2020
4003aeb
Target Gameobject windows resize doesn't go too far above scrollbars
iTris666 Jul 6, 2020
cfdda19
Merge branch 'master' into vfx/staging
PaulDemeulenaere Jul 9, 2020
e3ba0e6
Missing or incorrect unit in uss.
iTris666 Jul 10, 2020
53a3ca8
fix for reference image "VFX/Execution" not updated to new path ( war…
iTris666 Jul 10, 2020
716c649
Merge branch 'vfx/staging' of github.cds.internal.unity3d.com:unity/v…
iTris666 Jul 16, 2020
e1deab6
Merge remote-tracking branch 'graphics/master' into vfx/staging
julienf-unity Jul 17, 2020
da23eb9
Change description in package.json to reflect VFX is not out of previ…
julienf-unity Jul 17, 2020
89945d1
Simplify linear drag (#67)
iTris666 Jul 17, 2020
a99b1f1
Enable m_CachingShaderPreprocessor (#65)
PaulDemeulenaere Jul 21, 2020
8c8e57a
Fix for node window staying when clicking elsewhere (#68)
iTris666 Jul 22, 2020
40c04ca
Prevent resourcehistory from beeing set to null by serialization (#66)
iTris666 Jul 22, 2020
54114d9
Vfx/docs/system requirements (#69)
JordanL8 Jul 23, 2020
5816cbe
Fix position of block creation window (#72)
iTris666 Jul 23, 2020
56a532e
Fix Missing System Seed Builtin (#70)
PaulDemeulenaere Jul 24, 2020
9bc1fb3
Fix Prefab Highlight for initial event name toggle & override (#71)
PaulDemeulenaere Jul 24, 2020
6838cf2
Add test for Mesh Stripping (#59)
PaulDemeulenaere Jul 24, 2020
a8f2375
Call recreateCopy after recusion test not before. (#52)
iTris666 Jul 27, 2020
c23e884
Uniquify create visual effect gameobject name. Standard behaviour. (#75)
iTris666 Jul 27, 2020
9709d6d
Use the AssetDatabase.FindAsset to find VFXResources asset (#48)
iTris666 Jul 30, 2020
0c8a64b
Added feature: User can specify a directory that holds their VFX temp…
tyanalunas Aug 3, 2020
a7c57f4
Vfx/fix/1246989 normals and scale (#81)
julienf-unity Aug 18, 2020
d738a68
Fix Texture2DArray and Cubemap exposition from sg in output mesh cont…
julienf-unity Aug 19, 2020
84602be
Merge remote-tracking branch 'graphics/master' into vfx/staging
julienf-unity Aug 19, 2020
f73d36d
Temporarily deactivate non uniform scale test (Some files were lost :()
julienf-unity Aug 20, 2020
a4c7bf3
[Test] Enable test to cover properly reset override behavior (#80)
PaulDemeulenaere Aug 24, 2020
3e771e2
int and uint support in Compare (#53)
julienf-unity Aug 25, 2020
453feba
Added render pipeline compatability table (#87)
JordanL8 Aug 27, 2020
2981e68
Fix square complexity on parameter to serialized property matching (#78)
iTris666 Aug 27, 2020
e600d59
Fix vfx view not beeing framed at launch (#79)
iTris666 Aug 27, 2020
42aa588
Fix for the lookup of mixed values in the VisualEffectEditor with obj…
iTris666 Aug 31, 2020
ea2697f
Merge branch 'master' into vfx/staging
PaulDemeulenaere Aug 31, 2020
9ef7a9d
SampleSDF operator (#88)
ludovic-theobald Sep 2, 2020
55f6371
Fix Shadow compilation using shaderGraph (URP/HDRP) (#77)
PaulDemeulenaere Sep 2, 2020
292a833
Fix UInt/Int Condition Reduction (PS4/X1 issue) (#96)
PaulDemeulenaere Sep 3, 2020
dca3c30
Fix 1154328 - infinite recompile with rand (#93)
julienf-unity Sep 10, 2020
cd77446
World to Viewport Point & Viewport to World Point operators + Test (#98)
gabrieldelacruz Sep 10, 2020
7ceeec9
Make null ( not deserializable ) objects part of undo state (#86)
iTris666 Sep 11, 2020
d2b86f6
Fix compile loop in vfxoperator (#61)
iTris666 Sep 11, 2020
a81c07b
Update to visual studio package 2.0.2 (#74)
iTris666 Sep 11, 2020
7049656
Fix SDF Operators and blocks from PR #88 (#94)
ludovic-theobald Sep 15, 2020
683a661
Merge remote-tracking branch 'graphics/mobile/fast-srgb-linear-conver…
julienf-unity Sep 17, 2020
aba779d
Fix Mesh Sampling for PS4/XOne (ByteAddressBuffer) (#91)
PaulDemeulenaere Sep 17, 2020
6f4d5a6
Merge branch 'vfx/staging' of github.cds.internal.unity3d.com:unity/v…
julienf-unity Sep 17, 2020
318b302
Update assets
julienf-unity Sep 18, 2020
6608c91
Update URP tests assets
julienf-unity Sep 18, 2020
963d321
More update to assets
julienf-unity Sep 18, 2020
64fcf79
Remove old gfx tests images ref
julienf-unity Sep 18, 2020
96ffc00
Fix changelog
julienf-unity Sep 18, 2020
293b0d4
Fix Construct Matrix on GPU (#102)
PaulDemeulenaere Sep 21, 2020
eb830bb
Output Event Helpers (#58)
Sep 23, 2020
0958290
Add support for Gradient sampling with and without gradient mode #100
gabrieldelacruz Sep 23, 2020
f6fd8a5
Fix changelog
julienf-unity Sep 24, 2020
192b466
Fix case 1279294 : Invalid Random per component behavior in spawn con…
PaulDemeulenaere Sep 24, 2020
e72745d
Revert "Output Event Helpers" (#110)
PaulDemeulenaere Sep 24, 2020
12afe73
Fix changelog (missing revert)
PaulDemeulenaere Sep 24, 2020
52f3133
Fix changelog : Unexpected carriage return
PaulDemeulenaere Sep 24, 2020
f92c78b
Point cache: Binary format corrupted due to an extra byte offset (#108)
gabrieldelacruz Sep 25, 2020
62def82
Fix InvalidCastException when using byte properties in point cache fi…
gabrieldelacruz Sep 25, 2020
f25625a
Merge remote-tracking branch 'graphics/master' into vfx/staging
julienf-unity Sep 28, 2020
a8b921f
update asset and scripts
julienf-unity Sep 29, 2020
dd4d21a
Remove unwanted files
julienf-unity Sep 29, 2020
eba1a0c
Output Event Helpers (revival) (#111)
PaulDemeulenaere Sep 29, 2020
839ecc7
Merge branch 'master' into vfx/staging
PaulDemeulenaere Sep 30, 2020
d590e41
Fix spawner set attribute/ custom category (#115)
iTris666 Sep 30, 2020
61505d8
Merge branch 'master' into vfx/staging
PaulDemeulenaere Oct 1, 2020
6310a99
Setting ZClip in shadow caster templates (#99)
gabrieldelacruz Oct 1, 2020
55d4afc
Trigger output can start an edge drag [Case 1271691] (#114)
iTris666 Oct 1, 2020
9d3d1f7
Fix and reenable test (#117)
julienf-unity Oct 1, 2020
a90e176
Error display in vfx editor (#33)
iTris666 Oct 1, 2020
a1db362
*Add missing reference image & fix changelog bad merde
PaulDemeulenaere Oct 1, 2020
3de3b7f
Fix bad merge : unexpected change in "ConstantBuffer.cs"
PaulDemeulenaere Oct 2, 2020
368f63c
Fix non uniform scale test (once again)
julienf-unity Oct 2, 2020
ed83bec
Update assets
julienf-unity Oct 2, 2020
2b6fcff
Update URP assets
julienf-unity Oct 2, 2020
3438e7e
Increase error threshold on test 26 (due to sky)
julienf-unity Oct 2, 2020
5b380cf
Fix reference images for shadow test
julienf-unity Oct 4, 2020
0d33ace
Merge remote-tracking branch 'master' into vfx/staging
julienf-unity Oct 5, 2020
9a25692
Fix cascaded type popup width (#124)
iTris666 Oct 5, 2020
d74c0c2
Be resilient to possible null subgraph references. (#120)
iTris666 Oct 6, 2020
c72287d
Merge branch 'master' into vfx/staging
iTris666 Oct 8, 2020
740a296
Fix 101_Exposure on PS4 (#126)
PaulDemeulenaere Oct 8, 2020
368fc26
Forbid creation of context in VisualEffectSubgraphBlock through edge …
iTris666 Oct 8, 2020
85e6af2
Make sure m_DependentDirty is flagged when the strutu change because …
iTris666 Oct 8, 2020
20d6fb9
Fix overlap in properties (#128)
iTris666 Oct 8, 2020
296ffd3
Fix bad merge from c72287dfdb8c9b041db6c6d49582241810c73a9b
PaulDemeulenaere Oct 8, 2020
ad2feb1
Fix Sample installation in URP (#122)
PaulDemeulenaere Oct 9, 2020
be3c497
Four bug fixes for event tester (#123)
iTris666 Oct 9, 2020
2b02eb7
Fix for displaying error from the creation of a node. (#131)
iTris666 Oct 14, 2020
21b236c
Blackboard improvements ( clear unused properties, add output ) (#45)
iTris666 Oct 14, 2020
000dfd9
Merge branch 'master' into vfx/staging
PaulDemeulenaere Oct 14, 2020
128d159
Reset the indentLevel at the end of VisualEffectEditor, also better c…
iTris666 Oct 15, 2020
4c881d0
Un edit nodes that are collapsed (#133)
iTris666 Oct 15, 2020
5137fd9
Fixes https://fogbugz.unity3d.com/f/cases/1268956/ (#125)
iTris666 Oct 15, 2020
02f6be6
Block - Position on SDF (#105)
ludovic-theobald Oct 16, 2020
0f6037d
Fix several URP issue (for 10.2) (#116)
PaulDemeulenaere Oct 19, 2020
145a398
"Create new VisualEffect Graph" creates a graph from the default temp…
iTris666 Oct 20, 2020
8149a8b
fixed spelling (#142)
iTris666 Oct 20, 2020
4012fa9
Positition on SDF - Graphics Tests Fix (#138)
ludovic-theobald Oct 20, 2020
f8a94ec
Update assets
julienf-unity Oct 20, 2020
ae5b232
Fix changelog
julienf-unity Oct 20, 2020
2fb7cba
Merge remote-tracking branch 'graphics/master' into vfx/staging
julienf-unity Oct 20, 2020
4ad6493
More changelog fixes
julienf-unity Oct 20, 2020
08ff952
Add missing warning for other block operator using depth (#140)
PaulDemeulenaere Oct 20, 2020
75b4f58
*Adding missing meta file in TestProject
PaulDemeulenaere Oct 21, 2020
bd6167e
Missing doc & Deprecate VFXViewModicationProcessor (#143)
PaulDemeulenaere Oct 21, 2020
88af45c
Merge branch 'master' into vfx/staging
julienf-unity Oct 21, 2020
81a9cb5
Fix Several issue in Property Binder (#106)
PaulDemeulenaere Oct 21, 2020
660b777
Merge branch 'vfx/staging' of github.cds.internal.unity3d.com:unity/v…
julienf-unity Oct 21, 2020
3e72ca9
Merge remote-tracking branch 'graphics/master' into vfx/staging
julienf-unity Oct 23, 2020
51f3d7d
Fix positionDepthOperator ref images
julienf-unity Oct 23, 2020
6d9dd5c
Merge branch 'master' into vfx/staging
julienf-unity Oct 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Vfx/feature/filter enum (#243)
* Allow filtering enums values in VFXModels.

* Add an explicit GetHashCode() to default NameNType.

* Update CHANGELOG.md

* Update VFXHDRPSubOutput.cs

* fix based on review
  • Loading branch information
iTris666 committed Apr 7, 2020
commit ba38685a101abfe355c9a4499c0234dfade5ea66
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class VFXHDRPSubOutput : VFXSRPSubOutput
[VFXSetting(VFXSettingAttribute.VisibleFlags.InInspector), Header("HDRP"), Tooltip("Specifies when in the render queue particles are drawn. This is useful for drawing particles behind refractive surfaces like frosted glass, for performance gains by rendering them in low resolution, or to draw particles after post processing so they are not affected by effects such as Depth of Field.")]
public TransparentRenderQueue transparentRenderQueue = TransparentRenderQueue.Default;




// Caps
public override bool supportsExposure { get { return true; } }
public override bool supportsMotionVector
Expand All @@ -41,6 +44,18 @@ protected override IEnumerable<string> filteredOutSettings
}
}

public override IEnumerable<int> GetFilteredOutEnumerators(string name)
{
switch (name)
{
case "opaqueRenderQueue":
return new int[] { (int)OpaqueRenderQueue.Raytracing };
case "transparentRenderQueue":
return new int[] { (int)TransparentRenderQueue.Raytracing };
}
return null;
}

public override string GetBlendModeStr()
{
bool isOffscreen = transparentRenderQueue == TransparentRenderQueue.LowResolution || transparentRenderQueue == TransparentRenderQueue.AfterPostProcessing;
Expand Down
1 change: 1 addition & 0 deletions com.unity.visualeffectgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Noise evaluation now performed on CPU when possible
- Range and Min attributes support on int and uint parameters
- New Construct Matrix from Vector4 operator
- Allow filtering enums in VFXModels' VFXSettings.

### Fixed
- Moved VFX Event Tester Window visibility to Component Play Controls SceneView Window
Expand Down
13 changes: 11 additions & 2 deletions com.unity.visualeffectgraph/Editor/Controls/VFXEnumField.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using System;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEditor.VFX.UI;
Expand All @@ -11,6 +14,10 @@ class VFXEnumField : ValueControl<int>
TextElement m_ValueText;
System.Type m_EnumType;

public IEnumerable<int> filteredOutValues { get; set; }

public Action<VFXEnumField> OnDisplayMenu;

void CreateHierarchy()
{
AddToClassList("unity-enum-field");
Expand All @@ -29,13 +36,15 @@ void CreateHierarchy()

void OnClick()
{
if (OnDisplayMenu != null)
OnDisplayMenu(this);
GenericMenu menu = new GenericMenu();

foreach (string val in System.Enum.GetNames(m_EnumType))
{
int valueInt = (int)System.Enum.Parse(m_EnumType, val);

menu.AddItem(new GUIContent(ObjectNames.NicifyVariableName(val)), valueInt == m_Value, ChangeValue, valueInt);
if(filteredOutValues == null || !filteredOutValues.Any(t=>t == valueInt))
menu.AddItem(new GUIContent(ObjectNames.NicifyVariableName(val)), valueInt == m_Value, ChangeValue, valueInt);
}
menu.DropDown(m_DropDownButton.worldBound);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public override string name

public Type portType { get; set; }


IEnumerable<int> IPropertyRMProvider.filteredOutEnumerators { get { return null; } }

public Type storageType
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public VFXSubParameterController[] children
return m_Children;
}
}
IEnumerable<int> IPropertyRMProvider.filteredOutEnumerators { get { return null; } }

VFXCoordinateSpace IPropertyRMProvider.space
{
Expand Down Expand Up @@ -213,6 +214,7 @@ public object value
}
}

IEnumerable<int> IPropertyRMProvider.filteredOutEnumerators { get { return null; } }
public string name
{
get { return m_Min ? "Min" : "Max"; }
Expand Down Expand Up @@ -336,6 +338,7 @@ void OnSlotChanged()
return;
NotifyChange(ValueChanged);
}
IEnumerable<int> IPropertyRMProvider.filteredOutEnumerators { get { return null; } }

Dictionary<string, VFXSubParameterController> m_ChildrenByPath = new Dictionary<string, VFXSubParameterController>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ bool IPropertyRMProvider.editable
bool IPropertyRMProvider.expandableIfShowsEverything { get { return false; } }


IEnumerable<int> IPropertyRMProvider.filteredOutEnumerators { get { return null; } }
public object value
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public virtual bool expandable
}
bool IPropertyRMProvider.expandableIfShowsEverything { get { return false; } }


IEnumerable<int> IPropertyRMProvider.filteredOutEnumerators { get { return (m_Owner as VFXModel).GetFilteredOutEnumerators(name); } }

public virtual string iconName
{
get { return portType.Name; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ interface IPropertyRMProvider
Type portType { get; }
int depth {get; }
bool editable { get; }

IEnumerable<int> filteredOutEnumerators { get; }
void RetractPath();
void ExpandPath();
}
Expand Down Expand Up @@ -67,6 +69,9 @@ object IPropertyRMProvider.value
m_Setter((T)value);
}
}

IEnumerable<int> IPropertyRMProvider.filteredOutEnumerators { get { return null; } }

string IPropertyRMProvider.name
{
get { return m_Name; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
using System.Reflection;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEditor.UIElements;
using UnityEditor.VFX;
using UnityEditor.VFX.UIElements;
using Object = UnityEngine.Object;
using Type = System.Type;
using EnumField = UnityEditor.VFX.UIElements.VFXEnumField;
using VFXVector2Field = UnityEditor.VFX.UI.VFXVector2Field;
using VFXVector4Field = UnityEditor.VFX.UI.VFXVector4Field;

namespace UnityEditor.VFX.UI
{
Expand Down Expand Up @@ -40,7 +33,15 @@ public override float GetPreferredControlWidth()

public override ValueControl<int> CreateField()
{
return new EnumField(m_Label, m_Provider.portType);
var field = new EnumField(m_Label, m_Provider.portType);
field.OnDisplayMenu = OnDisplayMenu;

return field;
}

void OnDisplayMenu(EnumField field)
{
field.filteredOutValues = provider.filteredOutEnumerators;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,28 @@ protected virtual SerializedProperty FindProperty(VFXSetting setting)
return serializedObject.FindProperty(setting.field.Name);
}

struct NameNType
{
public string name;
public Type type;

public override int GetHashCode()
{
return name.GetHashCode() * 23 + type.GetHashCode();
}
}

public virtual void DoInspectorGUI()
{
var slotContainer = targets[0] as VFXModel;
IEnumerable<VFXSetting> settingFields = slotContainer.GetSettings(false, VFXSettingAttribute.VisibleFlags.InInspector);
List<VFXSetting> settingFields = slotContainer.GetSettings(false, VFXSettingAttribute.VisibleFlags.InInspector).ToList();

for (int i = 1; i < targets.Length; ++i)
{
IEnumerable<VFXSetting> otherSettingFields = (targets[i] as VFXModel).GetSettings(false, VFXSettingAttribute.VisibleFlags.InInspector);
IEnumerable<VFXSetting> otherSettingFields = (targets[i] as VFXModel).GetSettings(false, VFXSettingAttribute.VisibleFlags.InInspector).ToArray() ;

settingFields = settingFields.Intersect(otherSettingFields);
var excluded = new HashSet<NameNType>(settingFields.Select(t => new NameNType() { name = t.name, type = t.field.FieldType }).Except(otherSettingFields.Select(t => new NameNType() { name = t.name, type = t.field.FieldType })));
settingFields.RemoveAll(t => excluded.Any( u=> u.name == t.name));
}

foreach (var prop in settingFields.Select(t => new KeyValuePair<FieldInfo, SerializedProperty>(t.field, FindProperty(t))).Where(t => t.Value != null))
Expand All @@ -59,6 +71,32 @@ public virtual void DoInspectorGUI()
prop.Value.stringValue = strings[result];
}
}
else if(prop.Key.FieldType.IsEnum)
{
GUIContent[] enumNames = null;
int[] enumValues = null;

Array enums = Enum.GetValues(prop.Key.FieldType);
List<int> values = new List<int>(enums.Length);
for (int i = 0; i < enums.Length; ++i)
{
values.Add((int)enums.GetValue(i));
}

foreach (var target in targets)
{
VFXModel targetIte = target as VFXModel;

var filteredValues = targetIte.GetFilteredOutEnumerators(prop.Key.Name);
if (filteredValues != null)
foreach (int val in filteredValues)
values.Remove(val);
}
enumNames = values.Select(t => new GUIContent(Enum.GetName(prop.Key.FieldType, t))).ToArray();
enumValues = values.ToArray();

EditorGUILayout.IntPopup(prop.Value,enumNames,enumValues );
}
else
{
bool visibleChildren = EditorGUILayout.PropertyField(prop.Value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ public virtual bool hasMotionVector

protected VFXAbstractRenderedOutput(VFXDataType dataType) : base(VFXContextType.Output, dataType, VFXDataType.None) {}



public override IEnumerable<int> GetFilteredOutEnumerators(string name)
{
return subOutput.GetFilteredOutEnumerators(name);
}
public VFXSRPSubOutput subOutput
{
get
Expand Down
3 changes: 2 additions & 1 deletion com.unity.visualeffectgraph/Editor/Models/VFXModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ private bool SetSettingValueAndReturnIfChanged(string name, object value)

// Override this method to update other settings based on a setting modification
// Use OnIvalidate with KSettingChanged and not this method to handle other side effects
protected virtual void OnSettingModified(VFXSetting setting) {}
protected virtual void OnSettingModified(VFXSetting setting) { }
public virtual IEnumerable<int> GetFilteredOutEnumerators(string name) { return null; }

public virtual VFXSetting GetSetting(string name)
{
Expand Down