Skip to content

Commit

Permalink
REMOVE: SYNOPTIC #431 #419
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcampos committed Dec 17, 2024
1 parent 6949050 commit 7fb0018
Show file tree
Hide file tree
Showing 32 changed files with 178 additions and 238,558 deletions.
4 changes: 0 additions & 4 deletions release/scripts/mgear/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ def install_main_menu():
import mgear.anim_picker.menu
mgear.anim_picker.menu.install()

# Install Synoptic Menu
import mgear.synoptic.menu
mgear.synoptic.menu.install()

# Install Flex Menu
import mgear.flex.menu
mgear.flex.menu.install()
Expand Down
6 changes: 0 additions & 6 deletions release/scripts/mgear/shifter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@

COMPONENT_PATH = os.path.join(os.path.dirname(__file__), "component")
TEMPLATE_PATH = os.path.join(COMPONENT_PATH, "templates")
SYNOPTIC_PATH = os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir, "synoptic", "tabs")
)

SHIFTER_COMPONENT_ENV_KEY = "MGEAR_SHIFTER_COMPONENT_PATH"

Expand Down Expand Up @@ -418,9 +415,6 @@ def initialHierarchy(self):
self.gearVersion_att = attribute.addAttribute(
self.model, "gear_version", "string", mgear.getVersion()
)
self.synoptic_att = attribute.addAttribute(
self.model, "synoptic", "string", str(self.options["synoptic"])
)
self.comments_att = attribute.addAttribute(
self.model, "comments", "string", str(self.options["comments"])
)
Expand Down
68 changes: 21 additions & 47 deletions release/scripts/mgear/shifter/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ def addParameters(self):
self.pJointRig = self.addParam("force_uniScale", "bool", True)
self.pJointConnect = self.addParam("connect_joints", "bool", True)
self.pJointSSC = self.addParam("force_SSC", "bool", False)
self.pSynoptic = self.addParam("synoptic", "string", "")

self.pDoPreCustomStep = self.addParam("doPreCustomStep", "bool", False)
self.pDoPostCustomStep = self.addParam(
Expand Down Expand Up @@ -1698,10 +1697,6 @@ def populate_controls(self):
)
# self.populateCheck(
# self.guideSettingsTab.force_SSC_joints_checkBox, "force_SSC")
self.populateAvailableSynopticTabs()

for item in self.root.attr("synoptic").get().split(","):
self.guideSettingsTab.rigTabs_listWidget.addItem(item)

tap = self.guideSettingsTab

Expand Down Expand Up @@ -1921,32 +1916,13 @@ def create_connections(self):
# partial(self.updateCheck,
# tap.force_SSC_joints_checkBox,
# "force_SSC"))
tap.addTab_pushButton.clicked.connect(
partial(
self.moveFromListWidget2ListWidget,
tap.available_listWidget,
tap.rigTabs_listWidget,
tap.rigTabs_listWidget,
"synoptic",
)
)
tap.removeTab_pushButton.clicked.connect(
partial(
self.moveFromListWidget2ListWidget,
tap.rigTabs_listWidget,
tap.available_listWidget,
tap.rigTabs_listWidget,
"synoptic",
)
)
tap.loadSkinPath_pushButton.clicked.connect(self.skinLoad)
tap.dataCollectorPath_pushButton.clicked.connect(
self.data_collector_path
)
tap.dataCollectorPathEmbbeded_pushButton.clicked.connect(
self.data_collector_pathEmbbeded
)
tap.rigTabs_listWidget.installEventFilter(self)

# colors connections
index_widgets = (
Expand Down Expand Up @@ -2232,9 +2208,7 @@ def create_connections(self):

def eventFilter(self, sender, event):
if event.type() == QtCore.QEvent.ChildRemoved:
if sender == self.guideSettingsTab.rigTabs_listWidget:
self.updateListAttr(sender, "synoptic")
elif sender == self.customStepTab.preCustomStep_listWidget:
if sender == self.customStepTab.preCustomStep_listWidget:
self.updateListAttr(sender, "preCustomStep")
elif sender == self.customStepTab.postCustomStep_listWidget:
self.updateListAttr(sender, "postCustomStep")
Expand Down Expand Up @@ -2368,31 +2342,31 @@ def reset_naming_extension(self):
self.root.attr("ctl_name_ext").set(naming.DEFAULT_CTL_EXT_NAME)
self.root.attr("joint_name_ext").set(naming.DEFAULT_JOINT_EXT_NAME)

def populateAvailableSynopticTabs(self):
# def populateAvailableSynopticTabs(self):

import mgear.shifter as shifter
# import mgear.shifter as shifter

defPath = os.environ.get("MGEAR_SYNOPTIC_PATH", None)
if not defPath or not os.path.isdir(defPath):
defPath = shifter.SYNOPTIC_PATH
# defPath = os.environ.get("MGEAR_SYNOPTIC_PATH", None)
# if not defPath or not os.path.isdir(defPath):
# defPath = shifter.SYNOPTIC_PATH

# Sanity check for folder existence.
if not os.path.isdir(defPath):
return
# # Sanity check for folder existence.
# if not os.path.isdir(defPath):
# return

tabsDirectories = [
name
for name in os.listdir(defPath)
if os.path.isdir(os.path.join(defPath, name))
]
# Quick clean the first empty item
if tabsDirectories and not tabsDirectories[0]:
self.guideSettingsTab.available_listWidget.takeItem(0)
# tabsDirectories = [
# name
# for name in os.listdir(defPath)
# if os.path.isdir(os.path.join(defPath, name))
# ]
# # Quick clean the first empty item
# if tabsDirectories and not tabsDirectories[0]:
# self.guideSettingsTab.available_listWidget.takeItem(0)

itemsList = self.root.attr("synoptic").get().split(",")
for tab in sorted(tabsDirectories):
if tab not in itemsList:
self.guideSettingsTab.available_listWidget.addItem(tab)
# itemsList = self.root.attr("synoptic").get().split(",")
# for tab in sorted(tabsDirectories):
# if tab not in itemsList:
# self.guideSettingsTab.available_listWidget.addItem(tab)

def skinLoad(self, *args):
startDir = self.root.attr("skin").get()
Expand Down
Loading

0 comments on commit 7fb0018

Please sign in to comment.