Maniphest T93650

Unable to drag library assets to catalogs, when in their current file
Closed, Resolved

Assigned To
Julian Eisel (Severin)
Authored By
Dan McLaughlin (DrM)
Dec 4 2021, 1:30 PM
Tags
  • BF Blender
  • User Interface
  • Asset Browser
Subscribers
Dan McLaughlin (DrM)
Julian Eisel (Severin)
Richard Antalik (ISS)
TonyG (TonyG)

Description

System Information
Operating system: Win10
Graphics card: 3090

Blender Version
Broken: 3.0
Worked: N/A

Short description of error

Dragging a library asset from it's current file gives the error shown, arrows point to evidence we are in the current file

Exact steps for others to reproduce the error

  1. Use Industry Compatible keymap
  2. Open file
  3. Drag the sphere into a catalog as shown

This can be reproduced even with default startup file.

Revisions and Commits

rB Blender

Related Objects

Mentioned Here
rB6e487228a595: File Browser UI: Allow dragging anywhere in a file preview tile to drag
rBf1cca3055776: Blender 3.0 - version bump -> release
M1: Bevel Tool Toolbar Layout - Multiple Overflow Popovers

Event Timeline

Dan McLaughlin (DrM) created this task.Dec 4 2021, 1:30 PM
TonyG (TonyG) added a subscriber: TonyG (TonyG).Dec 4 2021, 3:00 PM

I can't reproduce on MacOS 12.0.1 / MacBookAir M1 / Blender 3.0.0 ARM version (2021-12-02 f1cca3055776).

What Blender version/build are you using ?
Maybe I'm missing a step ? Check my video hereafter to confirm.

Dan McLaughlin (DrM) added a comment.Dec 4 2021, 10:01 PM

Hi Tony,

3.0.0 as indicated. It's happened to several of my files consistently, mainly ones I set as assets myself previously. I got a bunch of 3rd party assets just fine. Clearing and resetting the asset tag doesn't fix it. Clearly fine for you, maybe a Windows issue? Wouldn't expect that but try to reproduce on Win10 before we dig into it.
Dan McLaughlin (DrM) added a comment.Dec 8 2021, 12:03 AM

@TonyG (TonyG) OK something which is probably important that I left out. The definitions of the catalog are in a different file. I keep a master "Catalogs.blend" which contains all the catalog definitions, those were defined in the Library.blend, and I'm trying to use them from this file above. Does that help?


Dan McLaughlin (DrM) added a comment.Dec 8 2021, 12:06 AM

Also - I'm trying to move the asset, which is in the User Library directory, to a catalog. None of this is in this file - it's all in the user library.

Dan McLaughlin (DrM) added a comment.Dec 8 2021, 1:48 PM

@TonyG (TonyG) More information, I found that if I fiddled around enough with the settings it would suddenly start working. In one case, just pulling the "Current File" drop down and selecting Current File did it. This time it took a lot more fiddling, but here's proof of the issue that I captured on video. On all the assets which are problematic I'm finding that with enough random fiddling eventually it'll work

Dan McLaughlin (DrM) added a comment.EditedDec 8 2021, 1:53 PM

Another example (quicker). Also shows it

  1. Not working
  2. Working
  3. Not working again (more fiddling)
  4. Working and I finish

ignore the audio, SpaceX video playing in the background :)

Richard Antalik (ISS) changed the task status from Needs Triage to Needs Information from User.Feb 4 2022, 6:27 AM
Richard Antalik (ISS) added a subscriber: Richard Antalik (ISS).

@Dan McLaughlin (DrM) Can you explain what are you trying to do? I understand it as you want to move asset to catalog within different .blend file, but this is impossible, asset catalog are read only unless you are editing them directly.

Dan McLaughlin (DrM) added a comment.Feb 4 2022, 7:02 PM

https://docs.blender.org/manual/en/dev/files/asset_libraries/catalogs.html

Blender 3.0 supports a single CDF per asset library. It is stored in blender_assets.cats.txt in the root directory of the asset library.

My library, set in preferences, is this

