[solved] Same name instances


#1

Can two instances not be named the same?
They have different families, but when they are named the same only one shows in the list. When they are named different, both instances show up.


#2

That’s true, they cannot. Same goes for plug-ins.


#3

Just found that you can have two instances of the same name but with different families.

Working in pyblish standalone.


#4

They shouldn’t, that must be a bug.

Could you make an issue for it? With something reproducible?


#5

https://github.com/pyblish/pyblish/issues/219


#6

Thanks. Looks like this has always been possible, even without differing families. :S


#7

Fixed, this now throws a ValueError and the plug-in will fail, producing a message in QML along with any other plug-in.


#8

After some experience with this “feature”, I’m considering enabling same name instances again, on the basis that it’s a pure artificial limitation put into place along with the ability to reference Instances by name through the Context.

my_instance = context["MyInstance"]

Before this was made possible, same name instances lived in harmony with every other mechanism of Pyblish. Although that is a useful property, it isn’t exclusive and could be optionally maintained by choosing not to use same name instances.

I think it can make good logical sense to have multiple instances have the same name, yet contain different parts of a scene when necessary.

Rig:  # Family
- My Character # Instance

Model:
- My Character

Thumbnail:
- My Character

Let me know what you think.


#9

I actually agree with enabling the same instances again. Currently in Hiero I have some long names to make the instances unique.

As long as it works processing the instances, and Pyblish doesn’t get confused about which instances are in what families.


#10

Technically it isn’t a problem, since each instance is just another member of the Context, which is just a list. The only problem is logical, and if it’s logical, which I suspect it is, then it should be just fine.


#11

If you can run the test in the github issue successfully, we are good to go:)


#12

Yes, that will work fine. :slight_smile: