🐞 Bug Report
Description
The "Draw Component" in the right-click menu of the Shifter Guide Manager was incorrect when no component was selected.
Steps to Reproduce
- Deselect any component in the Maya scene, or deselect, or create a new scene.
- Select any component in the Shifter Guide Manager and right-click to select the "Draw Component" button.
Expected Behavior
The component selected in the manager should be created correctly in the scene.
Actual Behavior
The component is not created in the scene.
Maya Version
- Maya Version: 2025
- OS: Windows 11
mGear Version
- mGear Version: mgear_5.0.7
Error Log Formatting
# Traceback (most recent call last):
# File "\mgear_5.0.7\release\scripts\mgear\shifter\guide_manager_component.py", line 272, in draw_component
# guide_manager.draw_comp(x.data(), parent, showUI)
# \mgear_5.0.7\release\scripts\mgear\shifter\guide_manager.py", line 39, in draw_comp
# guide.drawNewComponent(parent, comp_type, showUI)
# \mgear_5.0.7\release\scripts\mgear\shifter\guide.py", line 824, in drawNewComponent
# if parent_root.hasAttr("ismodel"):
# ^^^^^^^^^^^^^^^^^^^
# AttributeError: 'bool' object has no attribute 'hasAttr'
Additional Context
After testing, the following adjustments can fix this error.
Rewrite
def draw_component(self, parent=None):
in guide_manager_component.py to
def draw_component(self, parent=None, *args):
or
rewrite
menu_item_01.triggered.connect(self.draw_component)
in _component_menu function to
menu_item_01.triggered.connect(lambda: self.draw_component())
🐞 Bug Report
Description
The "Draw Component" in the right-click menu of the Shifter Guide Manager was incorrect when no component was selected.
Steps to Reproduce
Expected Behavior
The component selected in the manager should be created correctly in the scene.
Actual Behavior
The component is not created in the scene.
Maya Version
mGear Version
Error Log Formatting
Additional Context
After testing, the following adjustments can fix this error.
Rewrite
in guide_manager_component.py to
or
rewrite
in _component_menu function to