Skip to content

Commit 08146a5

Browse files
[Universal] converter UI work (#4411)
* Updated UI Updated tab title added spacing between converters cleaned out dummy text setting up some sane element sizes for labels * Setup sizes to minimize odd looks maximizing UI * Removed user define and added it to the right menu * Update change log
1 parent 0d57153 commit 08146a5

File tree

5 files changed

+33
-31
lines changed

5 files changed

+33
-31
lines changed

com.unity.render-pipelines.universal/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1919
- Added blending and box projection for reflection probes.
2020
- Added 'Store Actions' option that enables bandwidth optimizations on mobile GPU architectures.
2121
- Added "Allow Material Override" option to Lit and Unlit ShaderGraph targets. When checked, allows Material to control the surface options (transparent/opaque, blend mode, etc).
22+
- Added a new UI for Render Pipeline Converters. Used now for Built-in to Universal conversion.
2223

2324
### Changed
2425
- Moved fog evaluation from vertex shader to pixel shader. This improves rendering of fog for big triangles and fog quality. This can change the look of the fog slightly.

com.unity.render-pipelines.universal/Editor/Converter/RenderPipelineConvertersEditor.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,11 @@ public class RenderPipelineConvertersEditor : EditorWindow
7878

7979
TypeCache.TypeCollection m_ConverterContainers;
8080

81-
#if RENDER_PIPELINE_CONVERTER
82-
[MenuItem("RenderPipelineConverter/RenderPipelineConverter")]
83-
#endif
84-
81+
[MenuItem("Window/Rendering/Render Pipeline Converter", false, 50)]
8582
public static void ShowWindow()
8683
{
8784
RenderPipelineConvertersEditor wnd = GetWindow<RenderPipelineConvertersEditor>();
85+
wnd.titleContent = new GUIContent("Render Pipeline Converter");
8886
DontSaveToLayout(wnd);
8987

9088
wnd.Show();
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
2-
<ui:VisualElement style="height: 25px; width: 1012px;">
3-
<ui:Label text="Render Pipeline Converter" name="conversionName" style="-unity-font-style: bold; font-size: 16px; width: 647px;" />
4-
</ui:VisualElement>
5-
<ui:TextElement text="The Render Pipeline Conversion Wizard is meant to help Convert projects from built-in to Universal Render Pipeline." name="conversionInfo" style="height: 46px; width: 649px;" />
6-
<ui:VisualElement style="flex-direction: row;">
7-
<ui:DropdownField index="-1" name="conversionsDropDown" style="height: 27px; width: 208px; display: none;" />
8-
<ui:VisualElement style="flex-grow: 1;" />
9-
</ui:VisualElement>
10-
<ui:ScrollView scroll-deceleration-rate="0,135" elasticity="0,1" name="convertersScrollView" style="flex-grow: 1; flex-shrink: 0;" />
11-
<ui:VisualElement style="flex-direction: row-reverse;">
12-
<ui:Button text="Convert" name="convertButton" style="flex-direction: column; max-width: 150px; min-width: 150px; max-height: 50px; min-height: 50px;" />
13-
<ui:Label style="flex-grow: 1;" />
14-
<ui:Button text="Initialize Converters" name="initializeButton" tooltip="This will initialize all the converters that has been toggled on." style="flex-direction: column; max-width: 150px; min-width: 150px; max-height: 50px; min-height: 50px;" />
2+
<ui:VisualElement style="max-width: 620px; min-width: 620px;">
3+
<ui:VisualElement style="height: 25px; width: 642px;">
4+
<ui:Label text="Render Pipeline Converter" name="conversionName" style="-unity-font-style: bold; font-size: 16px; width: 647px;" />
5+
</ui:VisualElement>
6+
<ui:TextElement text="The Render Pipeline Conversion Wizard is meant to help Convert projects from built-in to Universal Render Pipeline." name="conversionInfo" style="height: 46px; width: 649px;" />
7+
<ui:VisualElement style="flex-direction: row;">
8+
<ui:DropdownField index="-1" name="conversionsDropDown" style="height: 27px; width: 208px; display: none;" />
9+
<ui:VisualElement style="flex-grow: 1;" />
10+
</ui:VisualElement>
11+
<ui:ScrollView scroll-deceleration-rate="0,135" elasticity="0,1" name="convertersScrollView" style="flex-grow: 1; flex-shrink: 0; max-width: none;" />
12+
<ui:VisualElement style="flex-direction: row-reverse;">
13+
<ui:Button text="Convert" name="convertButton" style="flex-direction: column; max-width: 150px; min-width: 150px; max-height: 50px; min-height: 50px;" />
14+
<ui:Label style="flex-grow: 1;" />
15+
<ui:Button text="Initialize Converters" name="initializeButton" tooltip="This will initialize all the converters that has been toggled on." style="flex-direction: column; max-width: 150px; min-width: 150px; max-height: 50px; min-height: 50px;" />
16+
</ui:VisualElement>
1517
</ui:VisualElement>
1618
</ui:UXML>
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
2-
<ui:VisualElement name="converterTopVisualElement" style="flex-grow: 1; height: 128px; width: 621px; flex-shrink: 0; border-bottom-width: 0; border-top-width: 0; border-bottom-color: rgb(0, 0, 0); margin-bottom: 20px;">
3-
<ui:VisualElement style="height: 24px; width: 613px; flex-direction: row; flex-grow: 1; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 10px; flex-shrink: 0; padding-bottom: 0; padding-left: 0; border-top-width: 4px; border-top-color: rgb(0, 0, 0);">
4-
<ui:Toggle name="converterEnabled" value="false" tooltip="Enabling this will start the pre-processing of this converter." />
5-
<ui:Label name="converterName" text="Name Of The Converter" style="width: 143px; -unity-text-align: middle-left; flex-grow: 1; flex-direction: column;" />
6-
<ui:Label name="converterStats" text="100 Items" style="flex-grow: 0; -unity-text-align: middle-right; -unity-font-style: bold;" />
2+
<ui:VisualElement name="converterTopVisualElement" style="flex-grow: 1; height: 250px; width: 610px; flex-shrink: 0; border-bottom-width: 0; border-top-width: 0; border-bottom-color: rgb(0, 0, 0); margin-bottom: 20px; padding-bottom: 0; margin-top: 20px;">
3+
<ui:VisualElement style="height: 24px; width: 613px; flex-direction: row; flex-grow: 0; margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 10px; flex-shrink: 0; padding-bottom: 0; padding-left: 0; border-top-width: 0; border-top-color: rgb(0, 0, 0); padding-top: 0;">
4+
<ui:Toggle name="converterEnabled" value="false" tooltip="Enabling this will start the pre-processing of this converter." style="flex-grow: 0; height: 24px; margin-top: 0; margin-bottom: 0;" />
5+
<ui:Label name="converterName" text="Name Of The Converter" style="width: 143px; -unity-text-align: middle-left; flex-grow: 1; flex-direction: column; max-height: 20%; height: 20px; min-height: 20px; padding-top: 3px;" />
6+
<ui:Label name="converterStats" style="flex-grow: 0; -unity-text-align: middle-right; -unity-font-style: bold;" />
77
</ui:VisualElement>
8-
<ui:VisualElement style="height: 29px; width: 609px; flex-direction: row; flex-grow: 1; flex-shrink: 1;">
9-
<ui:Label text="In progress..." name="converterStatus" style="-unity-text-align: middle-left;" />
10-
<ui:Label text="info" name="converterInfo" style="-unity-text-align: middle-left; flex-grow: 1;" />
11-
<ui:Label text="30 Seconds" name="converterTime" style="-unity-text-align: middle-left; -unity-font-style: bold;" />
8+
<ui:VisualElement style="height: 30px; width: 609px; flex-direction: row; flex-grow: 0; flex-shrink: 1;">
9+
<ui:Label name="converterStatus" style="-unity-text-align: middle-left; height: 20px;" />
10+
<ui:Label text="info" name="converterInfo" style="-unity-text-align: middle-left; flex-grow: 1; height: 20px;" />
11+
<ui:Label name="converterTime" style="-unity-text-align: middle-left; -unity-font-style: bold; height: 20px;" />
1212
</ui:VisualElement>
13-
<ui:VisualElement style="flex-direction: row; height: 19px; flex-grow: 0; margin-top: 8px; margin-bottom: 17px;">
14-
<ui:Label text="collapse&#10;" style="flex-grow: 1;" />
13+
<ui:VisualElement style="flex-direction: row; height: 19px; flex-grow: 0; margin-top: 0; margin-bottom: 0;">
14+
<ui:Label text="&#10;" style="flex-grow: 1;" />
1515
<ui:Image name="pendingImage" style="max-width: 16px; max-height: 16px; min-width: 16px; min-height: 16px;" />
1616
<ui:Label name="pendingLabel" />
1717
<ui:Image name="warningImage" style="max-width: 16px; max-height: 16px; min-width: 16px; min-height: 16px;" />
@@ -21,6 +21,6 @@
2121
<ui:Image name="successImage" style="max-width: 16px; max-height: 16px; min-width: 16px; min-height: 16px;" />
2222
<ui:Label name="successLabel" style="flex-grow: 0; flex-shrink: 0;" />
2323
</ui:VisualElement>
24-
<ui:ListView focusable="true" name="converterItems" show-alternating-row-backgrounds="All" text="Info" style="flex-grow: 1; flex-shrink: 0; height: 100px; width: 632px; padding-bottom: 0; margin-bottom: 0; margin-top: 0;" />
24+
<ui:ListView focusable="true" name="converterItems" show-alternating-row-backgrounds="All" text="Info" style="flex-grow: 1; flex-shrink: 0; height: 100px; width: 606px; padding-bottom: 0; margin-bottom: 0; margin-top: 0;" />
2525
</ui:VisualElement>
2626
</ui:UXML>

com.unity.render-pipelines.universal/Editor/Converter/converter_widget_item.uxml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
22
<ui:BindableElement style="flex-grow: 1; flex-direction: row; align-items: center; flex-shrink: 0;">
33
<ui:Toggle value="true" name="converterItemActive" binding-path="isActive" />
4-
<ui:Label name="converterItemName" text="name" style="flex-grow: 1;" />
4+
<ui:Label name="converterItemName" text="name" style="flex-grow: 0; width: 200px;" />
55
<ui:Label name="converterItemInfo" style="visibility: hidden;" />
6-
<ui:Label name="converterItemPath" text="path..." style="flex-grow: 1;" />
6+
<ui:Label name="converterItemPath" text="path..." style="flex-grow: 0; flex-wrap: nowrap; white-space: nowrap; width: 300px; overflow: hidden; padding-left: 21px;" />
7+
<ui:Label display-tooltip-when-elided="true" style="flex-grow: 1;" />
78
<ui:Image name="converterItemStatusIcon" style="max-width: 16px; max-height: 16px; min-width: 16px; min-height: 16px; justify-content: center; flex-grow: 0; width: 16px; height: 16px;" />
89
<ui:Image name="converterItemHelpIcon" style="max-width: 16px; max-height: 16px; min-width: 16px; min-height: 16px; justify-content: center; flex-grow: 0;" />
910
</ui:BindableElement>

0 commit comments

Comments
 (0)