Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renaming components will fail if the names are not unique #70

Closed
miquelcampos opened this issue Aug 25, 2019 · 1 comment · Fixed by #71

Comments

@miquelcampos
Copy link
Member

commented Aug 25, 2019

if the rig is built in the scene and we edit the guide. Is possible to have name clashing. This will cause the guide to corrupt due to the name duplication:

# Traceback (most recent call last):
#   File "D:\Dropbox\WIP\Training\improved_deformation_and_custom_steps\env\mgear\mgear_3.2.0\scripts\mgear\shifter\guide.py", line 1024, in updateComponentName
#     guide.updateProperties(self.root, newName, newSide, newIndex)
#   File "D:\Dropbox\WIP\Training\improved_deformation_and_custom_steps\env\mgear\mgear_3.2.0\scripts\mgear\shifter\guide.py", line 916, in updateProperties
#     comp_guide = self.components[name]
# KeyError: u'chain_C0'
select -r guide|chain_C0_root ;
select -r guide|chain_C0_root|chain_C0_0_loc ;
select -r guide|chain_C0_root|chain_C0_0_loc|chain_C0_1_loc ;
select -r guide|chain_C0_root|chain_C0_0_loc|chain_C0_1_loc|chain_C0_2_loc ;

@miquelcampos miquelcampos added the bug label Aug 25, 2019

@miquelcampos miquelcampos self-assigned this Aug 25, 2019

@miquelcampos miquelcampos added this to To Do in mGear 3.2.x via automation Aug 25, 2019

@miquelcampos miquelcampos moved this from To Do to WIP in mGear 3.2.x Aug 25, 2019

@jhoolmans

This comment has been minimized.

Copy link
Contributor

commented Aug 31, 2019

There is a similar bug that doesn't have the same stack trace as listed above.
Sometimes clashing names cause the renaming to add the side index twice.

Discussion here:
http://forum.mgear-framework.com/t/component-name-changing-bug/821/3

jhoolmans added a commit to jhoolmans/shifter that referenced this issue Sep 2, 2019
Fixed a guide renaming issue.
The renamed guide nodes sometimes get double side indexes when names are
not unique. See issue mgear-dev#70 for greater detail.
jhoolmans added a commit to jhoolmans/shifter that referenced this issue Sep 3, 2019
Fixed a guide renaming issue.
The renamed guide nodes sometimes get double side indexes when names are
not unique. See issue mgear-dev#70 for greater detail.

mGear 3.2.x automation moved this from WIP to Done Sep 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants
You can’t perform that action at this time.