Skip to content

Commit

Permalink
Merge pull request #75 from GenEugene/develop
Browse files Browse the repository at this point in the history
Version 1.0.3
  • Loading branch information
GenEugene committed Jan 13, 2024
2 parents a06e4f9 + accacb7 commit 44afcc9
Show file tree
Hide file tree
Showing 20 changed files with 179 additions and 136 deletions.
9 changes: 4 additions & 5 deletions DRAG_AND_DROP_INSTALL.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@

import os

from GETOOLS_SOURCE.values import Icons
from GETOOLS_SOURCE.values import License

from GETOOLS_SOURCE.utils import Install
from GETOOLS_SOURCE.utils import Shelf

from GETOOLS_SOURCE.values import Icons
from GETOOLS_SOURCE.values import License

# Get script directory path
scriptPath = os.path.dirname(__file__)
Expand All @@ -53,8 +52,8 @@
{func}
import GETOOLS_SOURCE.modules.GeneralWindow as gtwindow
gtwindow.GeneralWindow().RUN_DOCKED(\"{path}\")\
from GETOOLS_SOURCE.modules import GeneralWindow
GeneralWindow.GeneralWindow().RUN_DOCKED(\"{path}\")\
""".format(func = functionAddPathToEnvironment, path = scriptPath, license = License.text)


Expand Down
16 changes: 8 additions & 8 deletions GETOOLS_SOURCE/modules/CenterOfMass.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
import maya.cmds as cmds
from functools import partial

from GETOOLS_SOURCE.utils import Baker
from GETOOLS_SOURCE.utils import Colors
from GETOOLS_SOURCE.utils import Constraints
from GETOOLS_SOURCE.utils import Locators
from GETOOLS_SOURCE.utils import Selector
from GETOOLS_SOURCE.utils import Text

from GETOOLS_SOURCE.modules import Settings
from ..modules import Settings

from ..utils import Baker
from ..utils import Colors
from ..utils import Constraints
from ..utils import Locators
from ..utils import Selector
from ..utils import Text

class CenterOfMassAnnotations:
# Setup
Expand Down
108 changes: 54 additions & 54 deletions GETOOLS_SOURCE/modules/GeneralWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@
import maya.cmds as cmds
from functools import partial

from GETOOLS_SOURCE.utils import Colors
from GETOOLS_SOURCE.utils import Install
from GETOOLS_SOURCE.utils import Layers
from GETOOLS_SOURCE.utils import MayaSettings
from GETOOLS_SOURCE.utils import MotionTrail
from GETOOLS_SOURCE.utils import Scene
from GETOOLS_SOURCE.utils import Selector
from ..modules import CenterOfMass
from ..modules import Overlappy
from ..modules import Rigging
from ..modules import Settings
from ..modules import Tools

from GETOOLS_SOURCE.modules import CenterOfMass as com
from GETOOLS_SOURCE.modules import Overlappy as ovlp
from GETOOLS_SOURCE.modules import Rigging as rig
from GETOOLS_SOURCE.modules import Settings
from GETOOLS_SOURCE.modules import Tools as tls
from ..utils import Colors
from ..utils import Install
from ..utils import Layers
from ..utils import MayaSettings
from ..utils import MotionTrail
from ..utils import Scene
from ..utils import Selector

from GETOOLS_SOURCE.values import Icons
from ..values import Icons

class GeneralWindow:
version = "v1.0.2"
version = "v1.0.3"
name = "GETools"
title = name + " " + version

Expand Down Expand Up @@ -77,24 +77,24 @@ def LayoutMenuBar(self, parentLayout):
cmds.menuBarLayout()

cmds.menu(label = "File")
cmds.menuItem(label = "Reload Scene (force)", command = Scene.Reload)
cmds.menuItem(label = "Exit Maya (force)", command = Scene.ExitMaya)
cmds.menuItem(label = "Reload Scene (force)", command = Scene.Reload, image = Icons.reset)
cmds.menuItem(label = "Exit Maya (force)", command = Scene.ExitMaya, image = Icons.off)
cmds.menuItem(divider = True)
cmds.menuItem(label = "Restart GETools", command = partial(self.RUN_DOCKED, "", True))
cmds.menuItem(label = "Close GETools", command = self.DockDelete)
cmds.menuItem(label = "Restart GETools", command = partial(self.RUN_DOCKED, "", True), image = Icons.reset)
cmds.menuItem(label = "Close GETools", command = self.DockDelete, image = Icons.off)

# cmds.menu(label = "Edit", tearOff = True)
# cmds.menuItem(label = "Save Settings")
# cmds.menuItem(label = "Load Settings")
# cmds.menuItem(label = "Reset Settings")

cmds.menu(label = "Display", tearOff = True)
cmds.menuItem(label = "Collapse All", command = partial(self.FramesCollapse, True))
cmds.menuItem(label = "Expand All", command = partial(self.FramesCollapse, False))
cmds.menuItem(label = "Collapse All", command = partial(self.FramesCollapse, True), image = Icons.visibleOff)
cmds.menuItem(label = "Expand All", command = partial(self.FramesCollapse, False), image = Icons.visibleOn)
cmds.menuItem(dividerLabel = "Docking", divider = True)
cmds.menuItem(label = "Dock Left", command = partial(self.DockToSide, Settings.dockAllowedAreas[0]))
cmds.menuItem(label = "Dock Right", command = partial(self.DockToSide, Settings.dockAllowedAreas[1]))
cmds.menuItem(label = "Undock", command = self.DockOff)
cmds.menuItem(label = "Dock Left", command = partial(self.DockToSide, Settings.dockAllowedAreas[0]), image = Icons.arrowLeft)
cmds.menuItem(label = "Dock Right", command = partial(self.DockToSide, Settings.dockAllowedAreas[1]), image = Icons.arrowRight)
cmds.menuItem(label = "Undock", command = self.DockOff, image = Icons.arrowDown)

def ColorsPalette(*args):
colorCalibration = Colors.ColorsPalette()
Expand All @@ -104,10 +104,10 @@ def PrintChannelBoxAttributes(*args):
cmds.menu(label = "Utils", tearOff = True)
cmds.menuItem(label = "Select Transform Hiererchy", command = Selector.SelectTransformHierarchy)
cmds.menuItem(divider = True)
cmds.menuItem(label = "Print selected objects to console", command = Selector.PrintSelected)
cmds.menuItem(label = "Print channel box selected attributes", command = PrintChannelBoxAttributes)
cmds.menuItem(label = "Print selected objects to console", command = Selector.PrintSelected, image = Icons.text)
cmds.menuItem(label = "Print channel box selected attributes", command = PrintChannelBoxAttributes, image = Icons.text)
cmds.menuItem(divider = True)
cmds.menuItem(label = "Open Colors Palette", command = ColorsPalette)
cmds.menuItem(label = "Open Colors Palette", command = ColorsPalette, image = Icons.color)

self.LayoutMenuInstall()

Expand All @@ -126,7 +126,7 @@ def LinkReport(self): cmds.showHelp("https://github.com/GenEugene/GETools/discus
cmds.menuItem(label = "About GETools", enable = False, image = self.directory + Icons.get) # TODO add window with information
cmds.menuItem(label = "Version History", command = LinkVersionHistory)
cmds.menuItem(dividerLabel = "Links", divider = True)
cmds.menuItem(label = "GitHub", command = LinkGithub)
cmds.menuItem(label = "GitHub", command = LinkGithub, image = Icons.home)
cmds.menuItem(label = "Gumroad", command = LinkGumroad)
cmds.menuItem(dividerLabel = "HOW TO USE", divider = True)
cmds.menuItem(label = "Documentation", command = LinkGithubWiki, image = Icons.help)
Expand Down Expand Up @@ -170,7 +170,7 @@ def LayerMove(*args):
def LayoutMenuInstall(self):
cmds.menu(label = "To Shelf", tearOff = True)
###
cmds.menuItem(subMenu = True, label = "General")
cmds.menuItem(subMenu = True, label = "General", image = Icons.fileOpen)
cmds.menuItem(dividerLabel = "File", divider = True)
cmds.menuItem(label = "Reload Scene (force)", command = partial(Install.ToShelf_ReloadScene, self.directory))
cmds.menuItem(label = "Exit Maya (force)", command = partial(Install.ToShelf_ExitMaya, self.directory))
Expand All @@ -188,26 +188,26 @@ def LayoutMenuInstall(self):
cmds.menuItem(label = "200%", command = partial(Install.ToShelf_LocatorsSizeScale200, self.directory))
cmds.setParent('..', menu = True)
#
cmds.menuItem(subMenu = True, label = "Create")
cmds.menuItem(subMenu = True, label = "Create", image = Icons.locator)
cmds.menuItem(label = "Locator", command = partial(Install.ToShelf_LocatorCreate, self.directory))
cmds.menuItem(label = "Match", command = partial(Install.ToShelf_LocatorsMatch, self.directory))
cmds.menuItem(label = "Parent", command = partial(Install.ToShelf_LocatorsParent, self.directory))
cmds.setParent('..', menu = True)
#
cmds.menuItem(subMenu = True, label = "Pin")
cmds.menuItem(subMenu = True, label = "Pin", image = Icons.pin)
cmds.menuItem(label = "Pin", command = partial(Install.ToShelf_LocatorsPin, self.directory))
cmds.menuItem(label = "Without reverse constraint", command = partial(Install.ToShelf_LocatorsPinWithoutReverse, self.directory))
cmds.menuItem(label = "POS", command = partial(Install.ToShelf_LocatorsPinPos, self.directory))
cmds.menuItem(label = "ROT", command = partial(Install.ToShelf_LocatorsPinRot, self.directory))
cmds.setParent('..', menu = True)
#
cmds.menuItem(subMenu = True, label = "Relative")
cmds.menuItem(subMenu = True, label = "Relative", image = Icons.pinInvert)
cmds.menuItem(label = "Relative", command = partial(Install.ToShelf_LocatorsRelative, self.directory))
cmds.menuItem(label = "Skip last object reverse constraint", command = partial(Install.ToShelf_LocatorsRelativeSkipLast, self.directory))
cmds.menuItem(label = "Without reverse constraint", command = partial(Install.ToShelf_LocatorsRelativeWithoutReverse, self.directory))
cmds.setParent('..', menu = True)
#
cmds.menuItem(subMenu = True, label = "Aim")
cmds.menuItem(subMenu = True, label = "Aim", image = Icons.pin)
minus = "-"
plus = "+"
axisX = "X"
Expand Down Expand Up @@ -255,21 +255,21 @@ def LayoutMenuInstall(self):
cmds.menuItem(label = "ROT", command = partial(Install.ToShelf_BakeByLast, self.directory, False, True))
cmds.setParent('..', menu = True)
#
cmds.menuItem(subMenu = True, label = "World")
cmds.menuItem(subMenu = True, label = "World", image = Icons.world)
cmds.menuItem(label = "World", command = partial(Install.ToShelf_BakeByWorld, self.directory, True, True))
cmds.menuItem(label = "POS", command = partial(Install.ToShelf_BakeByWorld, self.directory, True, False))
cmds.menuItem(label = "ROT", command = partial(Install.ToShelf_BakeByWorld, self.directory, False, True))
cmds.setParent('..', menu = True)
#
cmds.menuItem(dividerLabel = "TOOLS - Animation", divider = True)
###
cmds.menuItem(subMenu = True, label = "Delete")
cmds.menuItem(subMenu = True, label = "Delete", image = Icons.delete)
cmds.menuItem(label = "Animation", command = partial(Install.ToShelf_DeleteKeys, self.directory))
cmds.menuItem(label = "Nonkeyable", command = partial(Install.ToShelf_DeleteNonkeyable, self.directory))
cmds.menuItem(label = "Static", command = partial(Install.ToShelf_DeleteStatic, self.directory))
cmds.setParent('..', menu = True)
#
cmds.menuItem(label = "Euler Filter", command = partial(Install.ToShelf_EulerFilter, self.directory))
cmds.menuItem(label = "Euler Filter", command = partial(Install.ToShelf_EulerFilter, self.directory), image = Icons.filter)
#
cmds.menuItem(subMenu = True, label = "Infinity")
cmds.menuItem(label = "Constant", command = partial(Install.ToShelf_SetInfinity, self.directory, 1))
Expand Down Expand Up @@ -308,7 +308,7 @@ def LayoutMenuInstall(self):
#
cmds.menuItem(dividerLabel = "RIGGING - Constraints", divider = True)
###
cmds.menuItem(subMenu = True, label = "Constraints")
cmds.menuItem(subMenu = True, label = "Constraints", image = Icons.constraint)
cmds.menuItem(label = "Parent", command = partial(Install.ToShelf_Constraint, self.directory, False, True, False, False, False))
cmds.menuItem(label = "Point", command = partial(Install.ToShelf_Constraint, self.directory, False, False, True, False, False))
cmds.menuItem(label = "Orient", command = partial(Install.ToShelf_Constraint, self.directory, False, False, False, True, False))
Expand All @@ -320,29 +320,29 @@ def LayoutMenuInstall(self):
cmds.menuItem(label = "Scale with maintain", command = partial(Install.ToShelf_Constraint, self.directory, True, False, False, False, True))
cmds.setParent('..', menu = True)
#
cmds.menuItem(subMenu = True, label = "Connections")
cmds.menuItem(subMenu = True, label = "Connections", image = Icons.constraint)
cmds.menuItem(label = "Disconnect", command = partial(Install.ToShelf_DisconnectTargets, self.directory))
cmds.menuItem(label = "Delete Constraints", command = partial(Install.ToShelf_DeleteConstraints, self.directory))
cmds.setParent('..', menu = True)
#
cmds.menuItem(dividerLabel = "RIGGING - Utils", divider = True)
###
cmds.menuItem(subMenu = True, label = "Rotate Order")
cmds.menuItem(label = "Show", command = partial(Install.ToShelf_RotateOrder, self.directory, True))
cmds.menuItem(label = "Hide", command = partial(Install.ToShelf_RotateOrder, self.directory, False))
cmds.menuItem(label = "Show", command = partial(Install.ToShelf_RotateOrder, self.directory, True), image = Icons.visibleOn)
cmds.menuItem(label = "Hide", command = partial(Install.ToShelf_RotateOrder, self.directory, False), image = Icons.visibleOff)
cmds.setParent('..', menu = True)
#
cmds.menuItem(subMenu = True, label = "Segment Scale Compensate")
cmds.menuItem(label = "On", command = partial(Install.ToShelf_SegmentScaleCompensate, self.directory, True))
cmds.menuItem(label = "Off", command = partial(Install.ToShelf_SegmentScaleCompensate, self.directory, False))
cmds.menuItem(subMenu = True, label = "Segment Scale Compensate", image = Icons.joint)
cmds.menuItem(label = "On", command = partial(Install.ToShelf_SegmentScaleCompensate, self.directory, True), image = Icons.on)
cmds.menuItem(label = "Off", command = partial(Install.ToShelf_SegmentScaleCompensate, self.directory, False), image = Icons.off)
cmds.setParent('..', menu = True)
#
cmds.menuItem(subMenu = True, label = "Joint Draw Style")
cmds.menuItem(label = "Bone", command = partial(Install.ToShelf_JointDrawStyle, self.directory, 0))
cmds.menuItem(label = "Hidden", command = partial(Install.ToShelf_JointDrawStyle, self.directory, 2))
cmds.menuItem(subMenu = True, label = "Joint Draw Style", image = Icons.joint)
cmds.menuItem(label = "Bone", command = partial(Install.ToShelf_JointDrawStyle, self.directory, 0), image = Icons.visibleOn)
cmds.menuItem(label = "Hidden", command = partial(Install.ToShelf_JointDrawStyle, self.directory, 2), image = Icons.visibleOff)
cmds.setParent('..', menu = True)
#
cmds.menuItem(label = "Copy Skin Weights From Last Selected", command = partial(Install.ToShelf_CopySkin, self.directory))
cmds.menuItem(label = "Copy Skin Weights From Last Selected", command = partial(Install.ToShelf_CopySkin, self.directory), image = Icons.copy)
#
cmds.menuItem(dividerLabel = "EXPERIMENTAL", divider = True)
###
Expand All @@ -360,17 +360,17 @@ def LayoutTitle(self, parentLayout): # TODO figure out how to use resizeable ima
# cmds.image(image = self.directory + Icons.get, width = size, height = size)

def LayoutTools(self, parentLayout):
self.frameTools = cmds.frameLayout("layoutTools", parent = parentLayout, label = "1. " + tls.Tools.title, collapsable = True, backgroundColor = Settings.frames1Color, marginWidth = Settings.margin, marginHeight = Settings.margin)
tls.Tools().UICreate(self.frameTools)
self.frameTools = cmds.frameLayout("layoutTools", parent = parentLayout, label = "1. " + Tools.Tools.title, collapsable = True, backgroundColor = Settings.frames1Color, marginWidth = Settings.margin, marginHeight = Settings.margin)
Tools.Tools().UICreate(self.frameTools)
def LayoutRigging(self, parentLayout):
self.frameRigging = cmds.frameLayout("layoutRigging", parent = parentLayout, label = "2. " + rig.Rigging.title, collapsable = True, backgroundColor = Settings.frames1Color, marginWidth = Settings.margin, marginHeight = Settings.margin)
rig.Rigging().UICreate(self.frameRigging)
self.frameRigging = cmds.frameLayout("layoutRigging", parent = parentLayout, label = "2. " + Rigging.Rigging.title, collapsable = True, backgroundColor = Settings.frames1Color, marginWidth = Settings.margin, marginHeight = Settings.margin)
Rigging.Rigging().UICreate(self.frameRigging)
def LayoutOverlappy(self, parentLayout):
self.frameOverlappy = cmds.frameLayout("layoutOverlappy", parent = parentLayout, label = "3. " + ovlp.Overlappy.title, collapsable = True, backgroundColor = Settings.frames1Color, marginWidth = Settings.margin, marginHeight = Settings.margin)
ovlp.Overlappy().UICreate(self.frameOverlappy)
self.frameOverlappy = cmds.frameLayout("layoutOverlappy", parent = parentLayout, label = "3. " + Overlappy.Overlappy.title, collapsable = True, backgroundColor = Settings.frames1Color, marginWidth = Settings.margin, marginHeight = Settings.margin)
Overlappy.Overlappy().UICreate(self.frameOverlappy)
def LayoutCenterOfMass(self, parentLayout):
self.frameCenterOfMass = cmds.frameLayout("layoutCenterOfMass", parent = parentLayout, label = "4. " + com.CenterOfMass.title, collapsable = True, backgroundColor = Settings.frames1Color, marginWidth = Settings.margin, marginHeight = Settings.margin)
com.CenterOfMass().UICreate(self.frameCenterOfMass)
self.frameCenterOfMass = cmds.frameLayout("layoutCenterOfMass", parent = parentLayout, label = "4. " + CenterOfMass.CenterOfMass.title, collapsable = True, backgroundColor = Settings.frames1Color, marginWidth = Settings.margin, marginHeight = Settings.margin)
CenterOfMass.CenterOfMass().UICreate(self.frameCenterOfMass)
def LayoutExperimental(self, parentLayout):
self.frameExperimental = cmds.frameLayout("layoutExperimental", parent = parentLayout, label = "5. " + "EXPERIMENTAL", collapsable = True, backgroundColor = Settings.frames1Color, marginWidth = Settings.margin, marginHeight = Settings.margin)
cmds.popupMenu()
Expand Down
41 changes: 21 additions & 20 deletions GETOOLS_SOURCE/modules/Overlappy.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,21 @@
from math import pow, sqrt
from functools import partial

from GETOOLS_SOURCE.values import Enums

from GETOOLS_SOURCE.utils import Animation
from GETOOLS_SOURCE.utils import Baker
from GETOOLS_SOURCE.utils import Colors
from GETOOLS_SOURCE.utils import Constraints
from GETOOLS_SOURCE.utils import Layers
from GETOOLS_SOURCE.utils import MayaSettings
from GETOOLS_SOURCE.utils import Selector
from GETOOLS_SOURCE.utils import Text
from GETOOLS_SOURCE.utils import Timeline
from GETOOLS_SOURCE.utils import UI

from GETOOLS_SOURCE.modules import Settings
from ..modules import Settings

from ..utils import Animation
from ..utils import Baker
from ..utils import Colors
from ..utils import Constraints
from ..utils import Layers
from ..utils import MayaSettings
from ..utils import Selector
from ..utils import Text
from ..utils import Timeline
from ..utils import UI

from ..values import Enums
from ..values import Icons

class OverlappyAnnotations:
# Setup
Expand Down Expand Up @@ -187,14 +188,14 @@ def UILayoutMenuBar(self, layoutMain, windowWidthMargin):
cmds.menuBarLayout()

cmds.menu(label = "Edit")
cmds.menuItem(label = "Reset Settings", command = self._ResetAllValues)
cmds.menuItem(label = "Reset Settings", command = self._ResetAllValues, image = Icons.rotateClockwise)

cmds.menu(label = "Select", tearOff = True)
cmds.menuItem(label = "Object", command = self._SelectObject)
cmds.menuItem(label = "Particle", command = self._SelectParticle)
cmds.menuItem(label = "Nucleus", command = self._SelectNucleus)
cmds.menuItem(label = "Target locator", command = self._SelectTarget)
cmds.menuItem(label = "Aim locator", command = self._SelectAim)
cmds.menuItem(label = "Object", command = self._SelectObject, image = Icons.cursor)
cmds.menuItem(label = "Particle", command = self._SelectParticle, image = Icons.particle)
cmds.menuItem(label = "Nucleus", command = self._SelectNucleus, image = Icons.nucleus)
cmds.menuItem(label = "Target locator", command = self._SelectTarget, image = Icons.locator)
cmds.menuItem(label = "Aim locator", command = self._SelectAim, image = Icons.locator)
def UILayoutButtons(self, layoutMain, windowWidthMargin, lineHeight):
# SETUP
self.layoutButtons = cmds.frameLayout("layoutButtons", label = Settings.frames2Prefix + "BUTTONS", parent = layoutMain, collapsable = True, backgroundColor = Settings.frames2Color)
Expand Down
15 changes: 7 additions & 8 deletions GETOOLS_SOURCE/modules/Rigging.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@
import maya.cmds as cmds
from functools import partial

from GETOOLS_SOURCE.utils import Colors
from GETOOLS_SOURCE.utils import Constraints
from GETOOLS_SOURCE.utils import Other
from GETOOLS_SOURCE.utils import Selector
from GETOOLS_SOURCE.utils import Skinning
from GETOOLS_SOURCE.utils import UI

from GETOOLS_SOURCE.modules import Settings
from ..modules import Settings

from ..utils import Colors
from ..utils import Constraints
from ..utils import Other
from ..utils import Skinning
from ..utils import UI

class RiggingAnnotations:
# Constraints
Expand Down
2 changes: 1 addition & 1 deletion GETOOLS_SOURCE/modules/Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Author: Eugene Gataulin [email protected] https://www.linkedin.com/in/geneugene

from GETOOLS_SOURCE.utils import Colors
from ..utils import Colors

windowName = "windowGETools"
dockName = "dockGETools"
Expand Down
Loading

0 comments on commit 44afcc9

Please sign in to comment.