コード例 #1
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            var t = target as UsdMeshComponent;

            if (!t.schema.isInstance && !t.schema.isMaster && !t.schema.isInMaster)
            {
                EditorGUILayout.Space();
                if (GUILayout.Button("Precompute Normals / Tangents"))
                {
                    UsdPrecomputeNormalsWindow.Open(t.schema as UsdMesh);
                }
            }
        }
コード例 #2
0
        private void AddButtons()
        {
            var t = target as UsdStream;

            EditorGUILayout.Space();
            if (GUILayout.Button("Precompute Normals / Tangents"))
            {
                UsdPrecomputeNormalsWindow.Open(t);
            }

            EditorGUILayout.Space();
            if (GUILayout.Button("Rebuild Tree"))
            {
                t.usdiReload();
                EditorUtility.SetDirty(t);
            }

            EditorGUILayout.Space();
            if (GUILayout.Button("Detach USD Components"))
            {
                t.usdiDetachUsdComponents();
            }
        }