If you like this plugin, consider giving it a thumbs up or posting a review. Thanks! (y)
Requires VaM v1.20 or newer
Var License Filter

Var License Filter is a session plugin aimed at creators. It can be used to only load those var packages which have suitable license types for use in a project.

The more packages you have installed, the more additional benefit you will get from the plugin. Filtering out all of the packages you can't use in your project anyway will speed up loading times and make it easier to browse all resource types.

Features overview

  • load only packages that have the selected license types
  • auto-select license types that are freely distributable
  • auto-select license types that allow commercial use
  • always enable or always disable individual packages to prevent license filtering from changing their visibility
  • packages of user default session plugins are automatically set as always enabled (can be toggled off)
  • the plugin automatically treats PC EA packages with their secondary license type when the early access period has expired
The main use cases are:
  1. When creating a scene or look to be released for free on the Hub, you would want to exclude any packages whose license doesn't allow free distribution.
  2. When creating a paid scene or look, you would want to exclude any packages that don't allow commercial use.
  3. When merging morphs, you would want to exclude any morphs from packages that that don't allow derivatives (notably, CC with the ND component)
But feel free to use it to filter packages by any license type, for whatever use case you can think of.

Link: Official - VAR Licenses

When you're done with a project, it's easy to re-enable all packages by running the filter with all license types enabled.

Since Var License Filter enables and disables packages en masse, it will affect every type of resource. This is good because even things like assetbundle vars and skin texture vars will get toggled on or off, and there's no built in way to easily check the licenses of those resources while browsing them.

⚠️ Disclaimer: You are responsible for ensuring that your usage of the packages that you manage with Var License Filter is in accordance with their licenses.

Installation

On first run, the plugin will ask you the location of the AddonPackages dir. The plugin scans VaM\Custom\PluginData\ and VaM\Saves\PluginData\ for suitable locations. You might already have a suitable symlinked location if you've installed JayJayWon's BrowserAssist, for example. If so, you can skip step 2 below.
  1. Put everlaster.VarLicenseFilter.1.var to your AddonPackages dir
  2. Create a symlink from VaM\Custom\PluginData\AddonPackages to VaM\AddonPackages by running the included batch file
    • Open the everlaster.VarLicenseFilter.1.var
    • Copy the CreateAddonPackagesSymlink.bat file to VaM\Custom\PluginData
    • Run the batch file as administrator (right click -> Run as administrator)
  3. Start VaM, add the plugin to Session Plugins and open the UI
  4. Select and save the AddonPackages location
❗ Warning: In theory, setting up the symlink can allow some malicious VaM plugin to delete the contents of the AddonPackages dir. Feel free to take any backups you think are necessary, and ensure that you only install plugins from reliable and trusted sources and creators.

Usage

Basic usage


UI_guide1.png


"Undo run filters" resets the enabled state of all packages to what it was on initialization, except if the status changed due to being set always enabled or always disabled (see below).

When you install new add-on packages and want to filter them by license, you need to reload the plugin and run the filters again. The plugin doesn't keep track of what new packages are being added/removed, it just loads the packages once on initialization.

Managing individual packages

You might want to keep specific resources always available regardless of license type, even when those aren't plugins in your default session plugins preset.

In the below example, I added the TestPlugin (which was disabled in the above screenshot) to the "Always enabled packages" list, thus it will not be disabled despite having the PC EA license.

UI_guide2.png

A note on disabling packages via Package Manager

If you disable a package via Package Manager and the plugin has never been initialized while that package has been present in your VaM installation, the plugin doesn't know about its license type. To fix this, just follow the instructions in the plugin UI.

How it works

Due to technical limitations, Var License Filter has to jump through a couple of hoops in order to actually work. The first is having to set up the symlink to allow the plugin to write to the AddonPackages dir, and the second is having to restart VaM to actually filter the packages.

The plugin disables var packages by creating files with the ".disabled" file extension into the VaM\AddonPackages dir. Packages are enabled again by deleting those files. This is how VaM itself manages the enabling and disabling of a package when you toggle the Enabled checkbox in the package manager.

Restarting VaM via the plugin UI is a necessary step for enabling/disabling packages because VaM reads the .disabled files only on startup, and there's no way to programmatically enable or disable multiple packages at once while VAM is running.

The plugin scans all AddonPackages only when initialized. Initialization happens when you navigate to the plugin UI, so it's safe to keep it as a user default session plugin - until you open it, it will do nothing but wait. Once you open it, packages are scanned and the state is locked in terms of which AddonPackages are loaded and enabled. If you add/remove packages after the plugin is initialized, and want to run the license filters during the same session, you should reload the plugin first.

What data does the it store?

VarLicenseFilter writes to the following files in Custom\PluginData\everlaster\VarLicenseFilter:

FilePurpose
preferences.jsonStores the path to your symlink of AddonPackages, and whether packages of default session plugins are always enabled.

The AddonPackages path can be changed manually in the preferences file. It must be a path under Saves\PluginData or Custom\PluginData. You can also delete the preferences file or just the path to make the plugin scan for suitable paths on startup.
license_cache.jsonCaches the license types of packages that have been enabled when the plugin was initialized.
secondary_license_cache.jsonCaches the secondary license types and early access end dates of packages that have the PC EA primary license.
always_enabled_packages.txtList of packages that are always enabled when VAM is restarted via the plugin.
always_disabled_packages.txtList of packages that are always disabled when VAM is restarted via the plugin.

If you change the license type of an existing var file that has been cached the plugin will not know about it. To fix, delete the cache files so they will be regenerated on the next initialization, or manually find and delete the var file's information from the JSON.

Troubleshooting

If you run into issues:

1. Please report the issue and describe it in detail so that I can investigate it.
2. Try deleting the Custom\PluginData\everlaster\VarLicenseFilter dir and see if that fixes things.

Credits

Thanks to @JayJayWon for the BrowserAssist plugin which served as inspiration for this plugin!
Author
everlaster
Downloads
2,462
Views
6,597
Packages
1
Total Size
0.04 MB
Version
1.0.0 / 2.var (free)
First release
Last update
Rating
5.00 star(s) 7 ratings

More resources from everlaster

Latest updates

  1. v1.0 is free

    VarLicenseFilter is now out of early access with the CC BY-SA license. ?

Latest reviews

I made a lmodel and before I merged it I checked to see if the morphs I used were good to go.....I had to redo the entire character. This is a big help in sorting everything out. Just what I needed.
Upvote 0
I needed this bad.. THANKYOU as I have mixed in so many of other peoples works it is impossible to filter it all out.... your plug in should be a STANDARD
Upvote 0
Thank you so much for this. I remember how i had to re-do looks so often because i slapped PC/NC stuff onto them, which didnt properly get displayed. The ease of use is incredible too. Imho, a must-have for any creator!
Upvote 0
OMG I was just thinking about this days ago. Thank you for making this.
Upvote 0
Oh my, you seem to never run out of ideas.

What a sake, maybe I can finally dare to release some of my content without the fear violating every shit mankind knows ;)

Excellent!
Upvote 0
Thaaaannkyouuuuuuu ?
Upvote 0
Extremamente útil! Obrigado desenvolvedor!
Upvote 0
Back
Top Bottom