Skip to content

Commit

Permalink
Vfx/fix/context no blocks (#27)
Browse files Browse the repository at this point in the history
* Don't show block windows when context cant have blocks (output mesh )

* changelog
  • Loading branch information
iTris666 committed Jul 3, 2020
1 parent b48dd26 commit 165c121
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions com.unity.visualeffectgraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ The version number for this package has increased due to a version update of a r
- Prevent capacity from being 0 [Case 1233044](https://issuetracker.unity3d.com/product/unity/issues/guid/1233044/)
- Fix for dragged parameters order when there are categories
- Avoid NullReferenceException in Previous Position Binder" component. [Case 1242351](https://issuetracker.unity3d.com/product/unity/issues/guid/1242351/)
- Don't show the blocks window when context cant have blocks
- Prevent from creating a context in VisualEffectSugraphOperator by draggingfrom an output slot.

## [7.1.1] - 2019-09-05
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ protected override void OnNewController()
m_CanHaveBlocks = blocks.Any(t => controller.model.AcceptChild(t.model));
}

public bool canHaveBlocks { get => m_CanHaveBlocks; }

public static string ContextEnumToClassName(string name)
{
if (name[0] == 'k')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,8 @@ void OnCreateNode(NodeCreationContext ctx)

if (context != null)
{
context.OnCreateBlock(point);
if(context.canHaveBlocks)
context.OnCreateBlock(point);
}
else
{
Expand Down

0 comments on commit 165c121

Please sign in to comment.