diff --git a/avalon/tools/creator/app.py b/avalon/tools/creator/app.py index f548f07c8..1bfdaef2d 100644 --- a/avalon/tools/creator/app.py +++ b/avalon/tools/creator/app.py @@ -295,10 +295,11 @@ def _on_data_changed(self): # Get the asset from the database which match with the name asset = io.find_one({"name": asset_name, "type": "asset"}, projection={"_id": 1}) + # Get plugin + plugin = item.data(PluginRole) - if asset: - # Get plugin and family - plugin = item.data(PluginRole) + if asset and plugin: + # Get family family = plugin.family.rsplit(".", 1)[-1] # Get all subsets of the current asset @@ -340,7 +341,11 @@ def _on_data_changed(self): else: self._build_menu([]) item.setData(ExistsRole, False) - self.echo("Asset '%s' not found .." % asset_name) + + if not plugin: + self.echo("No registered families ..") + else: + self.echo("Asset '%s' not found .." % asset_name) # Update the valid state valid = (