Simple Asset Manager

Sounds like it has been quite an intense period for you! Hope it is all going well.

The lib path feature is a little bit tricky and needs some thinking through. For instance, an unsaved blend wouldn’t show any assets as the relative path wouldn’t work until the blend file is saved somewhere; this might confuse some users.

Perhaps the best way (and maybe this is what you had in mind anyway) is setting an absolute path in Prefs as it is now as “the global library” and being able to specify a relative lib path that overrides and gets saved within each blend file (thus being even more project-specific and customisable).

Hey, thanks for jumpin’ on this T! Putting all my crap in one place was deal-breaker for sure…

Updated to version 0.9.5

  • new stuff: searchbar to search whole library (not dynamic…unfortunately);
  • relative library path can be placed in preferences (now you need to have same library name per project to work, next version will have overwrite per file: master collection, and file collections);
  • fix non-english characters;
  • fix origin at import (many objects are placed too);
  • added origin rotation option;
  • API updates.
3 Likes

Back to frequent maintain. :slight_smile:

2 Likes

Great example of reporting an issue!! :*
As from here It seems that blender obj importer has some issues with your file. You are trying to import obj?
I’ve tested the addon with obj files, and it worked.
In scripting tab there is also window from where you can copy error traceback as text and paste it here as preformatted text. :slight_smile:

Yes OBJ. These are the same objects you normally used in the previous version. I reused the previous version and the same error is occurring. I’ll try the newest version of the trunk.

I am absolutely loving the simplicity of this addon, its perfect. I really hope you continue developing it because I see this as a big part of my workflow going forward :slight_smile:

Awesome Add-on! Would be nice to manage images other than exr and hdr files. For example alphas in png format or textures.

Hi @Tibicen , I get this error when trying to render thumbnails:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.9c5d54bfaf48-windows64\2.80\scripts\modules\bpy\ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
AttributeError: Calling operator "bpy.ops.asset_manager.render_previews" error, could not be found

location: <unknown location>:-1

location: <unknown location>:-1
ERROR (bke.icons): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\icons.c:705 BKE_icon_get: no icon for icon ID: 1864
ERROR (bke.icons): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\icons.c:705 BKE_icon_get: no icon for icon ID: 1864
ERROR (bke.icons): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\icons.c:705 BKE_icon_get: no icon for icon ID: 1864
ERROR (bke.icons): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\icons.c:705 BKE_icon_get: no icon for icon ID: 1864
ERROR (bke.icons): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\icons.c:705 BKE_icon_get: no icon for icon ID: 1864
ERROR (bke.icons): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\icons.c:705 BKE_icon_get: no icon for icon ID: 1864
ERROR (bke.icons): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\icons.c:705 BKE_icon_get: no icon for icon ID: 1864
ERROR (bke.icons): c:\b\win64_cmake_vs2017\win64_cmake_vs2017\blender.git\source\blender\blenkernel\intern\icons.c:705 BKE_icon_get: no icon for icon ID: 1864

My Blender version: 2.80 (sub 74), branch: master, commit date: 2019-06-23 22:45, hash: rB9c5d54bfaf48

Cool addon, I really like the simplicity of it.
I have issues with the import at cursor with rotation. It works fine without rotation, the asset is imported at the right place. But with rotation, it is offset into a wrong location (with correct rotation however).

I can’t recreate your issue. But maybe, when you activate your addon, set all the options in preferences, you need to save preferences, and then run "render thumbnails.
When it renders thumbnails it opens additional blender instance, and it might not have SAM enabled in this instance. Give me a call if it worekd out for you.

That’s strange , I’d rather have issues with the rotation for instance when i want to put something on sphere. But not with offset. Is your object in the center of the file in the library file?

Thanks @Tibicen , saving the preferences fixed the issue. But now I’m getting another error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files\Blender Foundation\blender-2.80.0-git.9c5d54bfaf48-windows64\2.80\scripts\modules\bpy\ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
  File "C:\Users\filibis\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SimpleAssetManager\__init__.py", line 396, in execute
    append_element(blendFile)
  File "C:\Users\filibis\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\SimpleAssetManager\__init__.py", line 168, in append_element
    obj_coll.objects.link(object)
RuntimeError: Error: Object 'Plane' already in collection 'Lamps01_Cycles'

location: C:\Program Files\Blender Foundation\blender-2.80.0-git.9c5d54bfaf48-windows64\2.80\scripts\modules\bpy\ops.py:201

The new Blender instance stops at this file: Four Lamps:


It is a the center yes. It places it on the cursor properly when rotation isn’t checked.

@filibis
Ok, I’ve opened the file, and it has one object in many collections. Probably import from blender 2.7x layers. You can cleanup the files beforehand so it wont import all the unnecessary collections, but good to see the error, I will think about some sollution for that.

@chafouin
Can you share some sample? I will need to dobule check the rotation matrix idea. I’ve started learning it on this project, so I might implement it wrong.

1 Like

Okay I created a new blend file and copied the object in there and now the position is correct, not sure what was going on with the scene. However, the rotation is incorrect.

  • Create a scene, add a simple cube, save the file in the asset library folder and close it.
  • Create a new scene, add a cube and rotate it.
  • Place your cursor on the surface of the rotated cube, using Geometry orientation
  • Add the asset cube at cursor, with rotation
  • Notice the rotation of the added cube doesn’t match the surface.
1 Like

When I add my material to a cube it does not add it. Do you need to append the material first?Here is my folder structure.

Materials:

  • Append - appends material to scene, doesn’t add it to the object.
  • Add - adds material to a new slot (you need to go to edit mode and assign material).
  • Replace - replaces materials active slot.

If it is not so obvious, then maybe more people can discuss the naming convention. Any suggestions?

1 Like

Tibicen it worked. Thankyou.