FocusOnMe!

Plugins FocusOnMe!

Is there any way you could update your other lighting resource to just be the lighting module from this plugin without the AutoFocus so that it can be compatible with everything that uses Post magic and for people who use it as a session plugin, without having to do any workarounds?
I have a better idea. Stay tuned.

Edit: But if you have both as a session plugin there shouldn't be any conflict I think. Because none of the two gets removed on scene exit.
 
I have a better idea. Stay tuned.

Edit: But if you have both as a session plugin there shouldn't be any conflict I think. Because none of the two gets removed on scene exit.
There is still the issue with many scenes that come with PostMagic though sadly. For example, everything made by C&G Studios. Hopefully your idea works. I am still on version 3 ?
 
Is there any way you could update your other lighting resource to just be the lighting module from this plugin without the AutoFocus so that it can be compatible with everything that uses Post magic and for people who use it as a session plugin, without having to do any workarounds?
What errors do you get and when?
 
There is still the issue with many scenes that come with PostMagic though sadly. For example, everything made by C&G Studios. Hopefully your idea works. I am still on version 3 ?
Ah, so your problem occours when there are 2 PostMagics present (scene and session)? I think that should conflict regardless if my plugin is active or not.
 
Ah, so your problem occours when there are 2 PostMagics present (scene and session)? I think that should conflict regardless if my plugin is active or not.
Well thats why I was asking if you could update your other resource to just be this plugin without AutoFocus. Cause your AutoFocus conflicts with the PostMagic plugin and causes issues. It can be resolved with double tapping M on desktop and reloading everything, but on VR, the issue requires a complete reset of VAM and can't be resolved without disabling your plugin completely.
 
Well thats why I was asking if you could update your other resource to just be this plugin without AutoFocus. Cause your AutoFocus conflicts with the PostMagic plugin and causes issues. It can be resolved with double tapping M on desktop and reloading everything, but on VR, the issue requires a complete reset of VAM and can't be resolved without disabling your plugin completely.
To be clear: With PostMagic i mean MacGruber.PostMagic, not my adaptation. Based on your initial post I tought you were running PostMagic as a session plugin too, which would inevitable lead to conflicts if the scene also has an instance. But it shouldn't conflict with FocusOnMe per se.

Regardless, the new version will not initialize the DoF parts until you hit F8 the first time, essentially beeing just the lighting as you wished. I'm now trying to make it even better by auto-de-initializing the DoF before you leave the scene. I think that should fix it because in my experience the error only occours if PM is removed while mine is still present, not the other way round. Can you confirm that?

Edit: There seems to be no "onBeforeSceneLoad" handler or something like that, so my auto- deinit is not possible.
 
Last edited:
To be clear: With PostMagic i mean MacGruber.PostMagic, not my adaptation. Based on your initial post I tought you were running PostMagic as a session plugin too, which would inevitable lead to conflicts if the scene also has an instance. But it shouldn't conflict with FocusOnMe per se.

Regardless, the new version will not initialize the DoF parts until you hit F8 the first time, essentially beeing just the lighting as you wished. I'm now trying to make it even better by auto-de-initializing the DoF before you leave the scene. I think that should fix it because in my experience the error only occours if PM is removed while mine is still present, not the other way round. Can you confirm that?
I do also use Post Magic as a session plugin, but I disable it whenever I use VR or it will break the UI. As far as I can tell after encountering this problem for so long and coming across it with your plugin as well, it seems that if anything in the DoF script in your plugin is ran at the same time as PM, whether in session, scene, or atom, it will cause the UI to break when leaving the scene in which both scripts had attempted to both load at the same time. I am able to fix things by disabling DoF on your plugin and then reloading my session plugins. As far as what happens with your latest versions, I am not sure, I haven't upgraded cause of the requirement it be a session plugin and can't be placed as an atom plugin and I am not sure how the 2 session plugins will interact with each other.

It sounds like your solution would work though :D
 
CheesyFX updated FocusOnMe! with a new update entry:

Further improved compatibility with PostMagic

  • If you toggle the DoF off before entering a scene with PostMagic (or never toggle it on), there should't be any conflicts (F8 by default).
  • If you switch between scenes with/without PostMagic, make sure to disable my DoF first. Most of the times you won't have a problem either. But the PM settings from the last scene will be active in the new scene after you toggle my DoF on, even if the new scene doesn't have PM installed.

Read the rest of this update entry...
 
