Example #1
0
    private void Start()
    {
        Mesh mesh = GetComponent <MeshFilter>().mesh;

        exposure.Faces    = MeshUtils.CountSurfaces(mesh, 0.0f);
        exposure.Material = 3;
        exposure.Exposure = ExposureCalculator.ComputeExposure(exposure.Faces, exposure.Material);
    }
Example #2
0
    public void UpdateMaterial()
    {
        int type = materialType[dropDown.value];

        Debug.Log("Type: " + type);
        if (selectionManager)
        {
            List <string> selection = selectionManager.GetSelection();
            foreach (string selected in selection)
            {
                MeshExposure exp = GameObject.Find(selected).GetComponent <SessionModel>().GetExposure();
                exp.Material = type;
                exp.Exposure = ExposureCalculator.ComputeExposure(exp.Faces, exp.Material);
            }
        }

        UpdateExposure();
    }