Skip to content

Commit 9d26275

Browse files
authored
Merge pull request #115 from GenEugene/Maya-2020
Maya 2020 compatibility
2 parents 9e6a242 + e818e4f commit 9d26275

File tree

8 files changed

+51
-28
lines changed

8 files changed

+51
-28
lines changed

GETOOLS_SOURCE/modules/CenterOfMass.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from functools import partial
2626

2727
from .. import Settings
28-
from ..modules import Options
2928
from ..utils import Baker
3029
from ..utils import Colors
3130
from ..utils import Constraints
@@ -88,8 +87,13 @@ class CenterOfMass:
8887
_name = "CENTER OF MASS"
8988
_title = _name + " " + _version
9089

91-
def __init__(self, options: Options.PluginVariables):
90+
def __init__(self, options):
9291
self.optionsPlugin = options
92+
### Check Maya version to avoid cycle import, Maya 2020 and older can't use cycle import
93+
if cmds.about(version = True) in ["2022", "2023", "2024", "2025"]:
94+
from ..modules import Options
95+
if isinstance(options, Options.PluginVariables):
96+
self.optionsPlugin = options
9397

9498
self.COMObject = None
9599
self.CachedSelectedObjects = None

GETOOLS_SOURCE/modules/Experimental.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
# from functools import partial
2626

2727
from .. import Settings
28-
from ..modules import Options
2928
from ..utils import File
3029
from ..utils import Layers
3130
from ..utils import Selector
@@ -38,8 +37,13 @@
3837
class Experimental:
3938
_title = "EXPERIMENTAL"
4039

41-
def __init__(self, options: Options.PluginVariables):
40+
def __init__(self, options):
4241
self.optionsPlugin = options
42+
### Check Maya version to avoid cycle import, Maya 2020 and older can't use cycle import
43+
if cmds.about(version = True) in ["2022", "2023", "2024", "2025"]:
44+
from ..modules import Options
45+
if isinstance(options, Options.PluginVariables):
46+
self.optionsPlugin = options
4347

4448
def UICreate(self, layoutMain):
4549
# cmds.popupMenu()

GETOOLS_SOURCE/modules/GeneralWindow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050

5151
class GeneralWindow:
52-
_version = "v1.4.3"
52+
_version = "v1.4.4"
5353
_name = "GETools"
5454
_title = _name + " " + _version
5555

GETOOLS_SOURCE/modules/Overlappy.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from functools import partial
2828

2929
from .. import Settings
30-
from ..modules import Options
3130
from ..utils import Animation
3231
from ..utils import Attributes
3332
from ..utils import Baker
@@ -182,8 +181,14 @@ class Overlappy:
182181
_name = "OVERLAPPY"
183182
_title = _name + " " + _version
184183

185-
def __init__(self, options: Options.PluginVariables):
184+
def __init__(self, options):
186185
self.optionsPlugin = options
186+
### Check Maya version to avoid cycle import, Maya 2020 and older can't use cycle import
187+
if cmds.about(version = True) in ["2022", "2023", "2024", "2025"]:
188+
from ..modules import Options
189+
if isinstance(options, Options.PluginVariables):
190+
self.optionsPlugin = options
191+
187192
self.directoryPresets = self.optionsPlugin.directory + Settings.pathPresets # TODO temporary solution, need to unify this logic for other modules and simply reuse
188193

189194
### VALUES

GETOOLS_SOURCE/modules/Rigging.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from functools import partial
2626

2727
from .. import Settings
28-
from ..modules import Options
2928
from ..utils import Blendshapes
3029
from ..utils import Colors
3130
from ..utils import Constraints
@@ -77,8 +76,13 @@ class Rigging:
7776
_name = "RIGGING"
7877
_title = _name + " " + _version
7978

80-
def __init__(self, options: Options.PluginVariables):
79+
def __init__(self, options):
8180
self.optionsPlugin = options
81+
### Check Maya version to avoid cycle import, Maya 2020 and older can't use cycle import
82+
if cmds.about(version = True) in ["2022", "2023", "2024", "2025"]:
83+
from ..modules import Options
84+
if isinstance(options, Options.PluginVariables):
85+
self.optionsPlugin = options
8286

8387
self.checkboxConstraintReverse = None
8488
self.checkboxConstraintMaintain = None

