Appearance Loader

Plugins Appearance Loader

I think that you can specify the Preset with "Set Appearance Filename" in the trigger in the animation and load the Preset with "Load Appearance from VapPreset", but is this insufficient?

thanks, I'm actually talking about two scenarios -

Scenario 1 -
- you have a bunch of appearance presets
- you simply want to create a cache file of all the textures from the above
- being able to select a folder and say load ALL presets, it would load as many as it could (and create cache) until it crashes

Scenario 2 -
- You have a long looped animation scene (existing content in an addon package, not something you are trying to edit)
- With the same feature described above you could watch say a long strip club looped dance animation where the model changes on a fixed interval
 
thanks, I'm actually talking about two scenarios -

Scenario 1 -
- you have a bunch of appearance presets
- you simply want to create a cache file of all the textures from the above
- being able to select a folder and say load ALL presets, it would load as many as it could (and create cache) until it crashes

Scenario 2 -
- You have a long looped animation scene (existing content in an addon package, not something you are trying to edit)
- With the same feature described above you could watch say a long strip club looped dance animation where the model changes on a fixed interval
Thank you for your explanation.
I understand your request, but it seems that it would be necessary to change the UI significantly to realize it. Unfortunately I think it's difficult to implement. very sorry.
 
ky1001 updated Appearance Loader with a new update entry:

Update

Updates (ver.11):
1) Fixed not properly handling "setUnlistedParamsToDefault" which is a setting item of vap Pose Preset. It was initializing all items for 'Change' even if 'setUnlistedParamsToDefault' was 'false'.
2) Expanded the function of "Keep the previous folder" to include var files as folders.

Read the rest of this update entry...
 
ky1001 updated Appearance Loader with a new update entry:

Bug fix

Sorry for the short update.

Updates (ver.12):
1) I noticed that loading textures fails if the var containing the textures used for Person is not directly under "AddonPackages" or in some subdirectories. Expanded search scope to "AddonPackages" and all subdirectories. Please note that the processing may take longer depending on the environment due to the expansion of the search target.
2) The Preset file name or Person name is now displayed in the window that displays the loaded Hair and...

Read the rest of this update entry...
 
ky1001 updated Appearance Loader with a new update entry:

Update

Updated content (ver.13)
1) When loading an Appearance Preset from a var, if a Plugin in the same var was specified, an error could occur when loading the Plugin. This has been fixed.
2) Fixed an issue where CUA sometimes became unstable when loading an Appearance to which CUA was linked.
3) Reduced Appearance loading time in some environments.

Read the rest of this update entry...
 
ky1001 updated Appearance Loader with a new update entry:

Update

Updated (ver.13)
1) When loading an Appearance Preset from a var, if a Plugin in the same var was specified, an error could occur when loading the Plugin. This has been fixed.
2) Fixed an issue where CUA sometimes became unstable when loading an Appearance to which CUA was linked.
3) Reduced Appearance loading time in some environments.

Read the rest of this update entry...
 
i do have a few questions regarding this plugin:
* is there a current demonstration scene i can take apart/look at to see how everything works?
* can i use this to "preload" skins, clothing etc. ?

I am working on a scene where i have multiple skins, clothes and poses which i want to switch via the timeline plugin. So far i just load the presets at certain points in the timeline which causes a loading message and delays smooth play - is it possible to prevent this with the plugin?

As a workaround i just added 5 "person" atoms which i dis-/enable at those points which kinda works but has some issues as certain morphs and clothes dont get loaded correctly this way. I am wondering if there is a more elegant way to do this with the help of this quite genius plugin.

Thanks!
 
i do have a few questions regarding this plugin:
* is there a current demonstration scene i can take apart/look at to see how everything works?
* can i use this to "preload" skins, clothing etc. ?

I am working on a scene where i have multiple skins, clothes and poses which i want to switch via the timeline plugin. So far i just load the presets at certain points in the timeline which causes a loading message and delays smooth play - is it possible to prevent this with the plugin?

As a workaround i just added 5 "person" atoms which i dis-/enable at those points which kinda works but has some issues as certain morphs and clothes dont get loaded correctly this way. I am wondering if there is a more elegant way to do this with the help of this quite genius plugin.

Thanks!
Unfortunately, I haven't created a demo scene.
Appearance Preset (vap) can be loaded by specifying the file name with the UIButton. You can also select the target to load such as skin or clothing with UIButton. There is a bug when loading Look (json), and you need to specify the full path including the drive name, but it can be loaded using the UIButton. This restriction does not apply when loading from a var file.
I don't really understand what "preload" means, but when loading for the first time, a message indicating that it is loading is displayed. If the cache is set, the message will not be displayed on subsequent loads. I don't think the message will appear in the actual scene if you load it for the first time in a place where the user can't see it.
However, loading with this plug-in takes more time than loading with VAM's standard functions, so this must be taken into account.
 
