-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Control OBS-shaderfilter plugin color #2
Comments
I think you can do it, but I can't test it here. Booting in Windows gets me sick. By seeing what's inside that file, we gonna know if you can change that value. |
Wow, thanks for your help, i am really in need of it, because I am trying to finish my exam project and I am not really capable of doing it at the moment. I did what you said and exported the testscene.json : before I did that I already tried this python: crazy!! It worked but I only dont know what kind of color value it is Finally I could solve it by calculating the color like described here : But ATTENTION!!!: the Color Values are ordered BGR not RGB so this color is a Blue Thank you so much for the hint, with that procedure of creating the empty testscene! |
Pull this git again and use like this: |
I cannot do this on windows, otherwise I would have to repeat all those changes I mentioned here: I get the following message again scriptlog under windows 10 I just manually updated my obs_osc_api.py with that function (rgba2decimal) thanks for that hint too. |
Ok, the manual fix is to update def source_set_setting(unused_addr, source_name, setting, value, private=False):
c2(f'source_set_setting(source_name="{source_name}", setting="{setting}", value="{value}", private={private})')
with ExitStack() as stack:
if not private:
source = stack.enter_context(source_auto_release(source_name))
else:
source = globals()[source_name]
if source:
newSettings = stack.enter_context(new_settings())
if type(value) == bool:
obs.obs_data_set_bool(newSettings, setting, value)
elif type(value) == str and (value == 'true' or value == 'True'):
obs.obs_data_set_bool(newSettings, setting, True)
elif type(value) == str and (value == 'false' or value == 'False'):
obs.obs_data_set_bool(newSettings, setting, False)
elif type(value) == str:
obs.obs_data_set_string(newSettings, setting, value)
elif type(value) == int:
obs.obs_data_set_int(newSettings, setting, value)
elif type(value) == float:
obs.obs_data_set_double(newSettings, setting, value)
# The new part!!!
elif type(value) == list:
value = rgba2decimal(value)
obs.obs_data_set_int(newSettings, setting, value)
obs.obs_source_update(source, newSettings)
else: print(f'Source no existe: {source_name}') The new part is the value argument as a list. So, you call the function with a RGBA list, function converts it with |
Hi,
I am trying to set the color of the shaderfilter plugin via osc.
@MarioMey MarioMey, you hinted me to this page.
Do you think it is possible to control the color input value that filter with your plugin? I tried to understand the contents of the obs_api.py file but I couldnt really understand....
Is it perhaps possible to just set and delete filters, but adding default settings to it while setting?
Thanks in advance,
The text was updated successfully, but these errors were encountered: