Closed keianhzo closed 1 year ago
But why is the dependency not there in the first place? There should be no way for a user to remove a dependency through the UI. Is this related to components in the BG add-on like BG Grabbable
with its BG RigidBody
and BG Physics Shape
dependencies? If so and these are actual hard dependencies, then I think they need to have the isDependecy
property set in their init
function like so (or perhaps this property should be automatically set?):
@classmethod
def init(cls, obj):
obj.hubs_component_list.items.get('rigidbody').isDependency = True
Otherwise, if they aren't hard dependencies, then we should probably introduce the concept of soft dependencies (e.g. components that are added with the main component that are likely to be useful, but aren't strictly required) and switch them to be soft.
Oh yeah, i forgot that we had that flag. That will make it. I'll close this. Thanks
You're welcome! Happy to help :)
If a dependency is already removed we are failing to remove and a confusing stacktrace is shown to the user. This PR makes us continue if a dependency doesn't exist maybe because it' been already manually removed.