Get ideas from Pose L-R MIrror
Can InvisibleLight achieve left-right symmetry?Maybe some CUAs or atom?
 
I'm having trouble having activating the appearance loader plugin with a trigger. Nothing happens when i try to use it as a button trigger set to "load appearance from scene"
 
I'm having trouble having activating the appearance loader plugin with a trigger. Nothing happens when i try to use it as a button trigger set to "load appearance from scene"
In order to load an Appearance Preset using an external trigger, you must specify the file name to be loaded in advance with "Set Appearance Filename".
If the scene is in a var, please also specify the var name.
Example: Sky00VaM.Sunny.1:/Saves/scene/Sunny.json

If multiple Persons exist in the scene, "Select Person" must be set manually.
 
Any way to have the scene selection "Keep Open" checkbox work (so that the scene selection window is kept open after selecting a scene)? Currently when that box is checked the scene selection window still disappears.
 
Any way to have the scene selection "Keep Open" checkbox work (so that the scene selection window is kept open after selecting a scene)? Currently when that box is checked the scene selection window still disappears.
I have disabled the "Keep Open" option on the file selection screen.
I experimentally created a version with "Keep Open" enabled, but there was a problem. If there are multiple Persons in the Scene, it is not possible to select the Person, so Appearance cannot be loaded. If there is only one Person in the Scene, Appearance will be loaded, but for some reason the selection screen will close when loading is complete.
I will not enable "Keep Open" because it seems like it will take some time to take countermeasures.
I also experimented with Appearance of vap/json. Enabling "Keep Open" worked fine here. Officially, I will not enable "Keep Open", but if you personally need it, I will paste the file.
 
Test version that allows you to divide Clothing into Real Clothing and Not Real Clothing and turn them on and off.
There were cases where Clothing and Hair parameters were not initialized, so I added forced initialization for Clothing and Hair.
 

Attachments

  • AppearanceLoader.cs
    186.9 KB · Views: 0
Last edited:
Thanks for your work. It is by far my most used plugin.

I made this change in your script:


C#:
                    // SuperController.singleton.GetMediaPathDialog(HandleLoadPreset, "json", tempPath, true, true, false, null, false, jsonSceneShortcuts);
                    SuperController.singleton.GetScenePathDialog(HandleLoadPreset);

It makes the scene selection dialog a bit more convenient. The dialog is specifically geared towards selecting scenes.
 
Thanks for your work. It is by far my most used plugin.

I made this change in your script:


C#:
                    // SuperController.singleton.GetMediaPathDialog(HandleLoadPreset, "json", tempPath, true, true, false, null, false, jsonSceneShortcuts);
                    SuperController.singleton.GetScenePathDialog(HandleLoadPreset);

It makes the scene selection dialog a bit more convenient. The dialog is specifically geared towards selecting scenes.
Thank you for your suggestion.
I can't say exactly when this will happen, but I would like to use it in the next update.
By the way, are you familiar with C#?
AppearanceLoader uses a fixed time to finish processing such as applying Morph, but someone told me that I should use a custom event. I don't know how to fix it because I don't have enough knowledge, but could you please give me some advice?
 
Thank you for your suggestion.
I can't say exactly when this will happen, but I would like to use it in the next update.
By the way, are you familiar with C#?
AppearanceLoader uses a fixed time to finish processing such as applying Morph, but someone told me that I should use a custom event. I don't know how to fix it because I don't have enough knowledge, but could you please give me some advice?
Sorry but this was my first time programming in C#. I will look into it though. I will feel good if I can contribute meaningful improvements to this plugin.
 
First thing I wanna ask is why you are using WaitForSeconds(1f) in places like this:


C#:
                        DAZMorph morph;
                        morphControl.GetMorphUids().ForEach((uid) =>
                        {
                            morph = morphControl.GetMorphByUid(uid);
                            if (!morph.isPoseControl)
                            {
                                morph.SetDefaultValue();
                            }
                        });
                        yield return new WaitForSeconds(1f);

I tried commenting these waits out and I don't see a problem. But my scene is very vanilla. Did you encounter problems without these waits?

Edit: I am talking specifically about the the waits after the morphs are set. Haven't looked into the rest yet.
 
Last edited:
First thing I wanna ask is why you are using WaitForSeconds(1f) in places like this:


