Skip to content

Commit 0e6114f

Browse files
iTris666julienf-unity
authored andcommitted
Vfx/fix/context no blocks (#27)
1 parent 1c510e2 commit 0e6114f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

com.unity.visualeffectgraph/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111
- Fix for dragged parameters order when there are categories
1212
- Avoid NullReferenceException in Previous Position Binder" component. [Case 1242351](https://issuetracker.unity3d.com/product/unity/issues/guid/1242351/)
1313
- Prevent from creating a context in VisualEffectSugraphOperator by draggingfrom an output slot.
14+
- Don't show the blocks window when context cant have blocks
1415

1516
## [9.0.0] - 2020-07-09
1617

com.unity.visualeffectgraph/Editor/GraphView/Elements/VFXContextUI.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ protected override void OnNewController()
4646
m_CanHaveBlocks = blocks.Any(t => controller.model.AcceptChild(t.model));
4747
}
4848

49+
public bool canHaveBlocks { get => m_CanHaveBlocks; }
50+
4951
public static string ContextEnumToClassName(string name)
5052
{
5153
if (name[0] == 'k')

com.unity.visualeffectgraph/Editor/GraphView/Views/VFXView.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,8 @@ void OnCreateNode(NodeCreationContext ctx)
11041104

11051105
if (context != null)
11061106
{
1107-
context.OnCreateBlock(point);
1107+
if(context.canHaveBlocks)
1108+
context.OnCreateBlock(point);
11081109
}
11091110
else
11101111
{

0 commit comments

Comments
 (0)