Simple Asset Manager 2.8

add-ons
blender2-80

(Tibicen) #102

actually jpgs have great compression, and are great for previews (size matters), but I decided to go with trasparent background, so whatever theme would be it won’t be out of place.


(csimeon) #103

I know how to convert. The question was if SAM can input jpg previews, because (a) I already have them and (b) I need to keep the jpg’s in the same library structure so Chocofur Manager works as well (for Blender 2.79).


(csimeon) #104

SAM works great, thank you

That is clear and makes sense for an asset manager, what I meant is if I can customize the background scene for the previews… ok secondary.
If SAM could only check for existing png’s OR jpg’s would be great. Chocofur works with jpg previews nested one level, in a sub directory called renders and it would be great to share the library structure.
It would be flexible and elegant if you could add a “folderOffset” value to the code, a value to store a sub-folder name for preview pictures, whereby “.” = same folder or “string” is user defined subdirectory name (all in relative path addressing).
Wishes… thanks again!


(obsurveyor) #105

Just have both files then?


(csimeon) #106

Actually Chocofur has the same Category / Subcaterory = Folder / Subfolder structure like SAM.
It differs in that the rendered previews are jpg’s stored in a subdirectory called “Renders” for each.
Also you are assumed wrongly: the categories can be user defined.

SAM’s great advantage, the way I use it, is generating previews, something Chocofur does not.
And the Material special management.


(csimeon) #107

I have the same problem when I append a model asset:
It shows up as it should, but is somehow locked in position, size and scale.
The transform values on the Properties Panel are grayed out and when I click on any
“Disabled. Can’t edit this property from a linked data block” I did not link it, I appended using the button on SAM’s panel.

Found the problem: despite choosing the append button, SAM links the object.
You need to make it local to be able to transform.

It appears @Tibicen you have made an error in your last update? choosing append, links the objects instead.


(Kea Lim) #108

That will help, save some time.


(Tibicen) #109

It was already mentioned here. I can´t copy the error. One way was to purge the files from unnecesary stuff. But if you still have such files, please share it so I can duplicate the error.


(csimeon) #110

What seems to be happening is that for some reason your code interprets the user request as a link rather than an append.
I can think of two schematics that could produce this fault, having taken a quick look at your code:

  1. The “append” interface button calls the link function or
  2. Something in the way the file is searched for and located in the library triggers the wrong if / else.

A third and less likely, in my opinion, is that the actual format of the file causes the problem. If this third is not true, you won’t find your answer looking at a file where the library append failed.
I suspect you can’t reproduce the error, because your code fault is about the library file and the path (case 2 above), rather than the file where they are appended. To make sure I’m sending both:

  1. A file from my library (a Chocofur free asset), pre-existing in 2.79 format
    put this file in your library under “Furniture” category, “Chair” sub-category
    Chocofur_Free_18_Fabrics.blend (737.8 KB)

    and
  2. The destination file, Blender 2.8, where I tried to append it. I left the chair as a linked object (no transforms possible until you make it local)
    DestinationFile.blend (919.5 KB)

The built-in Blender method is to make the object local (rather than linked) and there is a command just for that, as I mentioned previously.

I hope this helps


(Tibicen) #111

yep it is a liitle more complicated. I use the same thing except in last moment im assiginig a command to action parameter. and it when it is “linked” the bpy.ops.wm.link is assigned to action otherwise bpy.ops.wm.append. Thanks I will check that later :slight_smile:

[EDIT] I’ve done quick test, and indeed it appends as “linked”. Amazing. :smiley: Even more interesting is when i open the chair file and save it (without any modifications) then it when I want to import it again it appends properly. :O. Fast thinking: Might it be something with old blend version save?

that is the code responsible for import The buttons in UI differs mostly that one have parameter link=True :

action = bpy.ops.wm.link if link else bpy.ops.wm.append
action(directory=blendFile + "/Scene/", files=scenes)

(csimeon) #112

All you need to do now is fix it… haha. Seriously though, it’s a nice piece of code. My days-of-old in programming, helped me follow your work and suspect where the problem is, but unfortunately I am not proficient in Python and the Blender functions to be of any specific help fixing it.

I think that’s likely, I thought it odd that the error didn’t happen with you and then thought you are probably testing with new models, probably all in 2.80. The destination file in all cases would be 2.8 format so I thought it unlikely you would get results if I shared that file only. That’s why I pointed out that the model is 2.79… and sent that along as well. But then why does the version affect the value of “link” and make link=true instead of false?

action = bpy.ops.wm.link if link else bpy.ops.wm.append

Looking forward for the fix, it’s a very useful addon!


(Dario Cadamosti) #113

Hi, I have a problem with HDRI previews. They are really strange, overexposed

and they aren’t similar to videotutorial. I put hdr files in the folder and I used the ‘render key’ of the addon to render previews. In addition, .exr files are not recognized such as 'Vp hdri skydome in the image.
How can I fix the problem?


(victornsy) #114

I tried to install without unzipping on the latest Blender 2.80 beta version.
What went wrong? Below is the console message with the installation
failing.

Traceback (most recent call last):
File “D:\Program Files\Blender Foundation\Blender 2.80 Beta\2.80\scripts\startup\bl_operators\userpref.py”, line 605, in execute
module_filesystem_remove(path_addons, f)
NameError: name ‘module_filesystem_remove’ is not defined

location: :-1


(RLGUY) #115

I ran into this error as well earlier when installing any addon from .zip. It looks like this bug has been recently fixed, so perhaps it will work correctly in the next 2.80 version: https://developer.blender.org/T61455


Smart Select - 1.4.0_beta_2 updated by Nburn is now out!
#116

@Tibicen, I quickly went through the entire thread but didn’t find anything on such issue: each time I append an asset, the addon creates a new collection named with a file name + .XXX suffix. Is that by design? Or I do something wrong preparing asset files?
SAMcollections


(Tibicen) #117

Yes, I assumed that once it is added to the scene you can add by SHIFT+A and add collection.
But will have to think about it, maybe it is better if the name is the same add a instance of it :thinking:. Then if you modify the asset and want to append it once again you will only need to rename it.
You are probably right. I’ll add it to the list.


#118

Could there be an option to append without creating a new collection? Or simply put all instances into the same collection? Keeping my screenshot above as an example, all ‘Cube.XXX’ instances would be placed in ‘Cube 1’ collection.
I just started playing with you addon, but it seems very handy tool :slight_smile:


#119

I think I got even better idea. It could work this way: appended asset could be selected as an active object, and then you could just invoke the ‘Move to collection’ modal launched normally by the ‘M’ shortcut, so user could decide each time where to put it.


#120

Hey there. For some reason I’m getting traceback errors when I used the latest build @Tibicen


#121

I am getting the traceback errors too @Tibicen