C#:
                        DAZMorph morph;
                        morphControl.GetMorphUids().ForEach((uid) =>
                        {
                            morph = morphControl.GetMorphByUid(uid);
                            if (!morph.isPoseControl)
                            {
                                morph.SetDefaultValue();
                            }
                        });
                        yield return new WaitForSeconds(1f);

I tried commenting these waits out and I don't see a problem. But my scene is very vanilla. Did you encounter problems without these waits?

Edit: I am talking specifically about the the waits after the morphs are set. Haven't looked into the rest yet.
Problems occur when there is no wait. The attached file is a modified version so that wait is enabled only for checked items. Check only "Change Morphs" and try making it work. Even if "Finished" is displayed on the plugin's UI, the actual morph change process will not end and the change will continue for a while.
 

Attachments

  • AppearanceLoader.cs
    174.2 KB · Views: 0
Problems occur when there is no wait. The attached file is a modified version so that wait is enabled only for checked items. Check only "Change Morphs" and try making it work. Even if "Finished" is displayed on the plugin's UI, the actual morph change process will not end and the change will continue for a while.
That is happening because of this line:

C#:
            StartCoroutine(changeMorph());

This starts changeMorph in a new coroutine. So the setNewData() function returns immediately without waiting for changeMorph() to finish, while changeMorph() runs in the background.

I was able to fix this behaviour by changing the setNewData method's return type to IEnumerator, because it looks like the only convenient way to be able to wait for a coroutine to finish is use the syntax `yield return StartCoroutine(changeMorph())` and this can apparently only be done inside such a method.

Try out the attached script.

EDIT: Alternatively, you can also change the return type of changeMorph() function to void. It seems like the whole reason for it returning IEnumerator is because of `yield return new WaitForSeconds()`. I just tried this where I changed its return type to void and removed all the WaitForSeconds calls in it. It seems to work fine. But I tested with looks that have combined morphs so there isn't much to load. I am downloading a look which has a lot of morphs and I am gonna test with that.
 

Attachments

  • AppearanceLoader.cs
    174.2 KB · Views: 0
Last edited:
That is happening because of this line:

C#:
            StartCoroutine(changeMorph());

This starts changeMorph in a new coroutine. So the setNewData() function returns immediately without waiting for changeMorph() to finish, while changeMorph() runs in the background.

I was able to fix this behaviour by changing the setNewData method's return type to IEnumerator, because it looks like the only convenient way to be able to wait for a coroutine to finish is use the syntax `yield return StartCoroutine(changeMorph())` and this can apparently only be done inside such a method.

Try out the attached script.

EDIT: Alternatively, you can also change the return type of changeMorph() function to void. It seems like the whole reason for it returning IEnumerator is because of `yield return new WaitForSeconds()`. I just tried this where I changed its return type to void and removed all the WaitForSeconds calls in it. It seems to work fine. But I tested with looks that have combined morphs so there isn't much to load. I am downloading a look which has a lot of morphs and I am gonna test with that.
Sorry for the late reply.
Thank you for looking into custom events. In everlaster's opinion, it doesn't seem necessary to use custom events, so I'm a little relieved. I confirmed the effect of "yield return StartCoroutine(changeMorph());". Thank you for your suggestion.
By the way, I found that there was a problem with using the original suggestion, "GetScenePathDialog." The problem is that when you select Appearance using the scene load dialog, the plugin's custom UI closes and you can no longer see the progress of the plugin.
I read the post on Discord, It seems I misunderstood the purpose for which you suggested using "GetScenePathDialog". I thought the purpose was to improve the "Current Directory" column, but your purpose was to display a list of var files in the "Shortcuts" column. By turning on "Use Shortcuts in Scene Load Dialog" on the plugin's UI, a list of vars will be displayed. I would like to change the initial value of "Use Shortcuts in Scene Load Dialog" to on instead of using "GetScenePathDialog". What do you think?
 

Attachments

  • AppearanceLoader SceneLoadDialog.jpg
    AppearanceLoader SceneLoadDialog.jpg
    131 KB · Views: 0
  • AppearanceLoader.cs
    187.8 KB · Views: 0
Last edited:
1) Change standby method
2) RealClothing/NotRealClothing separation
3) "Use Shortcuts in Scene Load Dialog" Initial state is ON
 

Attachments

  • AppearanceLoader142.cs
    197.7 KB · Views: 0
Last edited:
Sorry for the silence. I completely borked my computer. Once I set everything back up I will look into the updated script. Thanks.
 
Back
Top Bottom