GETOOLS_SOURCE/modules/Tools.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from functools import partial
2626

2727
from .. import Settings
28-
from ..modules import Options
2928
from ..utils import Animation
3029
from ..utils import Baker
3130
from ..utils import Colors
@@ -115,8 +114,13 @@ class Tools:
115114
_name = "TOOLS"
116115
_title = _name + " " + _version
117116

118-
def __init__(self, options: Options.PluginVariables):
117+
def __init__(self, options):
119118
self.optionsPlugin = options
119+
### Check Maya version to avoid cycle import, Maya 2020 and older can't use cycle import
120+
if cmds.about(version = True) in ["2022", "2023", "2024", "2025"]:
121+
from ..modules import Options
122+
if isinstance(options, Options.PluginVariables):
123+
self.optionsPlugin = options
120124

121125
self.checkboxLocatorHideParent = None
122126
self.checkboxLocatorSubLocator = None

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# GETools
22
Free animation tools for `Autodesk Maya 2020, 2022, 2023, 2024, 2025.`
33

4-
Version `2020` has it's own branch `Maya-2020` https://github.com/GenEugene/GETools/tree/Maya-2020 because of some limitations of old Python api.
5-
64
Discover tools for creating locators, space switching, simulating secondary animation, setting up the center of mass, and more.
75

86
***

changelog.txt

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,41 @@
11
GETools changelog
22

3+
v1.4.4
4+
- added Maya version check to avoid compatibility issues with Maya 2020 and older.
5+
- removed requirement to use separate GETools version for Maya 2020.
6+
37
v1.4.3
4-
- [OVERLAPPY] fixed loop mode with rootmotion
8+
- [OVERLAPPY] fixed loop mode with rootmotion.
59

610
v1.4.2
7-
- [OVERLAPPY] added default preset auto loading. If not exists, use Built-in preset
8-
- [OVERLAPPY] removed "Reset Settings" button
11+
- [OVERLAPPY] added default preset auto loading. If not exists, use Built-in preset.
12+
- [OVERLAPPY] removed "Reset Settings" button.
913

1014
v1.4.1
11-
- fixed global variables referencing between all GETools modules (Maya 2020 and older can't use these features)
12-
- added separate Github branch for Maya version 2020
15+
- fixed global variables referencing between all GETools modules (Maya 2020 and older can't use these features).
16+
- added separate Github branch for Maya version 2020.
1317

1418
v1.4.0
15-
- [TOOLS] added "Polygon With Locators" button to create custom polygons with locators for each vertex
16-
- [TOOLS] extracted Rigging UI code blocks to separate functions
17-
- [UTILS] removed "Print Animatable Attributes With Shapes" button because of redundancy
18-
- [UI] changed some button names
19+
- [TOOLS] added "Polygon With Locators" button to create custom polygons with locators for each vertex.
20+
- [TOOLS] extracted Rigging UI code blocks to separate functions.
21+
- [UTILS] removed "Print Animatable Attributes With Shapes" button because of redundancy.
22+
- [UI] changed some button names.
1923

2024
v1.3.8
21-
- [CENTER OF MASS] fixed constraining to multiple selected objects
22-
- [CENTER OF MASS] simplified UI buttons, removed redundant and merge similar
25+
- [CENTER OF MASS] fixed constraining to multiple selected objects.
26+
- [CENTER OF MASS] simplified UI buttons, removed redundant and merge similar.
2327

2428
v1.3.7
25-
- [OVERLAPPY] fixed "Load/Save Settings" missing path to folder after Getools was restarted through "Restart GETools" button
29+
- [OVERLAPPY] fixed "Load/Save Settings" missing path to folder after Getools was restarted through "Restart GETools" button.
2630

2731
v1.3.6
28-
- added link for Tutorial Video button
32+
- added link for Tutorial Video button.
2933

3034
v1.3.5
31-
- [RIGGING] fixed bug with constraining same object multiple times to create more than 1 parent
35+
- [RIGGING] fixed bug with constraining same object multiple times to create more than 1 parent.
3236

3337
v1.3.4
34-
- [RIGGING] fixed bug with constraint reverse checkbox
38+
- [RIGGING] fixed bug with constraint reverse checkbox.
3539

3640
v1.3.3
3741
- [OVERLAPPY] fixed new keys generation if original object already has animation curve on attribute.

0 commit comments

Comments
 (0)