So i get this when loading the .cslist in the main folder as a session plugin.
!> Compile of CheesyFX.FocusOnMe!.9:/Custom/Scripts/CheesyFX/FocusOnMe/FocusOnMe!.cslist failed. Errors:
!> [CS1061]: Type `JSONStorableFloat' does not contain a definition for `SetInteractble' and no extension method `SetInteractble' of type `JSONStorableFloat' could be found. Are you missing an assembly reference? in <Unknown> at [281, 70]

And i get this when loading the one in the "Scene Plugin" subfolder...
!> FocusOnMe!: FocusOnMe.cslist not found. Install it as a session plugin.
 
So i get this when loading the .cslist in the main folder as a session plugin.
!> Compile of CheesyFX.FocusOnMe!.9:/Custom/Scripts/CheesyFX/FocusOnMe/FocusOnMe!.cslist failed. Errors:
!> [CS1061]: Type `JSONStorableFloat' does not contain a definition for `SetInteractble' and no extension method `SetInteractble' of type `JSONStorableFloat' could be found. Are you missing an assembly reference? in <Unknown> at [281, 70]

And i get this when loading the one in the "Scene Plugin" subfolder...
!> FocusOnMe!: FocusOnMe.cslist not found. Install it as a session plugin.
  1. Update VAM
  2. You generally don't need to touch this.
 
Hi @CheesyFX, I've noticed that the 'ToggleSceneLights' button stops working when you switch to a different scene. However, I've checked your script and found that if you modify the 'ToggleSceneLighting' method this way, it should work fine:
private static void ToggleSceneLighting(bool fromKeybindings = false)
{
if (fromKeybindings && !useKeybindings.val) return;
if(isSceneLit) sceneLights.Clear();
foreach (var atom in SuperController.singleton.GetAtoms())
{
if (atom.type == "InvisibleLight")
{
JSONStorableBool on = atom.GetStorableByID("Light").GetBoolJSONParam("on");
if (isSceneLit)
{
sceneLights.Add(atom, on.val);
on.val = false;
}
else
{
if (sceneLights.ContainsKey(atom))
on.val = sceneLights[atom];
else
sceneLights.Add(atom, on.val);
}
}
}
isSceneLit = !isSceneLit;
}
 
Hi @CheesyFX, I've noticed that the 'ToggleSceneLights' button stops working when you switch to a different scene. However, I've checked your script and found that if you modify the 'ToggleSceneLighting' method this way, it should work fine:
Sorry for the late reply, I was caught up with other things...
And thanks for the fix you privided. But I think I have to expand on it. If you switch scenes, 'isSceneLit' should be set to true, otherwise the first tap will not work. I'll update it soon.

Edit: I think setting 'isSceneLit' to true on scene load should actually suffice, as the Dictionary gets cleared in that case after tapping. But I'll keep the sanity check nonetheless. Better safe than sorry, huh ;)
 
Last edited:
@CheesyFX F8 The 'depth of field' feature also enables bloom, and there's no way to turn it off.
SNAG-0009.png
 
The 'depth of field' feature also enables bloom, and there's no way to turn it off.
It only enables it if you previously had PostMagic with bloom active (same session I think). That's because PostMagic doesn't fully delete the behaviours if you disable or remove it. If you disable all effects in PM separately before removing it, it should work fine, if I remember correctly.
 
CheesyFX updated FocusOnMe! with a new update entry:

v11 Advanced shadow options

I included the advanced shadow options @Stopper exposed in his lighting plugin. Most of it isn't that useful here cause the lights are typicall< close to the target.

But the "Shadow Near Plane" can be very useful. If there are objects besides you, they usually obstruct the lights. Increase the near plane value in that case, so that these objects close to the light do not cast shadows.
This is especially true if you are in an environment with a rather low ceiling...

Read the rest of this update entry...
 
CheesyFX updated FocusOnMe! with a new update entry:

v12

  • The scene plugin is now removed before saving a scene if all lights are off at that moment (big button showing) or if LightMeUp is disabled. This prevents producing an unwanted depenency.
    If you toggle the lights back on the scene plugin is added again.
  • The auto focus was not working after VaM startup until you reload the plugin. This only ocoured if you had set up the session plugin preset while this was active.
    I hate this auto restore shit. Fixed now, after like 5h :mad...

Read the rest of this update entry...
 
Hey CheesyFX, awesome plugin you got there. I wonder if it would be possible for you to implement a toggle feature for VR mode? I usually play in VR mode but use the desktop view for scene setups. Unfortunatly the lights prioritize the VR headset regardless of whether the focus is on it (by pressing 'm').
 
Hey CheesyFX, awesome plugin you got there. I wonder if it would be possible for you to implement a toggle feature for VR mode? I usually play in VR mode but use the desktop view for scene setups. Unfortunatly the lights prioritize the VR headset regardless of whether the focus is on it (by pressing 'm').
Hey! Should be possible, I'll have a look when I find the time.
 
Back
Top Bottom