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

Commit

Permalink
Revert "RBF Manager: Added better support for directly connected"
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcampos authored Jul 2, 2018
1 parent a8c043e commit e5d788d
Show file tree
Hide file tree
Showing 10 changed files with 29,707 additions and 29,877 deletions.
21 changes: 0 additions & 21 deletions AUTHORS.md

This file was deleted.

10 changes: 8 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
MIT License

Copyright (c) 2011-2018 Jeremie Passerin, Miquel Campos
Copyright (c) 2018 The mGear-Dev Organization
MGEAR is under the terms of the MIT License

Copyright (c) 2016 Jeremie Passerin, Miquel Campos

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,3 +21,8 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Author: Jeremie Passerin www.jeremiepasserin.com
Author: Miquel Campos www.miquel-campos.com


10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

mGear is a rigging framework for Autodesk Maya. mGear provides a set of convenient modules, tools and c++ solvers to streamline the development of rigging and animation tools.

Originally mGear was design and develope by Jeremie Passerin and [Miquel Campos](https://www.miquel-campos.com/). Currently mGear is maintained by the mgear-dev organization team.
Originally mGear was design and develope by Jeremie Passerin, since 2013 [Miquel Campos](https://www.miquel-campos.com/) continued the project and evolved to the current design.

**MGEAR is under the terms of the MIT License**

Expand All @@ -11,8 +11,8 @@ Originally mGear was design and develope by Jeremie Passerin and [Miquel Campos]
- [mGear Web](https://www.mgear-framework.com/)
- [mGear Forum](https://forum.mgear-framework.com/)
- [mGear Youtube channel](https://www.youtube.com/c/mgearriggingframework)
- [API Docs](http:https://www.mgear-framework.com/mgear/)
- [Release Log](http:https://www.mgear-framework.com/mgear/releaseLog.html)
- For the official release, with compiled solvers: [Releases](https://github.com/mgear-dev/mgear/releases)
- [API Docs](https:https://miquelcampos.github.io/mgear/)
- [Release Log](https:https://miquelcampos.github.io/mgear/releaseLog.html)
- For the official release, with compiled solvers: [Gumroad](https://gumroad.com/l/mgear)

### Latest release: [2.5.24](https://github.com/mgear-dev/mgear/releases)
### Latest release: [2.5.24](https://gumroad.com/l/mgear)
17 changes: 7 additions & 10 deletions scripts/mgear/maya/pyqt.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import traceback
import maya.OpenMayaUI as omui

from mgear.vendor.Qt import QtGui, QtWidgets, QtCompat
from mgear.vendor.Qt import QtWidgets, QtCompat

# TODO: Delete after finish refactor
# not used in this module, but imported in others
Expand Down Expand Up @@ -48,21 +48,18 @@ def showDialog(dialog, dInst=True, *args):
# Create minimal dialog object

# if versions.current() >= 20180000:
# window = dialog(maya_main_window())
# windw = dialog(maya_main_window())
# else:
window = dialog()

cursor = QtGui.QCursor().pos()
window.move(
QtWidgets.QApplication.desktop().screenGeometry(cursor).center()
- window.rect().center())
windw = dialog()
windw.move(QtWidgets.QApplication.desktop().screen().rect().center()
- windw.rect().center())

# Delete the UI if errors occur to avoid causing winEvent
# and event errors (in Maya 2014)
try:
window.show()
windw.show()
except Exception:
window.deleteLater()
windw.deleteLater()
traceback.print_exc()


Expand Down
3 changes: 0 additions & 3 deletions scripts/mgear/maya/rigbits/rbf_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

# RBF setups
import weightNode_io

# debug
# reload(weightNode_io)
# =============================================================================
# Constants
# =============================================================================
Expand Down
48 changes: 7 additions & 41 deletions scripts/mgear/maya/rigbits/rbf_manager_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@
import rbf_io
import rbf_node

# debug
# reload(rbf_io)
# reload(rbf_node)

# =============================================================================
# Constants
# =============================================================================
Expand Down Expand Up @@ -128,12 +124,6 @@ def getPlugAttrs(nodes, attrType="all"):
for node in nodes:
if attrType == "all":
attrs = mc.listAttr(node, se=True, u=False)
aliasAttrs = mc.aliasAttr(node, q=True)
if aliasAttrs is not None:
try:
attrs.extend(aliasAttrs[0::2])
except Exception:
pass
elif attrType == "cb":
attrs = mc.listAttr(node, se=True, u=False, cb=True)
elif attrType == "keyable":
Expand Down Expand Up @@ -457,7 +447,6 @@ def __init__(self, parent=None, hideMenuBar=False, newSceneCallBack=True):
self.genericWidgetHight = 24
# class info ----------------------------------------------------------
self.absWorld = True
self.zeroedDefaults = True
self.currentRBFSetupNodes = []
self.allSetupsInfo = None
self.setMenuBar(self.createMenuBar(hideMenuBar=hideMenuBar))
Expand Down Expand Up @@ -659,31 +648,23 @@ def addRBFToSetup(self):
if not drivenAttrs:
return
parentNode = False
drivenType = mc.nodeType(drivenNode)
if drivenType in ["transform", "joint"]:
if mc.nodeType(drivenNode) == "transform":
parentNode = True
drivenNode = rbf_node.addDrivenGroup(drivenNode)
# create RBFNode instance, apply settings
rbfNode = sortRBF(drivenNode, rbfType=rbfType)
rbfNode.setSetupName(setupName)
rbfNode.setDriverControlAttr(driverControl)
rbfNode.setDriverNode(driverNode, driverAttrs)
defaultVals = rbfNode.setDrivenNode(drivenNode,
drivenAttrs,
parent=parentNode)
rbfNode.setDrivenNode(drivenNode, drivenAttrs, parent=parentNode)
# Check if there any preexisting nodes in setup, if so copy pose index
if self.currentRBFSetupNodes:
currentRbfs = self.currentRBFSetupNodes[0]
print "Syncing poses indices from {} >> {}".format(currentRbfs,
rbfNode)
rbfNode.syncPoseIndices(self.currentRBFSetupNodes[0])
else:
if self.zeroedDefaults:
rbfNode.applyDefaultPose()
else:
poseInputs = rbf_node.getMultipleAttrs(driverNode, driverAttrs)
rbfNode.addPose(poseInput=poseInputs,
poseValue=defaultVals[1::2])
rbfNode.applyDefaultPose()
self.populateDriverInfo(rbfNode, rbfNode.getNodeInfo())
# add newly created RBFNode to list of current
self.currentRBFSetupNodes.append(rbfNode)
Expand All @@ -693,8 +674,7 @@ def addRBFToSetup(self):
self.populateDrivenWidgetInfo(tabDrivenWidget, weightInfo, rbfNode)
self.refreshRbfSetupList(setToSelection=setupName)
self.lockDriverWidgets()
if driverControl:
mc.select(driverControl)
mc.select(driverControl)

def refreshAllTables(self):
"""Convenience function to refresh all the tables on all the tabs
Expand Down Expand Up @@ -1576,15 +1556,6 @@ def toggleGetPoseType(self, toggleState):
self.absWorld = toggleState
print "Recording poses in world space set to: {}".format(toggleState)

def toggleDefaultType(self, toggleState):
"""records whether the user wants default poses to be zeroed
Args:
toggleState (bool): default True
"""
self.zeroedDefaults = toggleState
print "Default poses are zeroed: {}".format(toggleState)

# signal management -------------------------------------------------------
def connectSignals(self):
"""connect all the signals in the UI
Expand Down Expand Up @@ -1839,6 +1810,7 @@ def createMenuBar(self, hideMenuBar=False):
mainMenuBar = QtWidgets.QMenuBar()
mainMenuBar.setContentsMargins(0, 0, 0, 0)
file = mainMenuBar.addMenu("File")
file.setToolTipsVisible(True)
menu1 = file.addAction("Re-evaluate Nodes", self.reevalluateAllNodes)
menu1.setToolTip("Force all RBF nodes to re-revaluate.")
file.addAction("Export All", self.exportNodes)
Expand All @@ -1849,26 +1821,20 @@ def createMenuBar(self, hideMenuBar=False):
file.addAction("Delete Current Setup", self.__deleteSetup)
# mirror --------------------------------------------------------------
mirrorMenu = mainMenuBar.addMenu("Mirror")
mirrorMenu.setToolTipsVisible(True)
mirrorMenu1 = mirrorMenu.addAction("Mirror Setup", self.mirrorSetup)
mirrorMenu1.setToolTip("This will create a new setup.")

# settings ------------------------------------------------------------
settingsMenu = mainMenuBar.addMenu("Settings")
settingsMenu.setToolTipsVisible(True)
menuLabel = "Add poses in worldSpace"
worldSpaceMenuItem = settingsMenu.addAction(menuLabel)
worldSpaceMenuItem.toggled.connect(self.toggleGetPoseType)

worldSpaceMenuItem.setCheckable(True)
worldSpaceMenuItem.setChecked(True)
toolTip = "When ADDING NEW pose, should it be recorded in worldSpace."

menuLabel = "Default Poses is Zeroed"
zeroedDefaultsMenuItem = settingsMenu.addAction(menuLabel)
zeroedDefaultsMenuItem.toggled.connect(self.toggleDefaultType)

zeroedDefaultsMenuItem.setCheckable(True)
zeroedDefaultsMenuItem.setChecked(True)

worldSpaceMenuItem.setToolTip(toolTip)

# show override -------------------------------------------------------
Expand Down
Loading

0 comments on commit e5d788d

Please sign in to comment.