Store data in a Scene
laserwolve
Posts: 34
I need to store abitrary propriety information in a scene file, to be read by a script. Right now I'm using null nodes, and using their name and labels as name:value pairs. For example, a null node labeled "Project", with a node name "MayAprilRenders". Is there a better way to do this? Can we read the DSON from within a script?
Comments
If you look at the post Load samples:
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/elements/post_load_script_data_item_add/start
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/elements/post_load_script_data_item_read/start
using DzSimpleElementData instead of DzSimpleElementScriptData as in the samples you may find you can do what you want.
There is also DzSimpleSceneData http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/simplescenedata_dz which allows the data to be set for the scene rather than a single item (which might be deleted).
Exactly what I was looking for! Perfect, thanks!
I hope this is related enought.... drives are dirt cheap...
could there be a script ... which would probably be related to gathering content for a product.
But to gather everything in a scene and save it to a folder?
modlels etc so that theoretically you could open that scene (from that folder) and run it without having your content library turned on?
the script would make the folder the scene is in be the target folder for everything in the scene.
Working out which products were used:
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/metadata/list_products_used/start
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/remote_operation/extract_data_from_products_used/start
Compressing files into a zip
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/file_io/file_zip_compress_each/start
Extracting fiels from a zip
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/file_io/file_zip_extract_each/start
okay, color me dumb... I possibly had it nailed in my question "could there be a script ... which would probably be related to gathering content for a product. "
would this do the trick?
https://www.daz3d.com/content-gatherer
and of course to add insult to stupidity... I own it.
and it looks like https://www.daz3d.com/content-wizard will do the same... since I don't want to create anything to distribute .. just want to back up scenes completely so that a 100 g backup could be made that backs up my scenes to the point where if I have those and through a fire etc as long as the backup is off site... I can pick up where I was?
If you want a script written for you then this isn't the right sub-forum - use Product Suggestions instead, or Technical Help to ask about existing scripts (if they don't have their own threads).
my first question was whether it could be scripted...
and the next time was whether content packager and the riversoft packaging tool will do what I was asking about.
basically gather everything into a scene which might make a larger storage file... would also be easier for off side backup in that even if I lose my data drives ... I would still have the data for each scene intact with the scene.
and basically wondering if there were any existing scripts... at one point in my 30s I learned at least a half dozen languages as the company had to keep getting new and better equipment ... but at 76 I want to play with Daz and not dig out all the java books and work back through them.
---
I'll be testing the program/scripts I mentioned above.... figuring that if you're packaging a product there would be nothing in the scene but what you wanted to package.
and see how that goes.
Thank you for the feedback