There is one master blender_assets.cats.txt as per the documentation. All the individual blend asset files are in the directories shown, the catalogs are all defined within Library.blend as shown. This is so there is one master 'category list'. This way I can guarantee there's no redundance, e.g. "Nodes" and "Node" catalogs that might happen by accident if there were library's all around.

I understand it as you want to move asset to catalog within different .blend file, but this is impossible, asset catalog are read only unless you are editing them directly.

It's not impossible, with the fiddling I show above it will allow me to do it, you can see that behavior in the video. So there's an issue here somewhere.

But I'm not following you exactly, There will be one cat file in the root. Let's say in one file I have a catalog "Meshes". Then in another file I create a catalog "Meshes/Pink". Then in the third file I want to also put something into "Meshes/Pink", are you saying I can't do that? Ignoring that you can do it as mentioned with fiddling, that's means that catalogs can only be used in a very restrictive sense on a per file basis. Using them the way I do here, such as "Nodes" (all meshes with geometry nodes to be reused) must be a common use case.

Richard Antalik (ISS) added a comment.Feb 5 2022, 2:21 AM

Sorry I meant .blend files that hold the asset are read only unless you edit them. You should be able to add items to catalogs.

Perhaps this part is important in https://docs.blender.org/manual/en/dev/files/asset_libraries/introduction.html#creating-an-asset
After creating the asset, make sure the current blend-file is saved in your asset library. Blender does not copy the asset into the asset library for you.

If you want to just move asset to catalog, I want to know how exactly you want to do that, so I can follow the process here. It could be case, that what you show in video was a bug, but I can't tell really

Dan McLaughlin (DrM) added a comment.Feb 5 2022, 2:34 PM

I meant .blend files that hold the asset are read only unless you edit them.

Correct

Perhaps this part is important ...

Yes the file is saved to the asset library hierarchy. Here is an example of the workflow, it's really simple

  • You can see where the asset library is in prefs (D:\Masters\Library\Blender)
  • New instance of Blender, save to asset catalog
  • Tag an asset, save file
  • Can't move the asset to a catalog

I'm suspecting it's something to do with how I'm using it. This was driven from the Studio as I understand it, with the use case that they have lots and lots of blend file where they want to reuse poses and such from one to another, just for that production. Very flexible, you can create a new catalog from any file and somehow it all works together.

My use case is one 'master' library with commonly used assets across all projects. I have one master Catalog blend file where all the catalogs are created (the "Library.blend" file above). I don't create catalogs in sub files, but I obviously want to use the catalogs and place assets in them from where ever.

Does that give a clue? To be clear, can you place an asset from this blend, into a catalog created in another blend? I think so because it seems that making a catalog just writes a line in the master catalog file on top. But I'm not sure as it seems there's some text in the docs about having multiple "blender_assets.cats.txt"

Dan McLaughlin (DrM) added a comment.EditedFeb 12 2022, 6:06 PM

@Richard Antalik (ISS) OK I think I found the issue specifically, the issue is with the Blender selection in this editor.

There's something odd about the Asset Browser editor and selection, I keep grabbing things and it thinks I'm doing some kind of box select. The reason is if you click-drag in one operation it will drag, but it's not really in drag mode but in an indeterminate or a box select mode, this is what it looks like

If instead you click-unclick, now the item is fully selected, now you can drag properly

So the issue is that it lets you do a click-drag (no click up) and drag, but it isn't really in drag mode. You have to do a two step operation, click-unclick, item is fully selected, now drag. Basically the editor has the box select operation by default, but it really should be the tweak operator and you select multiples with shift. At that's the way most such 'element selector' interfaces act.

Make sense?

Richard Antalik (ISS) added a comment.Feb 14 2022, 6:14 PM

I understand what you mean, but I can't reproduce this behavior. Can you check alpha build from https://builder.blender.org/download/daily/? Also are you using mouse to drag asset? I think that even touchpads could cause issues sometimes.

Dan McLaughlin (DrM) added a comment.EditedMar 11 2022, 1:48 PM

Yes it still exists in 3.1

