Skip to content

Commit

Permalink
Toolset - Module designer undo stack (#55)
Browse files Browse the repository at this point in the history
* Add test results

* Add test results

* add some support for undo/redo actions in designer

* Add test results

* Update README.md status badges.

* Update module_designer.py

* Update module_designer.py

* fix several things

* Update README.md status badges.

* Add test results

* Update README.md status badges.

* Add test results

* Update README.md status badges.

* Add test results

* Update README.md status badges.

* Add test results

* Update README.md status badges.

* Update scene.py

* Update module.py

* compile necessary ui

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
th3w1zard1 and actions-user authored Apr 13, 2024
1 parent e184c7c commit c08b3a8
Show file tree
Hide file tree
Showing 93 changed files with 23,650 additions and 35,737 deletions.
12 changes: 10 additions & 2 deletions Libraries/PyKotor/src/pykotor/resource/generics/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def __init__(self, x: float, y: float, z: float):
z (float): The z-coordinate of the position.
"""
self.position: Vector3 = Vector3(x, y, z)
self.resref: ResRef = ResRef.from_blank()

@abstractmethod
def identifier(self) -> ResourceIdentifier:
Expand Down Expand Up @@ -244,7 +245,6 @@ def yaw(
self,
) -> float | None:
"""Returns the yaw rotation (in radians) of the instance if the instance supports it, otherwise returns None."""
...


class GITCamera(GITInstance):
Expand Down Expand Up @@ -309,11 +309,19 @@ def classification(
) -> str:
return "Camera"

def yaw(
def yaw( # TODO: Why is this not y...?
self,
) -> float | None:
return math.pi - self.orientation.to_euler().x

def pitch(self) -> float:
# Following the convention used in rotate method, where pitch affects rotation.z
return math.pi - self.orientation.to_euler().z

def roll(self) -> float:
# Following the convention used in rotate method, where roll affects rotation.y
return math.pi - self.orientation.to_euler().y


class GITCreature(GITInstance):
GFF_STRUCT_ID = 4
Expand Down
2 changes: 1 addition & 1 deletion Tools/HolocronToolset/src/toolset/data/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def satisfied(
*,
exactKeys: bool = True,
) -> bool:
"""Determines if mouse/keyboard events are our hotkey action.
"""Handles the key/mouse events, determine if the conditions are met.
Args:
----
Expand Down
Loading

0 comments on commit c08b3a8

Please sign in to comment.