Add tooltip annotation and replace deprecated obs_properties_add_button - #101
Merged
Merged
Conversation
- Parses a new `string tooltip = "...";` annotation on any shader uniform and applies it via `obs_property_set_long_description`, so OBS shows the description on hover. Applied to every property type (bool, float, int, vec2/3/4, texture, string). Vector slider variants apply the tooltip to each sub-axis so hovering X, Y, Z or W all surface the same hint. - Replaces the deprecated `obs_properties_add_button` call for the Reload Effect button with `obs_properties_add_button2`. The old API produces a C4996 deprecation warning that breaks the build under warnings-as-errors against current OBS headers. The other button call in this file already uses the new API. Behaviour is unchanged.
myrqyry
pushed a commit
to myrqyry/obs-shaderfilter
that referenced
this pull request
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two changes to
obs-shaderfilter.c:tooltipannotation on shader uniforms. Writingstring tooltip = "...";inside any uniform's annotation block applies the string viaobs_property_set_long_description, so OBS shows the description on hover. Wired through every property type:bool,float,int,vec2,vec3,vec4,texture,string. For vector slider variants (vec2/vec3/vec4withwidget_type = "slider") the tooltip applies to each sub-axis, so hovering X, Y, Z or W all surface the same hint.obs_properties_add_buttoncall for the Reload Effect button withobs_properties_add_button2. The old API produces aC4996: was declared deprecatedwarning that breaks the build under warnings-as-errors against current OBS headers. The other button call in this file (shader_convert) was already on the new API, so this is just one straggler. Behaviour is unchanged: the callback already had the(props, property, data)signature the new API expects, and thedatapointer that used to come implicitly throughobs_properties_set_paramis now passed explicitly in the call.Usage example
Test plan
string tooltip = "...";to a uniform shows the description on hover