Open Mr-Lux opened 2 years ago
This issue is an interesting one and I've wanted to delve into it many times but I think it's going to be a massive task.
There are multiple problem which I think will need to be solved.
id
so duplicated characters don't work)I'm going to be honest, I've never used library overrides so I've never studied the inner workings of the whole system so I have a lot to learn but it would be nice to come up with a plan how it's going to be implemented and it would be really amazing if you wanted to tackle some of the things this problem introduces.
The last part is probably because the toggle itself is library overriddeable but the driver is not and the outfit pieces driver reads the value of the toggle and depending on the active outfit, the locked status, its parent and its parent's locked statues it either shows or hides the object.
the Problem
One workflow for animations and scene set up in blender is to link the collection containing the character from one blend file to another, and then create a Library Override that allows posing and use of most of the data.
Blender Documentation on the subject here
Normally, any custom properties must be marked as Library Overridable in it's settings to be accessible and modifiable in a linked overrided data block.
It's not a problem for custom properties user defined, because it's just a toggle. As seen here.
override_prop_example
However, in the state of the add-on the enums and bools for the outfits and locks that are generated in the scripts are not set to be overridable and thus are unusable when the character is linked.
The solution
I was able to make them overridable by adding in their generation the following line
override={"LIBRARY_OVERRIDABLE"}
as a option.following this documentation bool Property doc
in the shorthands to create toggles and enums
But, there was a side effect that I don't understand. Once overridable and the rig linked and overrided, when selecting a outfit, locking a piece or any other operations, it would revert back to the original value as if an update function resetted the property.
I could not find why.
So, is there a way to integrate a linked override compatible version for the CharacterUI script ?