|
|
|
|
|
|
m_Property = property; |
|
|
|
|
|
|
|
m_ReferenceNameField = new TextField(512, false, false, ' '); |
|
|
|
m_ReferenceNameField.AddStyleSheetPath("Styles/PropertyNameReferenceField"); |
|
|
|
AddRow("Reference", m_ReferenceNameField); |
|
|
|
m_ReferenceNameField.value = property.referenceName; |
|
|
|
m_ReferenceNameField.isDelayed = true; |
|
|
|
|
|
|
m_ReferenceNameField.value = property.referenceName; |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(property.overrideReferenceName)) |
|
|
|
m_ReferenceNameField.style.fontStyle = StyleValue<FontStyle>.Create(FontStyle.Normal); |
|
|
|
m_ReferenceNameField.RemoveFromClassList("modified"); |
|
|
|
m_ReferenceNameField.style.fontStyle = StyleValue<FontStyle>.Create(FontStyle.Bold); |
|
|
|
m_ReferenceNameField.AddToClassList("modified"); |
|
|
|
|
|
|
|
DirtyNodes(ModificationScope.Graph); |
|
|
|
UpdateReferenceNameResetMenu(); |
|
|
|
|
|
|
m_ReferenceNameField.style.fontStyle = StyleValue<FontStyle>.Create(FontStyle.Bold); |
|
|
|
m_ReferenceNameField.AddToClassList("modified"); |
|
|
|
|
|
|
|
if (property is Vector1ShaderProperty) |
|
|
|
{ |
|
|
|
|
|
|
{ |
|
|
|
m_Property.overrideReferenceName = null; |
|
|
|
m_ReferenceNameField.value = m_Property.referenceName; |
|
|
|
m_ReferenceNameField.style.fontStyle = StyleValue<FontStyle>.Create(FontStyle.Normal); |
|
|
|
m_ReferenceNameField.RemoveFromClassList("modified"); |
|
|
|
DirtyNodes(ModificationScope.Graph); |
|
|
|
}, ContextualMenu.MenuAction.AlwaysEnabled); |
|
|
|
} |
|
|
|