Skip to content

Conversation

@cmyk-student
Copy link

Hello! GIMP recently added support for mypaint-brushes-2. When we did so, we started seeing the following warnings on start-up.

Warning: Unknown input_id: -1 for input: surfacemap_x

See https://gitlab.gnome.org/GNOME/gimp/-/issues/14461

This warning comes from several Dieterle brushes which have surfacemap_x and surfacemap_y brush inputs. Looking at libmypaint's brushsettings.json, there is no inputs with that name (causing the warning).

However, there are gridmap_x and gridmap_y inputs, which have the same value range and were implemented from a branch called /surfacemap. It is highly likely that surfacemap was an older name for gridmap that wasn't corrected when added to mypaint-brushes, as there are several related properties with that name like gridmap_scale_x.

This patch renames the 12 instances of "surfacemap_" to "gridmap_" to remove the warning and allow subsequent properties like "viewzoom" to load as well.

brushsettings.json in libmypaint does not
have "surfacemap_x" or "surfacemap_y"
brush inputs, which causes a warning when
trying to load /Dieterle brushes in libmypaint.
"surfacemap" was an older name for these
inputs, which were ultimately renamed to
"gridmap" in libmypaint.
This patch renames them in mypaint-brushes
as well, so that they can load without
warnings.
@odysseywestra odysseywestra requested a review from briend July 15, 2025 04:27
@odysseywestra
Copy link
Member

@briend could you look into this since this?

@AesaraB
Copy link

AesaraB commented Jul 15, 2025

mypaint/libmypaint@dbc0f5a
mypaint/libmypaint#72

Looks like the merged branch was named "surfacemap", which is also the only reference to the id in libmypaint's commit history.

The brushes were added in a single commit in 2019, but belonged to this repo prior to that. Brien's repo still uses the surfacemap id.

The brush files use gridmap_scale_<x|y>, which adds another layer to this mystery.

Ultimately, the easiest thing to do would be to compare the brushes' behaviour in MyPaint with, and without the renamed IDs

@cmyk-student
Copy link
Author

@AesaraB : Thanks for digging up those links! These two comments are interesting:

mypaint/libmypaint#72 (comment):

Can we change the name to something other than "Surface" map, since no surface is involved as input to the mapping? I want there to be a way of feeding an alpha mask to the brush engine at some unspecified future date so that dabs are masked.

mypaint/libmypaint#72 (comment):

Thanks Andrew! I think I fixed it all. I renamed it to "GridMap" since. . .it's basically a grid... mapping values to a location.... Sound good?

There may be some change in the brush behavior. From the warning, it looks like it stops reading when it encounters an "invalid" input (otherwise we'd also get warnings about surfacemap_y). So that plus "viewzoom" settings aren't being applied to the brushes, I don't think.

@AesaraB
Copy link

AesaraB commented Jul 15, 2025

An interesting dilemma, do we stick with the behaviours users are familiar with, or switch to "correct", yet "different" behaviours?

We could merge the change, and get user feedback during the next alpha

gnomesysadmins pushed a commit to GNOME/gimp that referenced this pull request Aug 30, 2025
Alex's patch from mypaint/mypaint-brushes#7

Since mypaint project is long time gone, we need to patch ourserves.
lukaso added a commit to lukaso/macports-ports that referenced this pull request Aug 31, 2025
ryandesign pushed a commit to macports/macports-ports that referenced this pull request Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants