Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Revert "2DSE extruding brush can be undone properly. Fixes #87." #96

Merged
merged 1 commit into from
Apr 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions Scripts/Brushes/CompoundBrushes/ShapeEditor/ShapeEditorBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,18 +284,6 @@ public override void Invalidate(bool polygonsChanged)
UpdateGeneratedHierarchyName();
}

/// <summary>
/// Called when undo or redo is performed in the editor.
/// </summary>
public override void OnUndoRedoPerformed()
{
// reset our cached polygon data.
isDirty = true;
m_LastBuiltPolygons = null;
// the base method will invalidate this compound brush.
base.OnUndoRedoPerformed();
}

/// <summary>
/// Gets the next segment.
/// </summary>
Expand Down Expand Up @@ -695,9 +683,6 @@ public Project GetEmbeddedProject()
/// <param name="project">The project to be copied into the brush.</param>
public void CreatePolygon(Project project)
{
#if UNITY_EDITOR
UnityEditor.Undo.RecordObject(this, "Create Polygon");
#endif
// store a project copy inside of this brush.
this.project = project.Clone();
// store the extrude mode inside of this brush.
Expand All @@ -715,9 +700,6 @@ public void CreatePolygon(Project project)
/// <param name="project">The project to be copied into the brush.</param>
public void RevolveShape(Project project)
{
#if UNITY_EDITOR
UnityEditor.Undo.RecordObject(this, "Revolve Shape");
#endif
// store a project copy inside of this brush.
this.project = project.Clone();
// store the extrude mode inside of this brush.
Expand All @@ -735,9 +717,6 @@ public void RevolveShape(Project project)
/// <param name="project">The project to be copied into the brush.</param>
public void ExtrudeShape(Project project)
{
#if UNITY_EDITOR
UnityEditor.Undo.RecordObject(this, "Extrude Shape");
#endif
// store a project copy inside of this brush.
this.project = project.Clone();
// store the extrude mode inside of this brush.
Expand All @@ -755,9 +734,6 @@ public void ExtrudeShape(Project project)
/// <param name="project">The project to be copied into the brush.</param>
public void ExtrudePoint(Project project)
{
#if UNITY_EDITOR
UnityEditor.Undo.RecordObject(this, "Extrude Point");
#endif
// store a project copy inside of this brush.
this.project = project.Clone();
// store the extrude mode inside of this brush.
Expand All @@ -776,9 +752,6 @@ public void ExtrudePoint(Project project)
/// <param name="project">The project to be copied into the brush.</param>
public void ExtrudeBevel(Project project)
{
#if UNITY_EDITOR
UnityEditor.Undo.RecordObject(this, "Extrude Bevel");
#endif
// if the depth and clip depth are identical, extrude a point instead.
if (project.extrudeDepth.EqualsWithEpsilon(project.extrudeClipDepth))
{
Expand Down