|
|
|
|
|
|
VisualElement m_PropertyItems; |
|
|
|
VisualElement m_LayerItems; |
|
|
|
VisualElement m_ContentContainer; |
|
|
|
Experimental.UIElements.ObjectField m_PreviewMeshPicker; |
|
|
|
AbstractNodeEditorView m_EditorView; |
|
|
|
|
|
|
|
TypeMapper m_TypeMapper; |
|
|
|
|
|
|
|
|
|
|
m_Preview = new PreviewView {name = "preview", image = Texture2D.blackTexture}; |
|
|
|
bottomContainer.Add(m_Preview); |
|
|
|
|
|
|
|
m_PreviewMeshPicker = new Experimental.UIElements.ObjectField() { objectType = typeof(Mesh) }; |
|
|
|
bottomContainer.Add(m_PreviewMeshPicker); |
|
|
|
} |
|
|
|
Add(bottomContainer); |
|
|
|
|
|
|
|
|
|
|
if (m_MasterNode != null) |
|
|
|
{ |
|
|
|
m_PreviewHandle = m_PreviewSystem.GetPreview(m_MasterNode); |
|
|
|
m_PreviewHandle.mesh = null; |
|
|
|
m_PreviewHandle.onPreviewChanged += OnPreviewChanged; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
void OnPreviewChanged() |
|
|
|
{ |
|
|
|
m_Preview.image = m_PreviewHandle.texture ?? Texture2D.blackTexture; |
|
|
|
m_PreviewHandle.mesh = m_PreviewMeshPicker.value as Mesh; |
|
|
|
} |
|
|
|
|
|
|
|
public void UpdateSelection(IEnumerable<INode> nodes) |
|
|
|