Skip to content

Fix issue #240: Rectangle example sets RGBA defaults on the wrong param#241

Merged
garyo merged 2 commits into
AcademySoftwareFoundation:mainfrom
garyo:fix/issue-240-rectangle-defaults
May 27, 2026
Merged

Fix issue #240: Rectangle example sets RGBA defaults on the wrong param#241
garyo merged 2 commits into
AcademySoftwareFoundation:mainfrom
garyo:fix/issue-240-rectangle-defaults

Conversation

@garyo
Copy link
Copy Markdown
Contributor

@garyo garyo commented May 26, 2026

Fixes #240.

As reported by @Babakinha, the Rectangle example set the RGBA colour
default values before the colour parameter was defined. The four
kOfxParamPropDefault calls therefore operated on corner2's property
handle, corrupting its default instead of setting the colour to opaque
black.

This moves the four default-setting calls to immediately after the
colour parameter is created, so paramProps refers to the colour
param when they run. No other behavior changes.

@garyo garyo force-pushed the fix/issue-240-rectangle-defaults branch from 41d4058 to 44a826d Compare May 26, 2026 17:11
…the colour param

The four kOfxParamPropDefault calls (0,0,0,1) were applied to corner2's
property handle before the colour parameter was defined, so they
corrupted corner2's default instead of setting the colour. Move them
after the colour param is created.

Signed-off-by: Gary Oberbrunner <garyo@darkstarsystems.com>
@garyo garyo force-pushed the fix/issue-240-rectangle-defaults branch from 44a826d to 9004e66 Compare May 26, 2026 17:12
@garyo garyo merged commit aebd4e4 into AcademySoftwareFoundation:main May 27, 2026
10 checks passed
@garyo garyo deleted the fix/issue-240-rectangle-defaults branch May 27, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rectangle example plugin sets wrong defaults

1 participant