Skip to content

Commit 8fd9015

Browse files
Thomas Ichéjulienf-unity
authored andcommitted
Easy Wins (Small Workflow / Cosmetic fixes) (#37)
1 parent 2e7166c commit 8fd9015

File tree

66 files changed

+1547
-166
lines changed

Some content is hidden

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

66 files changed

+1547
-166
lines changed

com.unity.visualeffectgraph/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Added
9+
- Added Degrees / Radians conversion subgraphs in samples
10+
811
### Fixed
912
- Prevent from creating a context in VisualEffectSugraphOperator by draggingfrom an output slot.
1013
- Don't show the blocks window when context cant have blocks
@@ -16,6 +19,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1619
- Avoid other NullReferenceException using property binders
1720
- Fix culture issues when generating attributes defines in shaders [Case 1222819](https://issuetracker.unity3d.com/product/unity/issues/guid/1222819/)
1821
- Move the VFXPropertyBinder from Update to LateUpdate [Case 1254340](https://issuetracker.unity3d.com/product/unity/issues/guid/1254340/)
22+
- Properties in blackboard are now exposed by default
23+
- Dissociated Colors for bool, uint and int
24+
- De-nicified attribute name (conserve case) in Set Custom Attribute title
25+
- Changed the default "No Asset" message when opening the visual effect graph window
26+
- Subgraphs are not in hardcoded categories anymore : updated default subgraph templates + Samples to add meaningful categories.
1927

2028
## [7.5.0] - 2020-06-08
2129

com.unity.visualeffectgraph/Documentation~/Blackboard.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ To differentiate between exposed properties and constants, the Blackboard displa
1414

1515
To open the Blackboard, click the **Blackboard** button in the Visual Effect Graph window [Toolbar](VisualEffectGraphWindow.md#Toolbar). To resize the Blackboard, click on any edge or corner and drag. To reposition the Blackboard, click on the header and drag.
1616

17+
### Menu Category
18+
19+
In order to set the Menu path of the currently edited Subgraph, you can double-click the sub-title of the blackboard and enter the desired Category Name, then validate using the Return Key
20+
21+
![Blackboard-Category](Images/Blackboard-Category.gif)
22+
1723
### Creating properties
1824

1925
To create a property, click the plus (**+**) button in the top-right of the Blackboard then select a property type from the menu.
Lines changed: 3 additions & 0 deletions
Loading

com.unity.visualeffectgraph/Documentation~/Subgraph.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can create a System Subgraph using the following:
3030
* Selecting one or Many Systems in a Visual Effect Graph, then selecting "Convert to Subgraph" in the Right-Click context menu, then saving the Graph Asset in the Save File Dialog.
3131
* Creating a subgraph using this method will replace all converted content with a System Subgraph Node.
3232

33-
### Editing Block Subgraphs
33+
### Editing System Subgraphs
3434

3535
You can edit a System Subgraph by opening it in the Visual Effect Graph window:
3636

@@ -79,6 +79,8 @@ Block Subgraphs display a non-removable Context named "Block Subgraph" where Blo
7979
* Context can be customized using the following Properties:
8080
* **Suitable Contexts** : Determine Which Context types are compatible with the Block Subgraph
8181

82+
You can define the Menu Category the subgraph block will appear in the [Blackboard](Blackboard.md)
83+
8284
### Using Block Subgraphs
8385

8486
You can add a Block Subgraph Node to your Graph:
@@ -117,6 +119,8 @@ You can set up Input and Output Properties for the Operator using the Blackboard
117119
* You can create **Input** Properties by adding new Properties and enabling their **Exposed** Flag.
118120
* You can create **Output** Properties by adding new Properties, and moving them to the **Output Category**.
119121

122+
You can define the Menu Category the subgraph block will appear in the [Blackboard](Blackboard.md)
123+
120124
### Using Operator Subgraphs
121125

122126
You can add an Operator Subgraph Node to your Graph:

com.unity.visualeffectgraph/Editor Default Resources/uss/VFXTypeColor.uss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
}
2323
.port.typeboolean
2424
{
25-
--port-color: #9481E6;
25+
--port-color: #d9b3ff;
2626
}
2727
.port.typeuint32
2828
{
29-
--port-color: #9481E6;
29+
--port-color: #6e55dd;
3030
}
3131
.port.typeflipbook
3232
{

com.unity.visualeffectgraph/Editor/FilterPopup/VFXBlockProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public SubgraphBlockDescriptor(SubGraphCache.Item item)
123123
this.item = item;
124124
}
125125

126-
public override string category { get { return "Subgraph Block/" + item.category; } }
126+
public override string category { get { return item.category; } }
127127
public override string name { get { return item.name; } }
128128
}
129129

com.unity.visualeffectgraph/Editor/GraphView/Blackboard/VFXBlackboard.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ void OnAddParameter(object parameter)
358358
VFXParameter newParam = m_Controller.AddVFXParameter(Vector2.zero, (VFXModelDescriptorParameters)parameter);
359359
if (selectedCategory != null && newParam != null)
360360
newParam.category = selectedCategory.title;
361+
362+
newParam.SetSettingValue("m_Exposed", true);
361363
}
362364

363365
void OnAddItem(Blackboard bb)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ protected override IEnumerable<Descriptor> GetDescriptors()
202202
t => new Descriptor()
203203
{
204204
modelDescriptor = t.path,
205-
category = "Operator/Subgraph Operator/" + t.category,
205+
category = "Operator/" + t.category,
206206
name = t.name
207207
}
208208
));

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -382,20 +382,19 @@ public VFXView()
382382

