1
$\begingroup$

From this question, I understand to set a tag of an asset we need to open the Blend file. How to add/edit tag of an asset from another asset library using python (add-on)?

But can we get / access a tag of an asset when it's placed/instanced in a scene?

I tried this simple code on object named "Foo" and it return the description if we do it from the asset blend file. But it's not working when the asset is placed in another blend file

import bpy

for coll in bpy.data.collections:
    if (coll.name == "Foo"):
        print (coll.asset_data.description)
$\endgroup$

1 Answer 1

0
$\begingroup$

bpy.data.materials['Material'].asset_data.tags.new('Material Tag')

$\endgroup$
1
  • 1
    $\begingroup$ Seriously? If the answer contributes to the solution, you will receive a prize for the shortest answer ever given here on Blender SE. ;-) It would definitely help if you could explain a little more about this so others can better understand why this works, right? $\endgroup$
    – quellenform
    Commented Jan 5, 2023 at 17:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .