Skip to content

Commit 7c3570f

Browse files
authored
Fix a compile bug in Traversals (#122)
* Fix a qt type bug, and allow users to move combos between groups * Get the latest devkit updates, and fix the mac/linux builds per outside suggestion * Make sure to initialize the solve types in traversals * Add arches to osx plugin (not python yet) * Use default container in linux, and just install the requirements
1 parent e7e4c76 commit 7c3570f

File tree

7 files changed

+56
-75
lines changed

7 files changed

+56
-75
lines changed

.github/workflows/main.yml

Lines changed: 31 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches: [ master ]
1010

1111
env:
12-
BUILD_TYPE: Release
12+
BUILD_TYPE: RelWithDebInfo
1313

1414
jobs:
1515

@@ -18,7 +18,7 @@ jobs:
1818
#
1919

2020
maya-win:
21-
runs-on: windows-2019
21+
runs-on: windows-latest
2222

2323
strategy:
2424
# Without this, all containers stop if any fail
@@ -29,11 +29,11 @@ jobs:
2929
matrix:
3030
include:
3131
- maya: "2022"
32-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_3_Update_DEVKIT_Windows.zip"
32+
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_5_Update_DEVKIT_Windows.zip"
3333
- maya: "2023"
34-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_DEVKIT_Windows.zip"
34+
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_3_Update_DEVKIT_Windows.zip"
3535
- maya: "2024"
36-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_1_Update_DEVKIT_Windows.zip"
36+
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_2_Update_DEVKIT_Windows.zip"
3737

3838
steps:
3939
- name: Checkout code
@@ -69,66 +69,23 @@ jobs:
6969
artifacts/plug-ins/simplex_maya.mll
7070
artifacts/pyModules/py*simplex.pyd
7171
72-
maya-macos-11:
73-
runs-on: macos-11
72+
maya-macos:
73+
runs-on: macos-latest
7474

7575
strategy:
7676
fail-fast: false
7777

7878
matrix:
7979
include:
8080
- maya: "2022"
81-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_3_Update_DEVKIT_Mac.dmg"
81+
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_5_Update_DEVKIT_Mac.dmg"
82+
arches: "x86_64"
8283
- maya: "2023"
83-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_DEVKIT_Mac.dmg"
84-
85-
steps:
86-
- name: Checkout code
87-
uses: actions/checkout@v3
88-
with:
89-
submodules: true
90-
91-
- name: Install devkit
92-
run: |
93-
curl -o devkit.dmg ${{matrix.devkit}}
94-
7z x devkit.dmg
95-
96-
- uses: maxim-lobanov/setup-xcode@v1
97-
with:
98-
xcode-version: '11.7'
99-
100-
- name: Configure CMake
101-
run: |
102-
cmake -G Xcode -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="$PWD/devkitBase"
103-
104-
- name: Build
105-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
106-
107-
- name: Repath Artifacts
108-
run: |
109-
mkdir -p artifacts/plug-ins
110-
mkdir -p artifacts/pyModules
111-
cp ./build/src/maya/${{env.BUILD_TYPE}}/simplex_maya.bundle artifacts/plug-ins
112-
cp ./build/src/python/${{env.BUILD_TYPE}}/py*simplex.so artifacts/pyModules
113-
114-
- name: Upload Artifacts
115-
uses: actions/upload-artifact@v3
116-
with:
117-
name: mac-${{matrix.maya}}
118-
path: |
119-
artifacts/plug-ins/simplex_maya.bundle
120-
artifacts/pyModules/py*simplex.so
121-
122-
maya-macos-12:
123-
runs-on: macos-12
124-
125-
strategy:
126-
fail-fast: false
127-
128-
matrix:
129-
include:
84+
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_3_Update_DEVKIT_Mac.dmg"
85+
arches: "x86_64"
13086
- maya: "2024"
131-
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_1_Update_DEVKIT_Mac.dmg"
87+
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_2_Update_DEVKIT_Mac.dmg"
88+
arches: "x86_64;arm64"
13289

13390
steps:
13491
- name: Checkout code
@@ -139,16 +96,15 @@ jobs:
13996
- name: Install devkit
14097
run: |
14198
curl -o devkit.dmg ${{matrix.devkit}}
142-
MOUNTDIR=$(hdiutil mount devkit.dmg | awk 'END {$1=$2=""; print $0}')
143-
cp -r $MOUNTDIR .
99+
hdiutil attach devkit.dmg
144100
145101
- uses: maxim-lobanov/setup-xcode@v1
146102
with:
147103
xcode-version: '13.4'
148104

149105
- name: Configure CMake
150106
run: |
151-
cmake -G Xcode -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="$PWD/devkitBase"
107+
cmake -G Xcode -DCMAKE_OSX_ARCHITECTURES="${{matrix.arches}}" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="/Volumes/devkitBase"
152108
153109
- name: Build
154110
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
@@ -170,36 +126,39 @@ jobs:
170126
171127
maya-linux:
172128
runs-on: ubuntu-latest
173-
container: scottenglert/maya-build:${{matrix.maya}}
174129

175130
strategy:
176131
fail-fast: false
177132

178133
matrix:
179134
include:
135+
- maya: "2022"
136+
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_5_Update_DEVKIT_Linux.tgz"
180137
- maya: "2023"
181-
year: "2023"
138+
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_3_Update_DEVKIT_Linux.tgz"
182139
- maya: "2024"
183-
year: "2024"
140+
devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_2_Update_DEVKIT_Linux.tgz"
184141

185142
steps:
186143
- name: Checkout code
187144
uses: actions/checkout@v3
188145
with:
189146
submodules: true
190147

191-
- name: Install latest cmake
148+
- name: Install OpenGL libraries
192149
run: |
193-
python3 -m pip install cmake
150+
sudo apt install libglu1-mesa-dev
194151
195-
- name: Configure CMake
152+
- name: Install devkit
196153
run: |
197-
mkdir build
198-
cd build
199-
cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="/usr/autodesk/devkitBase" ..
154+
curl -o devkit.tgz ${{matrix.devkit}}
155+
tar xvzf devkit.tgz
156+
157+
- name: Configure CMake
158+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION="${{matrix.maya}}" -DMAYA_DEVKIT_BASE="$PWD/devkitBase"
200159

201160
- name: Build
202-
run: cmake --build ./build --config ${{env.BUILD_TYPE}}
161+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
203162

204163
- name: Repath Artifacts
205164
run: |
@@ -221,7 +180,7 @@ jobs:
221180
#
222181

223182
python-win:
224-
runs-on: windows-2019
183+
runs-on: windows-latest
225184

226185
strategy:
227186
fail-fast: false
@@ -258,7 +217,7 @@ jobs:
258217
path: dist/*.whl
259218

260219
python-macos:
261-
runs-on: macos-12
220+
runs-on: macos-latest
262221

263222
strategy:
264223
fail-fast: false
@@ -346,7 +305,7 @@ jobs:
346305

347306
upload_release:
348307
name: Upload release
349-
needs: [maya-win, maya-linux, maya-macos-11, maya-macos-12, python-win, python-macos, python-linux]
308+
needs: [maya-win, maya-linux, maya-macos, python-win, python-macos, python-linux]
350309
runs-on: ubuntu-latest
351310

352311
steps:

mayaConfigure.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
setlocal
22

3-
SET MAYA_VERSION=2022
3+
SET MAYA_VERSION=2023
44
SET BUILD=mayabuild_%MAYA_VERSION%
55
SET COMPILER=Visual Studio 17 2022
66

simplexui/falloffDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def loadSimplex(self):
366366

367367
print("Adding Mappings")
368368
currentIndex = "currentIndex"
369-
if six.PY3 and QtLib.IsPySide2:
369+
if six.PY3 and (QtLib.IsPySide2 or QtLib.IsPyQt5):
370370
currentIndex = QByteArray(bytes("Test", encoding="utf-8"))
371371

372372
self._falloffMapper.addMapping(self.uiFalloffTypeCBOX, 1, currentIndex)

simplexui/menu/genericPlugins/_builtins.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ def registerComboTree(window, clickIdx, indexes, menu):
198198
setValsACT = menu.addAction("Set Selected Values")
199199
setValsACT.triggered.connect(self.setSliderVals)
200200

201+
setGroupMenu = menu.addMenu("Set Group")
202+
for group in window.simplex.comboGroups:
203+
gAct = setGroupMenu.addAction(group.name)
204+
gAct.triggered.connect(partial(self.setSelectedComboGroups, group))
205+
201206
menu.addSeparator()
202207

203208
setSolveMenu = menu.addMenu("Set Solve Type")

simplexui/menu/genericPlugins/exportSplit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ def exportSplitInterface(window):
5454
split = window.simplex.split(pBar)
5555
split.exportAbc(path, pBar)
5656
except ValueError as e:
57-
QMessageBox.warning(window, "Unsplittable", e.message)
57+
QMessageBox.warning(window, "Unsplittable", str(e))
5858
finally:
5959
pBar.close()

simplexui/simplexDialog.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,6 +1292,20 @@ def setSelectedSliderInterp(self, interp):
12921292
s.prog.interp = interp
12931293

12941294
# Combo Settings
1295+
def setSelectedComboGroups(self, group):
1296+
""" Set the group for the selected Combos
1297+
1298+
Parameters
1299+
----------
1300+
group : Group
1301+
The group that will take the selected Combos
1302+
"""
1303+
if not group:
1304+
return
1305+
combos = self.uiComboTREE.getSelectedItems(Combo)
1306+
group.take(combos)
1307+
self.uiComboTREE.viewport().update()
1308+
12951309
def setSelectedComboSolveType(self, stVal):
12961310
""" Set the solve type for the selected combos
12971311

src/lib/traversal.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Traversal::Traversal(
3232
ShapeController* progressCtrl, ShapeController* multiplierCtrl, bool valueFlip, bool multiplierFlip):
3333
ShapeController(name, prog, index), exact(true){
3434

35+
solveType = ComboSolve::None;
3536
if (multiplierCtrl->sliderType()) {
3637
multState.push_back(std::make_pair((Slider*)multiplierCtrl, multiplierFlip ? -1.0 : 1.0));
3738
}
@@ -65,6 +66,8 @@ Traversal::Traversal(
6566
std::unordered_map<Slider*, double> startSliders, endSliders;
6667
std::unordered_set<Slider*> allSliders;
6768

69+
this->solveType = solveType;
70+
6871
for (size_t i=0; i<startPairs.size(); ++i){
6972
startSliders[startPairs[i].first] = startPairs[i].second;
7073
allSliders.insert(startPairs[i].first);

0 commit comments

Comments
 (0)