예제 #1
0
 public RampSection(ToonyStandardGUI inspector, MaterialProperty[] properties, bool open, bool enabled) : base(Styles.title, open, enabled)
 {
     FindProperties(properties);
     this.inspector              = inspector;
     gradientEditor              = new GradientEditor();
     isGradientEditorOpen        = false;
     needToStorePreviousRamp     = true;
     Selection.selectionChanged += ResetRampTexture;
 }
예제 #2
0
        public SpecularSection(MaterialProperty[] properties, InspectorLevel level, ToonyStandardGUI gui, bool open, bool enabled) : base(Styles.title, open, enabled)
        {
            FindProperties(properties);
            this.inspector = gui;
            this.level     = level;

            foreach (Material mat in _SpecularOn.targets)
            {
                TSFunctions.SetKeyword(mat, "_SPECULARHIGHLIGHTS_OFF", !(mat.GetFloat(_SpecularOn.name) != 0));
                SetupWorkflow(mat, (Workflow)_workflow.floatValue);
                SetupSpMode(mat, (SpMode)_SpMode.floatValue);
            }

            gradientEditor              = new GradientEditor();
            isGradientEditorOpen        = false;
            needToStorePreviousRamp     = true;
            Selection.selectionChanged += ResetRampTexture;
        }
예제 #3
0
 private void Start()
 {
     gradientEditor = new GradientEditor();
 }