Skip to content

Commit

Permalink
Fixed OnyxRoundedCube Property Issue
Browse files Browse the repository at this point in the history
Fixed an issue where the x_minus_position value wouldn't be set on scene reloads or duplications.
  • Loading branch information
Takanu committed Apr 3, 2019
1 parent 08d864f commit 05e541c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions onyx/nodes/onyx/onyx_rounded_cube.gd
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func update_x_plus(new_value):


func update_x_minus(new_value):
if new_value > 0 || origin_mode == OriginPosition.BASE_CORNER:
if new_value < 0 || origin_mode == OriginPosition.BASE_CORNER:
new_value = 0

x_minus_position = new_value
Expand All @@ -165,7 +165,7 @@ func update_y_plus(new_value):
generate_geometry(true)

func update_y_minus(new_value):
if new_value > 0 || origin_mode == OriginPosition.BASE_CORNER || origin_mode == OriginPosition.BASE:
if new_value < 0 || origin_mode == OriginPosition.BASE_CORNER || origin_mode == OriginPosition.BASE:
new_value = 0

y_minus_position = new_value
Expand Down Expand Up @@ -565,6 +565,7 @@ func balance_handles():
z_plus_position = diff_z
z_minus_position = 0



# ////////////////////////////////////////////////////////////
# STANDARD HANDLE FUNCTIONS
Expand Down
4 changes: 1 addition & 3 deletions onyx/nodes/onyx/onyx_utils.gd
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ static func handle_change(node, index, coord):
# NOTE - This should only finish committing information, restore_state will finalize movement and other opeirations.
static func handle_commit(node, index, coord):

#print("OnyxUtils - Committing handle")

node.update_handle_from_gizmo(index, coord)
node.apply_handle_attributes()

Expand Down Expand Up @@ -131,7 +129,7 @@ static func restore_state(node, state):
var new_handles = state[0]
var stored_location = state[1]

#print("RESTORING STATE -", state)
# print("RESTORING STATE -", state)

node.handles = new_handles.duplicate(true)
node.old_handles = new_handles.duplicate(true)
Expand Down

0 comments on commit 05e541c

Please sign in to comment.