Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Commit

Permalink
Merge branch 'RB-2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcampos committed Aug 31, 2017
2 parents 2acac5e + d7ea3d5 commit f3c3e2d
Show file tree
Hide file tree
Showing 9 changed files with 2,321 additions and 331 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Originally mGear was design and develope by Jeremie Passerin , since 2013 Miquel

MGEAR is under the terms of the MIT License

*Latest release: 2.2.2 ( Release Log: https://miquelcampos.github.io/mgear/releaseLog.html)
Latest release: 2.2.3 ( Release Log: https://miquelcampos.github.io/mgear/releaseLog.html)

For the official release, with compiled solvers and example data please download mGear from: https://gumroad.com/l/mgear

Expand Down
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maya.SetupMscver()
env = excons.MakeBaseEnv()


version = (2, 2, 2)
version = (2, 2, 3)
versionstr = "%d.%d.%d" % version
platname = {"win32": "windows", "darwin": "osx"}.get(sys.platform, "linux")
outprefix = "platforms/%s/%s/%s/plug-ins" % (maya.Version(nice=True), platname, excons.arch_dir)
Expand Down
5 changes: 3 additions & 2 deletions docs/source/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ Originally mGear was design and develope by `Jeremie Passerin <http://www.jeremi

**Jeremie Passerin**

`Join the mGear Google user group <https://groups.google.com/forum/#!forum/mgearusergroup/>`_

Contributors (in alphabetical order):
- `Akagi-san <https://github.com/akiwoRM/>`_
- `Gaetan Guidet <https://github.com/gatgui/>`_
- `Lior Ben Horin <https://github.com/liorbenhorin/>`_
- `Marcus Ottosson <https://github.com/mottosso>`_
- `Matsumoto-san <https://github.com/yamahigashi>`_
- `Miles Cheng <https://github.com/milesckt/>`_

`Join the mGear Google user group <https://groups.google.com/forum/#!forum/mgearusergroup/>`_

.. figure:: images/studioAKA_mGear_A.jpg
:width: 800px
:align: center
Expand Down
9 changes: 9 additions & 0 deletions docs/source/releaseLog.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
Release Log
===========

2.2.3
-----
**Enhancements**
* Issue #43: Shifter: Custom Steps: Added Stop Build and Try again option if step fail.

**Bug Fix**
* Issue #54: Synoptic: Match IK/FK with split ctl for trans and rot

2.2.2
-----
**Enhancements**
Expand Down
21 changes: 15 additions & 6 deletions scripts/mgear/maya/shifter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,27 @@ def build(self):

self.customStepDic["mgearRun"] = self

# stop build triggered if a custom step fail
self.stopBuild = False

self.preCustomStep()
self.initialHierarchy()
self.processComponents()
self.finalize()
self.postCustomStep()
return self.model
if not self.stopBuild:
self.initialHierarchy()
self.processComponents()
self.finalize()
self.postCustomStep()

return self.model

def customStep(self, checker, attr):
if self.options[checker]:
customSteps = self.options[attr].split(",")
for step in customSteps:
helperSlots.runStep(step.split("|")[-1][1:], self.customStepDic)
if not self.stopBuild:
self.stopBuild = helperSlots.runStep(step.split("|")[-1][1:], self.customStepDic)
else:
pm.displayWarning("Build Stopped")
break

def preCustomStep(self):
self.customStep("doPreCustomStep", "preCustomStep")
Expand Down
48 changes: 30 additions & 18 deletions scripts/mgear/maya/shifter/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,31 +852,43 @@ def editFile(self, widgetList):

@classmethod
def runStep(self, stepPath, customStepDic):
with pm.UndoChunk():
try:
pm.displayInfo("EXEC: Executing custom step: %s"%stepPath)
fileName = os.path.split(stepPath)[1].split(".")[0]
if os.environ.get(MGEAR_SHIFTER_CUSTOMSTEP_KEY, ""):
runPath = os.path.join( os.environ.get(MGEAR_SHIFTER_CUSTOMSTEP_KEY, "") , stepPath)
else:
runPath = stepPath
customStep = imp.load_source(fileName, runPath)
if hasattr(customStep, "CustomShifterStep"):
cs = customStep.CustomShifterStep()
cs.run(customStepDic)
customStepDic[cs.name] = cs
pm.displayInfo("SUCCEED: Custom Shifter Step Class: %s. Succeed!!"%stepPath)
else:
pm.displayInfo("SUCCEED: Custom Step simple script: %s. Succeed!!"%stepPath)
with pm.UndoChunk():
pm.displayInfo("EXEC: Executing custom step: %s"%stepPath)
fileName = os.path.split(stepPath)[1].split(".")[0]
if os.environ.get(MGEAR_SHIFTER_CUSTOMSTEP_KEY, ""):
runPath = os.path.join( os.environ.get(MGEAR_SHIFTER_CUSTOMSTEP_KEY, "") , stepPath)
else:
runPath = stepPath
customStep = imp.load_source(fileName, runPath)
if hasattr(customStep, "CustomShifterStep"):
cs = customStep.CustomShifterStep()
cs.run(customStepDic)
customStepDic[cs.name] = cs
pm.displayInfo("SUCCEED: Custom Shifter Step Class: %s. Succeed!!"%stepPath)
else:
pm.displayInfo("SUCCEED: Custom Step simple script: %s. Succeed!!"%stepPath)

except Exception as ex:
template = "An exception of type {0} occured. Arguments:\n{1!r}"
message = template.format(type(ex).__name__, ex.args)
pm.displayError( message)
pm.displayError(traceback.format_exc())
cont = pm.confirmBox("FAIL: Custom Step Fail", "The step:%s has failed. Continue with next step?"%stepPath + "\n\n" + message + "\n\n" + traceback.format_exc(), "Continue", "Undo this Step")
if not cont:
pm.undo()
cont = pm.confirmBox("FAIL: Custom Step Fail", "The step:%s has failed. Continue with next step?"%stepPath + "\n\n" + message + "\n\n" + traceback.format_exc(), "Continue", "Stop Build", "Try Again!")
if cont == "Stop Build":
# stop Build
return True
elif cont == "Try Again!":
try: #just in case there is nothing to undo
pm.undo()
except:
pass
pm.displayInfo("Trying again! : {}".format(stepPath))
inception = self.runStep(stepPath, customStepDic)
if inception: # stops build from the recursion loop.
return True
else:
return False


def runManualStep(self, widgetList):
Expand Down
Loading

0 comments on commit f3c3e2d

Please sign in to comment.