383383
// End Toolbar
384384

385-
m_NoAssetLabel = new Label("Please Open An Asset") { name = "no-asset"};
385+
m_NoAssetLabel = new Label("\n\n\nTo begin creating Visual Effects, create a new Visual Effect Graph Asset.\n(or double-click an existing Visual Effect Graph in the project view)") { name = "no-asset"};
386386
m_NoAssetLabel.style.position = PositionType.Absolute;
387-
m_NoAssetLabel.style.left = 0f;
388-
m_NoAssetLabel.style.right = new StyleLength(0f);
389-
m_NoAssetLabel.style.top = new StyleLength(0f);
390-
m_NoAssetLabel.style.bottom = new StyleLength(0f);
387+
m_NoAssetLabel.style.left = new StyleLength(40f);
388+
m_NoAssetLabel.style.right = new StyleLength(40f);
389+
m_NoAssetLabel.style.top = new StyleLength(40f);
390+
m_NoAssetLabel.style.bottom = new StyleLength(140f);
391391
m_NoAssetLabel.style.unityTextAlign = TextAnchor.MiddleCenter;
392-
m_NoAssetLabel.style.fontSize = new StyleLength(72f);
392+
m_NoAssetLabel.style.fontSize = new StyleLength(12f);
393393
m_NoAssetLabel.style.color = Color.white * 0.75f;
394-
395394
Add(m_NoAssetLabel);
396395

397396

398-
var createButton = new Button() { text = "Create Graph" };
397+
var createButton = new Button() { text = "Create new Visual Effect Graph" };
399398
m_NoAssetLabel.Add(createButton);
400399
createButton.clicked += OnCreateAsset;
401400

com.unity.visualeffectgraph/Editor/Models/Blocks/Implementations/Attribute/SetCustomAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public override string name
5858
{
5959
get
6060
{
61-
string attributeName = ObjectNames.NicifyVariableName(attribute);
61+
string attributeName = attribute;
6262
return VFXBlockUtility.GetNameString(Composition) + " " + attributeName + " " + VFXBlockUtility.GetNameString(Random) + " (" + AttributeType.ToString() + ")";
6363
}
6464
}

0 commit comments

Comments
 (0)