protected override void OnInspector() { DrawDefault("activation", "This allows you to control when this component actually activates and becomes ready for painting. You probably don't need to change this."); DrawDefault("otherRenderers", "If this material is used in multiple renderers, you can specify them here. This usually happens with different LOD levels."); Separator(); if (Any(t => t.GetComponent <P3dPaintableTexture>() == null)) { EditorGUILayout.HelpBox("Your paintable doesn't have any paintable textures!", MessageType.Warning); } if (Button("Add Material Cloner") == true) { Each(t => t.gameObject.AddComponent <P3dMaterialCloner>()); } if (Button("Add Paintable Texture") == true) { Each(t => t.gameObject.AddComponent <P3dPaintableTexture>()); } if (Button("Analyze Mesh") == true) { P3dMeshAnalysis.OpenWith(Target.gameObject); } }
protected override void OnInspector() { Draw("activation", "This allows you to control when this component actually activates and becomes ready for painting. You probably don't need to change this."); Draw("baseScale", "If you want the paintable texture width/height to be multiplied by the scale of this GameObject, this allows you to set the scale where you want the multiplier to be 1."); Draw("includeScale", "Transform the mesh with its position, rotation, and scale? Some skinned mesh setups require this to be disabled."); Draw("otherRenderers", "If this material is used in multiple renderers, you can specify them here. This usually happens with different LOD levels."); Separator(); if (Any(t => t.GetComponent <P3dPaintableTexture>() == null)) { EditorGUILayout.HelpBox("Your paintable doesn't have any paintable textures!", MessageType.Warning); } if (Button("Add Material Cloner") == true) { Each(t => t.gameObject.AddComponent <P3dMaterialCloner>()); } if (Button("Add Paintable Texture") == true) { Each(t => t.gameObject.AddComponent <P3dPaintableTexture>()); } if (Button("Analyze Mesh") == true) { P3dMeshAnalysis.OpenWith(Target.gameObject); } }
protected override void OnInspector() { TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts); if (Any(tgts, t => t.Activated == true)) { Info("This component has been activated."); } if (Any(tgts, t => t.Activated == true && Application.isPlaying == false)) { Error("This component shouldn't be activated during edit mode. Deactivate it from the component context menu."); } Draw("activation", "This allows you to control when this component actually activates and becomes ready for painting. You probably don't need to change this."); Separator(); if (Any(tgts, t => t.GetComponentInChildren <P3dPaintableTexture>() == null)) { Warning("Your paintable doesn't have any paintable textures!"); } if (Button("Add Material Cloner") == true) { Each(tgts, t => t.gameObject.AddComponent <P3dMaterialCloner>()); } if (Button("Add Paintable Texture") == true) { Each(tgts, t => t.gameObject.AddComponent <P3dPaintableTexture>()); } if (Button("Analyze Mesh") == true) { if (tgt.Prepared == true) { P3dMeshAnalysis.OpenWith(tgt.PreparedMesh); } else { P3dMeshAnalysis.OpenWith(tgt.gameObject); } } Separator(); if (DrawFoldout("Advanced", "Show advanced settings?") == true) { BeginIndent(); Draw("baseScale", "If you want the paintable texture width/height to be multiplied by the scale of this GameObject, this allows you to set the scale where you want the multiplier to be 1."); Draw("includeScale", "Transform the mesh with its position, rotation, and scale? Some skinned mesh setups require this to be disabled."); Draw("useMesh", "This allows you to choose how the Mesh attached to the current Renderer is used when painting.\n\nAsIs = Use what is currently set in the renderer.\n\nAutoSeamFix = Use (or automatically generate) a seam-fixed version of the mesh currently set in the renderer."); Draw("otherRenderers", "If this material is used in multiple renderers, you can specify them here. This usually happens with different LOD levels."); Draw("onActivating"); Draw("onActivated"); EndIndent(); } }
protected override void OnInspector() { BeginError(Any(t => t.Paintable == null)); Draw("paintable", "The paintable this separate paintable is associated with."); EndError(); Separator(); if (Button("Analyze Mesh") == true) { P3dMeshAnalysis.OpenWith(Target.gameObject); } }
protected override void OnInspector() { BeginError(Any(t => t.Paintable == null)); Draw("paintable", "The paintable this separate paintable is associated with."); EndError(); Draw("includeScale", "Transform the mesh with its position, rotation, and scale? Some skinned mesh setups require this to be disabled."); Separator(); if (Button("Analyze Mesh") == true) { P3dMeshAnalysis.OpenWith(Target.gameObject); } }
protected override void OnInspector() { if (Any(t => t.Activated == true)) { EditorGUILayout.HelpBox("This component has been activated.", MessageType.Info); } if (Any(t => t.Activated == true && Application.isPlaying == false)) { EditorGUILayout.HelpBox("This component shouldn't be activated during edit mode. Deactive it from the component conext menu.", MessageType.Error); } Draw("activation", "This allows you to control when this component actually activates and becomes ready for painting. You probably don't need to change this."); Separator(); if (Any(t => t.GetComponentInChildren <P3dPaintableTexture>() == null)) { EditorGUILayout.HelpBox("Your paintable doesn't have any paintable textures!", MessageType.Warning); } if (Button("Add Material Cloner") == true) { Each(t => t.gameObject.AddComponent <P3dMaterialCloner>()); } if (Button("Add Paintable Texture") == true) { Each(t => t.gameObject.AddComponent <P3dPaintableTexture>()); } if (Button("Analyze Mesh") == true) { P3dMeshAnalysis.OpenWith(Target.gameObject); } Separator(); expandAdvanced = EditorGUILayout.Foldout(expandAdvanced, "Advanced"); if (expandAdvanced == true) { EditorGUI.indentLevel++; Draw("baseScale", "If you want the paintable texture width/height to be multiplied by the scale of this GameObject, this allows you to set the scale where you want the multiplier to be 1."); Draw("includeScale", "Transform the mesh with its position, rotation, and scale? Some skinned mesh setups require this to be disabled."); Draw("otherRenderers", "If this material is used in multiple renderers, you can specify them here. This usually happens with different LOD levels."); Draw("onActivated"); EditorGUI.indentLevel--; } }
protected override void OnInspector() { TARGET tgt; TARGET[] tgts; GetTargets(out tgt, out tgts); BeginError(Any(tgts, t => t.Paintable == null)); Draw("paintable", "The paintable this separate paintable is associated with."); EndError(); Draw("includeScale", "Transform the mesh with its position, rotation, and scale? Some skinned mesh setups require this to be disabled."); Draw("useMesh", "This allows you to choose how the Mesh attached to the current Renderer is used when painting.\n\nAsIs = Use what is currently set in the renderer.\n\nAutoSeamFix = Use (or automatically generate) a seam-fixed version of the mesh currently set in the renderer."); Separator(); if (Button("Analyze Mesh") == true) { if (tgt.Prepared == true) { P3dMeshAnalysis.OpenWith(tgt.PreparedMesh); } else { P3dMeshAnalysis.OpenWith(tgt.gameObject); } } }