Skip to content

Commit

Permalink
Vfx/fix/context no blocks (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
iTris666 authored and julienf-unity committed Jul 21, 2020
1 parent 67ca602 commit f4e38ea
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 @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
### Fixed
- Prevent from creating a context in VisualEffectSugraphOperator by draggingfrom an output slot.
- Don't show the blocks window when context cant have blocks

## [7.5.0] - 2020-06-08

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 @@ -1102,7 +1102,8 @@ void OnCreateNode(NodeCreationContext ctx)

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

0 comments on commit f4e38ea

Please sign in to comment.