public override void OnNodeGUI()
		{
			GUILayout.Space(EditorGUIUtility.singleLineHeight);
			outputTexture = EditorGUILayout.ObjectField(outputTexture, typeof(Texture2D), false) as Texture2D;
			EditorGUI.BeginChangeCheck();
			{
				if ((isMaterialOutput = EditorGUILayout.Toggle("material output", isMaterialOutput)))
				{
					if (outputMaterial == null)
						CreateNewMaterial();
					tiling = EditorGUILayout.Vector2Field("tiling", tiling);
					offset = EditorGUILayout.Vector2Field("offset", offset);
	
					UpdateMaterialProperties();
					
					EditorGUI.BeginChangeCheck();
					showSceneHiddenObjects = EditorGUILayout.Toggle("Show scene hidden objects", showSceneHiddenObjects);
					if (EditorGUI.EndChangeCheck())
						matPreview.UpdateShowSceneHiddenObjects(showSceneHiddenObjects);
					
					if ((preview = EditorGUILayout.Foldout(preview, "preview")))
						matPreview.Render();
				}
				else if (outputTexture != null)
					if ((preview = EditorGUILayout.Foldout(preview, "preview")))
						PWGUI.TexturePreview(outputTexture);
			}
			if (EditorGUI.EndChangeCheck())
				UpdateProps();
		}
        public override void OnNodeGUI()
        {
            GUILayout.Space(EditorGUIUtility.singleLineHeight);

            EditorGUI.BeginChangeCheck();
            outputMaterial = EditorGUILayout.ObjectField(outputMaterial, typeof(Material), false) as Material;
            if (EditorGUI.EndChangeCheck())
            {
                matPreview.SetMaterial(outputMaterial);
            }

            EditorGUI.BeginChangeCheck();
            showSceneHiddenObjects = EditorGUILayout.Toggle("Show scene hidden objects", showSceneHiddenObjects);
            if (EditorGUI.EndChangeCheck())
            {
                matPreview.UpdateShowSceneHiddenObjects(showSceneHiddenObjects);
            }

            if ((showPreview = EditorGUILayout.Foldout(showPreview, "preview")))
            {
                matPreview.Render();
            }
        }