mgear-dev / shifter_classic_components

Components library for Shifter
MIT License
1 stars 10 forks source link

chain_01 won't build when set to IK only. #62

Closed jhoolmans closed 5 years ago

jhoolmans commented 5 years ago

Can't set controlRelatives when building IK only.

# Error: line 1: 'Component' object has no attribute 'fk_ctl'
# Traceback (most recent call last):
#   File "<maya console>", line 3, in <module>
#   File "/home/jeroenh/Development/mgear_dev/mgear_dist/release/scripts/mgear/shifter/guide_manager.py", line 62, in build_from_selection
#     rg.buildFromSelection()
#   File "/home/jeroenh/Development/mgear_dev/mgear_dist/release/scripts/mgear/shifter/__init__.py", line 189, in buildFromSelection
#     self.build()
#   File "/home/jeroenh/Development/mgear_dev/mgear_dist/release/scripts/mgear/shifter/__init__.py", line 215, in build
#     self.processComponents()
#   File "/home/jeroenh/Development/mgear_dev/mgear_dist/release/scripts/mgear/shifter/__init__.py", line 393, in processComponents
#     comp.stepMethods[i]()
#   File "/home/jeroenh/Development/mgear_dev/mgear_dist/release/scripts/mgear/shifter/component/__init__.py", line 120, in step_00
#     self.setRelation()
#   File "/home/jeroenh/Development/mgear_dev/mgear_dist/release/scripts/mgear/shifter_classic_components/chain_01/__init__.py", line 284, in setRelation
#     self.controlRelatives["root"] = self.fk_ctl[0]
# AttributeError: 'Component' object has no attribute 'fk_ctl' # 

A fix could be to set self.ik_ctl as controlRelatives for all #_locs.