Skip to content
This repository was archived by the owner on Oct 7, 2021. It is now read-only.

replaceShape fails if an existing shape doesn't exist #43

@chris-lesage

Description

@chris-lesage

scripts/mgear/rigbits/init.py

In the function replaceShape() line 410. If a pre-existing shape doesn't exist on the target node, it fails with an error and then leaves remaining duplicate nodes from the function leftover in the scene. This is because the variable cnx is only declared if a shape is found. But cnx gets called outside the scope of "if shape:"

Suggested fix.
Declare "cnx = None" or "cnx = []" at the beginning of the function.
Then, if a shape doesn't already exist, it will just add it to the transform.

(I'll do a PR in December if no one else gets to it.)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions