Yes, reloading the plugin works that way.
By the way, you do not have to use the session plugin, at all. It's just there to automate adding the person plugin but you can add that manually too, of course.
Whoops! Sorry! For some reason, I assumed you needed the session plugin. Really sloppy of me, my apologies!
And that's great!
Obviously, creators don't stick to a single look. In many cases they tend to use similar bone structures, though. E.g. C&G/Pog, Zen or Ispinox.
Ok, those are
terrible examples - and I can show you, in detail, why this is. For starters, Ispinox is pretty much the poster boy for "not using models with the same bone structure twice if he can help it". This is a
counter-example. I can point you to five or so scenes that should remove any doubt in your mind. Or you simply believe me.
But first, I'd like to understand what your vision for that "auto-select network by creator name" feature is? I always reckoned it's supposed to make saving the scene to local superfluous? Which would be awesome - but you appear to have something different in mind?
And secondly, I'd like to understand why you think that generalizing the "autos select networks" feature to individual scenes would have so many "pitfalls"? I don't think so - at least I don't see it from your.
I don't really see a point in saving defaults for a single var package. Usually, they don't contain more than one scene and you can simply save BodyNet's settings with the scene.
Yeah, the point would be to not have to save a local copy of a scene
AT ALL (except in rare edge cases) - the goal would be that a user can open a scene contained in a .var, open BN's GUI, check "change on loading preset", select a network path, press a button that makes BN write a little something to a little file (see below), and the next time he opens that scene (in the .var), BN has the correct network for that look auto-selected, and all he needs to do is load his favorite look. EasyPeasy.
There's good reasons for saving some stuff to local. Saving a honking big scene file to disk - along with all those dependencies tied to it - just for a stupid network path is not a good reason. That way bloat and clutter lie.
Ideally, you'd have default settings per look. However, there are too many pitfalls. For one, it's hardly possible to identify looks or spot any modifications a scene author might have made.
Ok, I'm wondering if I'm misunderstanding your point, or whether we're having totally different workflow ideas - but at face value, I don't see those "pitfalls"? Every scene has a unique ID - it's full path. Meaning the var's name (in the format "creatorname.packagename.version.var") plus the scene's file's path within the var:
"creatorname.packagename.version:/Saves/scene/Whatever/Glorious_Scene_With_WImminz_in_it.json" - that's a unique identifier. In fact, it's exactly what VaM uses as UIDs for resources like morphs - the following is from a scene I saved to local disk:
{
"uid" : "TBD.BodyNet_Resources.2:/Custom/Atom/Person/Morphs/female/Morphs Mega Pack/Thigh Length.vmi",
"name" : "Thigh Length",
"value" : "0.03840197"
},
So how about the following: Whenever BodyNet is loaded, it asks VaM
"Yo! What scene am I in?". Then it goes to "Vam_Root\Saves\PluginData\TBD\BodyNet\PersonPlugin\", where it looks for a file
"creatorname.packagename.version.TBDcachejson". If the file doesn't exist, it keeps the parameters it had on load. If the file exists, it opens and parses it. The file
"creatorname.packagename.version.TBDcachejson" is a json with the following structure:
(this is an example of a var with two scenes, and two females in the second scene - each is uniquely identified by its scene ID (and person at ID, if necessary). All of those are "serialized", ie they're JSONstorable, and hence, can be read both from the scene file and at runtime):
{
"creatorname.packagename.version:/Saves/scene/Creatorname/Glorious_Scene_With_WImminz_in_it.json" : {
{
"Person_id" : "Person",
"id" : "plugin#6_TBD.BodyNet.BodyNet",
"Draw skeletons" : "true",
"Refinement runs" : "1",
"Head Big Limit Multiplier" : "2",
"Network path" : "Saves/PluginData/TBD/BodyNet/Networks/Custom/Creatorname/Glorious_Scene AlanaTall XYZ.json"
}
},
{
...
},
}
"creatorname.packagename.version:/Saves/scene/Creatorname/More_Wimminfolk.json" : {
{
"Person_id" : "Lil_Hottie",
"id" : "plugin#4_TBD.BodyNet.BodyNet",
"Draw skeletons" : "true",
"Refinement runs" : "3",
"Head Big Limit Multiplier" : "2",
"Network path" : "Saves/PluginData/TBD/BodyNet/Networks/Custom/creatorname/More_Wimminfolk_Gina_HooHaa.json"
},
{
"Person_id" : "Gudrun",
"id" : "plugin#4_TBD.BodyNet.BodyNet",
"Draw skeletons" : "true",
"Refinement runs" : "2",
"Head Big Limit Multiplier" : "2",
"Network path" : "Saves/PluginData/TBD/BodyNet/Networks/Custom/creatorname/More_Wimminfolk Gudrun.json"
}
}
}
It knows it's looking for the first scene, so it grabs the respective parameters, goes to "Saves/PluginData/TBD/BodyNet/Networks/Custom/CuddleMocap/", and grabs the network "AlanaTall XYZ.json".
And how are those files created, and their network paths filled in? Well, by user-action, same as now - if the user hits "save scene settings", a file like the above example is created, and the current settings (including network path) are filled in. If the user doesn't act, then the general default settings are loaded. If the user changes the settings, but doesn't save them, then those settings persist only until the scene ends. And if the user makes a mistake, shit goes wrong.
IDK, is this too naive? Maybe there are bugs in it - but I don't see unsurmountable hurdles? The required information is either contained in various files - the scene json, for example - or VaM knows it, or you let the user provide it, and then you write it to a little json file. No muss, little fuss and no honking big pointless local files.
P.S.: The inspiration for the "
*.TBDcachejson" files are VaM's cache files - they have the same name as the var they're describing, and internally, they
're just json nodes corresponding to the files in the var.