public CInspectorControlInfo(Type type, CObjectProperty property, CCategoryInfo category, BaseInspectorControl control, InspectorPropertyName nameControl)
 {
     categoryInfo        = category;
     inspectorControl    = control;
     valueType           = type;
     objectProperty      = property;
     propertyNameControl = nameControl;
 }
        public SimpleInspectorCategory(CCategoryInfo info, IPropertyInspector inspector)
            : base(info.Priority)
        {
            InitializeComponent();

            m_inspector    = inspector;
            m_propertyGrid = PropertyGrid;
            m_leftColumn   = LeftColumn;
            m_rightColumn  = RightColumn;
        }
Example #3
0
        public ExpandableInspectorCategory(CCategoryInfo info, IPropertyInspector inspector)
            : base(info.Priority)
        {
            InitializeComponent();

            Expander.Header = info.Name;

            m_inspector    = inspector;
            m_propertyGrid = PropertyGrid;
            m_leftColumn   = LeftColumn;
            m_rightColumn  = RightColumn;
        }
        private void CreateMaterialProperties()
        {
            MaterialProperties.Clear();
            CCategoryInfo category = new CCategoryInfo()
            {
                Name = "Material", Priority = 0
            };

            foreach (MaterialParameterViewModel parameterEntry in ParameterEntries)
            {
                Type paramType = ShaderHelpers.GetTypeFromParameterType(parameterEntry.ParameterType);
                if (parameterEntry.ParameterType == EShaderParameterType.Texture)
                {
                    paramType = typeof(CAssetReference <CTextureAsset>);
                }
                PropertyInfo    valuePropertyInfo = typeof(MaterialParameterViewModel).GetProperty("Value");
                CObjectProperty objectProperty    = new CObjectProperty(parameterEntry.Name, category, parameterEntry, parameterEntry.Value, paramType, valuePropertyInfo, null);
                MaterialProperties.Add(objectProperty);
            }

            m_propertyInspector.ShowInspectors(MaterialProperties);
        }