Snippets

everlaster

Well-known member
Featured Contributor
Messages
591
Reactions
3,159
Points
93
Website
patreon.com
Twitter
everlasterVR
Patreon
everlaster
everlaster submitted a new resource:

Snippets - Miscellaneous tiny plugins.

Snippets

A collection of small unrelated scripts to address specific needs. This resource should make it more straightforward for me to release additional small free scripts in the future, as I have a template ready, and can publish them without having to create a new Hub resource. If you have an idea for something useful that could be quick and easy to implement, I'm open to your suggestions!

FileDescription
Add...

Read more about this resource...
 
That is funny... I've got a UISliderColours script in my "Utils" folder, too ;-) - Guess I'll rely on your version from now on.
 
everlaster updated Snippets with a new update entry:

v1.1.0

TL;DR
  • VR selection line settings for width, color and alpha
  • FrameRateControlEE based on FrameRateControl by @MacGruber
VR selection line settings

With the help of a mysterious stranger on Discord, I've expanded VR Pointer Settings to include width, color and alpha settings for the selection line from the VR hand to an object in the scene:
View attachment 387632
The line drawn by VAM is still there...

Read the rest of this update entry...
 
Nice to see someone maintain the FrameRateControl plugin - can you add
SuperController.singleton.onSceneLoadedHandlers += OnSceneLoaded;
And only pause the scene once loaded if the option is checked? Otherwise if you load a scene and click away it will pause and not load the scene until VAM has focus again. I made my own version of MacGruber's code for this reason but I never published it.

Oh thanks for the turn off trackers plugin, that was always a pain on startup!
 
Nice to see someone maintain the FrameRateControl plugin - can you add
SuperController.singleton.onSceneLoadedHandlers += OnSceneLoaded;
And only pause the scene once loaded if the option is checked? Otherwise if you load a scene and click away it will pause and not load the scene until VAM has focus again. I made my own version of MacGruber's code for this reason but I never published it.
I think this already works since MacGruber.Essentials.11 (update notes), my version being based on 16

Oh thanks for the turn off trackers plugin, that was always a pain on startup!
(y)
 
everlaster updated Snippets with a new update entry:

v1.1.2

  • Fixed issue in FrameRateControlEE (also present in the original) where "Pause VaM when not focused" did not allow the automatic default scene loading to proceed on startup or when restarting via Hard Reset (thanks @redeyes !)
    • The reason was that the plugin caused VaM to be paused before the first scene load had had a chance to begin
    • This only really matters if "On Startup Skip Top Menu and Load Default Scene" is checked in VaM User Preferences Misc
 
Hi @everlaster, I tried to replace my SliderColour script with yours, but in some occasions, your approach to use Object.Find results directly crashes with NullPointer exceptions (couldn't figure out why on some sliders and not others - they were all the same, same no-parent, etc.). In my script, I use the following to find the Image components
C#:
UISliderTrigger trigger = containingAtom.GetStorableByID("Trigger") as UISliderTrigger;
Slider          slider  = trigger?.slider;
if (slider != null)
{
    AcquireImage("Track",  slider.transform,  ref m_imgTrack,  ref m_jsonTrackColor,  ref m_jsonTrackAlpha);
    AcquireImage("Bar",    slider.fillRect,   ref m_imgBar,    ref m_jsonBarColor,    ref m_jsonBarAlpha);
    AcquireImage("Handle", slider.handleRect, ref m_imgHandle, ref m_jsonHandleColor, ref m_jsonHandleAlpha);
}
and AcquireImage is then using GetComponent<Image>
C#:
protected void AcquireImage(string _strImage, Transform _t, ref Image _image, ref JSONStorableColor _col, ref JSONStorableFloat _alpha)
{
   _image = _t.GetComponent<Image>();
Not sure that method has other disadvantages, but it hasn't crashed on me so far...
 
@HAL9001 Fixed :) I had forgotten that the reParentObject transform changes depending on whether the atom is parented to a subscene, so instead of
C#:
atom.transform.Find("reParentObject");
one must use
C#:
atom.reParentObject
to access the reParentObject transform in all cases to ensure the script is subscene compatible.
 
everlaster updated Snippets with a new update entry:

v1.2.0: four new modules

BulkAllowPossessGrab
  • enable or disable Allow Possess/Grab for Position or Rotation
  • execute via UI or trigger
  • select which joints to include in the operation

HairColorChangerEE

Improvements to the original script from LarrysArms.HairColorChanger.2:
  • hair list is automatically synced when navigating to plugin UI, opening Copy From popup, loading a hair preset, and loading an appearance preset
  • hair list can be synced via...

Read the rest of this update entry...
 
everlaster updated Snippets with a new update entry:

v1.3.1

  • FrameRateControlEE: fixed issue where toggling "Use target frame rate" off did not work until VSync mode was changed
  • UISliderSync: toggling "Slider is interactable" off now updates the slider to immediately have the value of the synced float parameter
  • UIToggleSync: toggling "Toggle is interactable" off now updates the toggle to immediately have the value of the synced bool parameter

Read the rest of this update entry...
 
It would so useful to have a macro that ads a button to each morph in the VaM UI that when pressed deletes the morph file from the folder. It's so painful to look up the morph in windows explorer then delete. I have about 1000 morphs that need deleting after I review them on the model. Maybe more. Please help!
 
Back
Top Bottom