浏览代码

Hide right pane in node if there are no output slots

/main
Peter Bay Bastian 8 年前
当前提交
a8450aba
共有 2 个文件被更改,包括 13 次插入0 次删除
  1. 6
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/NodeDrawer.cs
  2. 7
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/SerializableGraph.uss

6
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/NodeDrawer.cs


var controlDrawData = nodeData.elements.OfType<ControlDrawData>().ToList();
if (controlDrawData.Count == 0)
{
if (!m_RightContainer.classList.Contains("empty"))
m_RightContainer.AddToClassList("empty");
}
m_RightContainer.RemoveFromClassList("empty");
if (!nodeData.expanded)
{

7
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Styles/SerializableGraph.uss


padding-left: 8;
}
.Node .pane.right.empty {
margin-left: 0;
padding-left: 0;
padding-right: 0;
}
.Node .paneItem {
margin-top: 2;
}

flex-direction: column;
padding-bottom: 2;
padding-left: 4;
padding-right: 4;
}
.Node #controls #element{

正在加载...
取消
保存