Are you sure you understand how this is happening? See the attached video because I can now easily reproduce it or do it correctly. The first time I'm just swiping by and click when over the asset, which results in a drag operation even though the asset isn't fully selected. So I can't assign it to a catalog

The second time I properly select the asset, it highlights, then I can drag it.

The issue appears to be that Blender has some kind of partial selection mode on Assets which allow you to move an asset, except it doesn't work properly.

Richard Antalik (ISS) added a comment.Mar 14 2022, 8:54 PM

I really can't reproduce this issue. Perhaps this could happen if you have more than 1 monitor and/or system uses scaling for display (check screen settings in OS settings).

Dan McLaughlin (DrM) added a comment.Mar 17 2022, 5:06 PM

OK I've got it I believe, I'm using Industry standard keymap, trying it with the Blender keymap I get the same results as you.

I looked in there to see if there was anything special in the Industry Standard but it doesn't seem like this editor has settings, but I'm probably not seeing it.

Richard Antalik (ISS) added a comment.Mar 17 2022, 9:28 PM

Asset browser probably uses same keymap as file browser, so there could be difference.

I can confirm with industry compatible keymap though. Thanks for clarifying.

Richard Antalik (ISS) changed the task status from Needs Information from User to Confirmed.Mar 17 2022, 9:31 PM
Richard Antalik (ISS) updated the task description.
Richard Antalik (ISS) added projects: User Interface, Asset Browser.
Dan McLaughlin (DrM) added a comment.May 3 2022, 2:27 AM

Is this the same as, or related to this?

File Browser UI: Allow dragging anywhere in a file preview tile to drag

https://developer.blender.org/rB6e487228a595

Julian Eisel (Severin) added a subscriber: Julian Eisel (Severin).May 23 2022, 7:08 PM

@Dan McLaughlin (DrM) is this still an issue with latest builds, after the change you mentioned?

Julian Eisel (Severin) added a comment.May 23 2022, 7:48 PM

Just as a note:

I keep a master "Catalogs.blend" which contains all the catalog definitions, those were defined in the Library.blend, and I'm trying to use them from this file above.

Catalogs aren't defined in .blend files, they are defined in the blender_assets.cats.txt files in the asset library. If the current file is stored inside of a registered asset library, Blender loads the asset catalog definitions from there. So the catalog definitions are really independent of .blend files.

Dan McLaughlin (DrM) added a comment.EditedMay 26 2022, 8:48 PM

Hi @Julian Eisel (Severin) , yes the beta 3.2 from last night still has the issue unfortunately.

Dan McLaughlin (DrM) added a comment.May 26 2022, 8:52 PM
In T93650#1363124, @Julian Eisel (Severin) wrote:

Just as a note:

I keep a master "Catalogs.blend" which contains all the catalog definitions, those were defined in the Library.blend, and I'm trying to use them from this file above.

Catalogs aren't defined in .blend files, they are defined in the blender_assets.cats.txt files in the asset library. If the current file is stored inside of a registered asset library, Blender loads the asset catalog definitions from there. So the catalog definitions are really independent of .blend files.

Thanks I figured that out, and now work with catalogs from various files. Or used to, we use Perforce which uses the read only bit on files, and check in a library to the repo to share. Somewhere along there it's gotten upset, and now I can't add new catalog categories, they won't save (the blender_assets_cats.txt is checked out). I have to manually generate a GUID and put a new category into the txt file. I haven't submitted a bug on this, I'm not sure how to reproduce it.

Julian Eisel (Severin) closed this task as Resolved by committing rB36f5967b9998: Fix T93650: Asset drag into catalogs broken, Industry Compatible keymap.Jun 27 2022, 3:36 PM
Julian Eisel (Severin) claimed this task.
Julian Eisel (Severin) added a commit: rB36f5967b9998: Fix T93650: Asset drag into catalogs broken, Industry Compatible keymap.
Dan McLaughlin (DrM) added a comment.Jun 27 2022, 3:39 PM

Thanks @Julian Eisel (Severin)! Small thing but a nice easy fix.