Skip to content

Commit

Permalink
Shifter: optinal controls orientation WIP #163
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcampos committed Oct 24, 2022
1 parent 89545fa commit 8a6f21f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion release/scripts/mgear/core/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def getTransformLookingAt(pos, lookat, normal, axis="xy", negate=False):
elif axis == "-yz":
Y = -a
Z = b
X = c
X = -c
elif axis == "y-z":
Y = a
Z = -b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def addObjects(self):
self.ik_ctl = []
# tOld = False
self.previusTag = self.parentCtlTag
axis_ori = ["xy", "xz", "yx", "yz", "zx", "zy"][self.settings["ctlOrientation"]]
axis_ori = ["xz", "yz", "zx"][self.settings["ctlOrientation"]]
for i, t in enumerate(transform.getChainTransform2(self.guide.apos,
self.normal,
self.negate,
Expand All @@ -68,7 +68,7 @@ def addObjects(self):
elif first_axis == "y":
ro_vec = datatypes.Vector([0, 0, 0])
self.front_axis = 1
self.up_axis = 0
self.up_axis = 2
self.ref_twist_vec = datatypes.Vector(1.0, 0, 0)
elif first_axis == "z":
ro_vec = datatypes.Vector([1.5708, 0, 0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def addParameters(self):
self.pSoftness = self.addParam("softness", "double", 0, 0, 1)

self.pIKSolver = self.addEnumParam(
"ctlOrientation", ["xy", "xz", "yx", "yz", "zx", "zy"], 1
"ctlOrientation", ["xz", "yz", "zx"], 0
)

self.pUseIndex = self.addParam("useIndex", "bool", False)
Expand Down

0 comments on commit 8a6f21f

Please sign in to comment.