Quantcast
Channel: Daz Script Developer Discussion - Daz 3D Forums
Viewing all articles
Browse latest Browse all 1036

Get assets of certain type from Content Library

$
0
0

Greetings!

I try to fetch all Expressions of Genesis 3 from the Content Library.

I use the DzContentMgr to try to locate those expression packages, but it seems like I'm operating on the file level, whereas I'd like to operate on the "Content Library" level, since things there are not mapped 1:1 to directories, at least for the cloud content.

Two and a half questions:

1. I assume cloud content can be encrypted, there is no way for me to process the raw files then? If so, I will need to ignore cloud content completely, unfortunately.
    1b. Can I detect if something is encrypted? I then could at least provide functionality for the unencrypted content.
2. How do I find products within the Genesis 3 Female Expressions folder? From the content library, not filesystem.

I have this right now:

var contentManager             = App.getContentMgr();
var folderExpressionNative = contentManager.findFile("data/DAZ 3D/Genesis 3/Female/Morphs/", DzContentMgr.NativeDirs);


This kind of works, but it is not what I'm looking for. It will return me all the morphs, and I have no way (that I know of) to tell which ones are expressions.
It'd be easier if I could navigate on the Content Library level, where those products are mapped to a known directory structure.
Any idea how I can do that? :)

Thank you very much!
-mork

 

Edit 1:

As for question 2, I made a little bit of progess - I think.
I use this example here to fetch the Products from the AssetMgr:
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/metadata/list_products/start

Now I need to filter them by Expressions. I try this right now using

oProduct.getCategories();

but this works for the very first item only, everything else throws an error like

dzpostgresqlobjectdatabase.cpp(37): db fetch error: No results fetching tblCategories with id: 2198

I try to bite myself through it, but any help is much appreciated. :)


Viewing all articles
Browse latest Browse all 1036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>