void SetIsSectionExpanded_Shape(InfluenceShape shape)
 {
     for (var i = 0; i < k_ShapeCount; i++)
     {
         m_AnimBools[i].target = (int)shape == i;
     }
 }
Beispiel #2
0
        protected static EnvShapeType ConvertShape(InfluenceShape shape)
        {
            switch (shape)
            {
            default:
            case InfluenceShape.Box:
                return(EnvShapeType.Box);

            case InfluenceShape.Sphere:
                return(EnvShapeType.Sphere);
            }
        }
Beispiel #3
0
        protected virtual LightingExplorerTableColumn[] GetHDReflectionProbeColumns()
        {
            return(new[]
            {
                new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Name, HDStyles.Name, null, 200),                                               // 0: Name
                new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Checkbox, HDStyles.On, "m_Enabled", 25),                                       // 1: Enabled
                new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Enum, HDStyles.ReflectionProbeMode, "m_Mode", 60, (r, prop, dep) =>            // 2: Mode
                {
                    prop.intValue = (int)(UnityEngine.Rendering.ReflectionProbeMode)EditorGUI.EnumPopup(r, (UnityEngine.Rendering.ReflectionProbeMode)prop.intValue);
                }),
                new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Enum, HDStyles.ReflectionProbeShape, "m_Mode", 60, (r, prop, dep) =>           // 3: Shape
                {
                    ReflectionProbe probe = prop.serializedObject.targetObject as ReflectionProbe;
                    if (probe == null)
                    {
                        EditorGUI.LabelField(r, "null");
                        return;
                    }
                    InfluenceShape influenceShape = reflectionProbeDataPairing[probe].influenceVolume.shape;
                    EditorGUI.BeginChangeCheck();
                    influenceShape = (InfluenceShape)EditorGUI.EnumPopup(r, influenceShape);
                    if (EditorGUI.EndChangeCheck())
                    {
                        reflectionProbeDataPairing[probe].influenceVolume.shape = influenceShape;
                    }
                }),
                new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Float, HDStyles.ReflectionProbeShadowDistance, "m_ShadowDistance", 90),        // 4: Shadow distance
                new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Float, HDStyles.ReflectionProbeNearClip, "m_NearClip", 60),                    // 5: Near clip
                new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Float, HDStyles.ReflectionProbeFarClip, "m_FarClip", 60),                      // 6: Far clip
                new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Checkbox, HDStyles.ParallaxCorrection, "m_BoxProjection", 90),                 // 7: Parallax correction
                new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Float, HDStyles.ReflectionProbeWeight, "m_Mode", 60, (r, prop, dep) =>         // 8: Weight
                {
                    ReflectionProbe probe = prop.serializedObject.targetObject as ReflectionProbe;

                    float weight = reflectionProbeDataPairing[probe].weight;
                    EditorGUI.BeginChangeCheck();
                    weight = EditorGUI.FloatField(r, weight);
                    if (EditorGUI.EndChangeCheck())
                    {
                        reflectionProbeDataPairing[probe].weight = weight;
                    }
                }),
            });
        }
Beispiel #4
0
 public AnimBool IsSectionExpanded_Shape(InfluenceShape shapeType)
 {
     return(m_AnimBools[(int)shapeType]);
 }
Beispiel #5
0
 public void SetIsSectionExpanded_Shape(InfluenceShape shape)
 {
     SetIsSectionExpanded_Shape((int)shape);
 }
 public AnimBool IsSectionExpandedShape(InfluenceShape value)
 {
     return(m_AnimBools[k_AnimBoolSingleFieldCount + k_ReflectionProbeModeCount + (int)value]);
 }