Dependency Mapping

DarkFantasy

Well-known member
Messages
108
Reactions
475
Points
63
[edited, I was wrong about the dependency example I gave, somehow all of the auto expressions, blinking, etc turned back on]

Is there a tool or an easy way to map dependencies from packages being used?

I learned the hard way in the last scene I developed so I have been kind of mapping things as I go but it is time consuming.

This is how I am solving the problem now:

- create an empty scene and add a person.
- Remove everything from the person and zero out all morphs
- Turn off all of the Auto Behaviors
- Save as a temp scene
- In package manager wack the numpad to create a random numeric name the package (will never create it but using numbers makes it easier to clean up and delete the temporary folder later)
- Add the scene json
- Click prep package
- Determine what additional dependencies are added that I did not expect
- Remove that item, plugin, custom asset, etc
- Add the next
- Rinse and repeat

- After all of the testing go to the AddonPackagesBuilder folder and shift-delete all of the numeric folders that were created during testing.

It would be cool to have a tool or addon that read a scene, pulled the main scene dependencies, and built a tree. This would help some of the active content creators that dont realize they have additional unexpected dependencies clean things up, and would help with finalizing and cleaning up scenes for packaging. Even a command line tool that takes the scene json as an argument and creates a text file with the mapping.

I have it on my list of potential to-do's but it is pretty far down as I am not entirely sure the best way to do it.

My programming skills are very rusty, (which is sad, I programmed for fun for many, many years), but I am cleaning them up again. I forgot how much fun it was.

Anyhow, I am thinking I am not the first to ask this and that someone smarter than me created something that would help automate the process (I like lazy easy buttons... lol)!
 
Last edited:
A dependency tree would be nice, indeed.

Your process sounds really painful. You should start from a clean install with only the things you need, this'll be so much easier. That's what I do to keep dependencies to a bare minimum.
 
Is there a tool or an easy way to map dependencies from packages being used?

It would be cool to have a tool or addon that read a scene, pulled the main scene dependencies, and built a tree. This would help some of the active content creators that dont realize they have additional unexpected dependencies clean things up, and would help with finalizing and cleaning up scenes for packaging.
Maybe not exact answer/solution to your problem, but maybe i can share my way of looking for dependencies.

All you need is Notepad++ with JSTool plugin (JSON Viewer),
if you wanna get "dependency tree" to see main dependencies and all sub dependencies.

-open your meta.json (inside your .var package/packagebuilder)
-open JSONViewer, check dependencies then sub-dependencies
-then open your look/preset/scene .json
-search for "xyz" dependency (MAIN, not sub)
-so you get idea what it's pulled/from where
-go back to your look/preset/scene, change it, save it
-recreate package, check meta.json again

There is no point searching for sub-dependencies inside your scene.json (you won't find any), only main dependencies.
example looking at my "abandoned project" with 8/10 dependencies(2 are unused, 3PointLightSetup and NoStage3.Hairstyle)
so looking inside meta.json of this package you can clearly see what it's pulled with package as "dependency"
jsonviewer1.jpg


after opening scene.json and searching for this dependency (not sub-hairstyle)
you can see it's only subscene path that is causing those 2 dependencies
jsonviewer2.jpg

if i would go and edit scene...delete subscene path and save it, it would eliminate those 2 dependencies
Many things can cause dependencies, almost any preset (something people overlook the most),
it could be morph (auto expressions are irellavant, unless you are morph merging/morph mixing), clothing, hairstyle, texture.

That's why it's best to test stuff on clean up2date client to see how it performs.
Personally i like to create packages on clean client aswell (some creators are still uploading/creating stuff from 1.20.0.x clients).

Anyway, it was kinda rough example with pictures, but i hope you get the idea.
 
Last edited:
A dependency tree would be nice, indeed.

Your process sounds really painful. You should start from a clean install with only the things you need, this'll be so much easier. That's what I do to keep dependencies to a bare minimum.

Yeah, I try to. The issue is once you add a few different items you inherit their dependencies as well. Some are clean, some are not. I am starting to get an idea as to which are and which aren't with the items I usually use.
 
Maybe not exact answer/solution to your problem, but maybe i can share my way of looking for dependencies.

All you need is Notepad++ with JSTool plugin (JSON Viewer),
if you wanna get "dependency tree" to see main dependencies and all sub dependencies.

-open your meta.json (inside your .var package/packagebuilder)
-open JSONViewer, check dependencies then sub-dependencies
-then open your look/preset/scene .json
-search for "xyz" dependency (MAIN, not sub)
-so you get idea what it's pulled/from where
-go back to your look/preset/scene, change it, save it
-recreate package, check meta.json again

There is no point searching for sub-dependencies inside your scene.json (you won't find any), only main dependencies.
example looking at my "abandoned project" with 8/10 dependencies(2 are unused, 3PointLightSetup and NoStage3.Hairstyle)
so looking inside meta.json of this package you can clearly see what it's pulled with package as "dependency"
View attachment 47732

after opening scene.json and searching for this dependency (not sub-hairstyle)
you can see it's only subscene path that is causing those 2 dependencies
View attachment 47733
if i would go and edit scene...delete subscene path and save it, it would eliminate those 2 dependencies
Many things can cause dependencies, almost any preset (something people overlook the most),
it could be morph (auto expressions are irellavant, unless you are morph merging/morph mixing), clothing, hairstyle, texture.

That's why it's best to test stuff on clean up2date client to see how it performs.
Personally i like to create packages on clean client aswell (some creators are still uploading/creating stuff from 1.20.0.x clients).

Anyway, it was kinda rough example with pictures, but i hope you get the idea.

Oh, that is cool! I have been using Visual Studio, not JSONViewer, which doesn't really give the same view. That view on the left and your explanation helps dramatically! Thanks!

Yeah, I have a clean "gold copy" that I replace my test environment with each time I create a package now. I do the rough optimization in my normal copy of VAM then move it over to further clean it up and test how others will see it.
 
I mean there is always "brute-force" option.
Not really an option, if you can't go without some dependencies, is manually editing meta and removing sub-dependencies (you don't use).
But that (in my opinion) is stupid and nothing more than placebo effect to make your package look more appealing on HUB (with less dependencies),
while at the same time screwing end users. :ROFLMAO:

I mean just because you managed to cut lets say 60 down to ~20 total, all of a sudden users don't need all 60?
NEWSFLASH! They do! Just cuz you removed them from your package, those 20 dependencies still have individual dependencies intact.
So they still need to download all 60, unless they don't mind "missing" errors on VAM startup (...weirdos).
 
I mean there is always "brute-force" option.
Not really an option, if you can't go without some dependencies, is manually editing meta and removing sub-dependencies (you don't use).
But that (in my opinion) is stupid and nothing more than placebo effect to make your package look more appealing on HUB (with less dependencies),
while at the same time screwing end users. :ROFLMAO:

I mean just because you managed to cut lets say 60 down to ~20 total, all of a sudden users don't need all 60?
NEWSFLASH! They do! Just cuz you removed them from your package, those 20 dependencies still have individual dependencies intact.
So they still need to download all 60, unless they don't mind "missing" errors on VAM startup (...weirdos).

I agree, it is like biting into a chocolate chip cookie and discovering they are raisin oatmeal cookies when you pull down what looks like a cool scene and it is nothing like the pictures or video!!!

I just like to clean and optimize everything I can. If I can identify that an object has baggage that requires several other dependencies, especially ones that are PC, NC, or questionable licensing I find a suitable replacement, create what I need in Blender, or convert something that is CC0 from sites like Sketchfab.
 
Back
Top Bottom