Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Fu - Math operations failing
#5
(02-01-2023, 02:48 PM)Ofnuts Wrote:
(02-01-2023, 12:19 AM)BaconWizard17 Wrote: I did test with one of the values defined as a float() instead, and it worked. So are the values produced by image.width/image.height strings? Is that why it was originally failing?

Edit: I realized that I can check the documentation for this question, and that that operation produces an integer.

In Gimp most coordinates values are integers (because they point at a specific pixel). The notable exception is paths where everything is a float. Be also aware that the values you receive as input parameters from things like PF_SLIDER are always floats, and may have to be cast to ints before use.

Thanks for the tip! You all have been really helpful with me trying to figure out my issues.
Modder/Skinner at MarvelMods.com using GIMP to create, edit, and export textures and previews more efficiently.

My GIMP scripts hosted on GitHub
Reply


Messages In This Thread
RE: Python Fu - Math operations failing - by BaconWizard17 - 02-01-2023, 06:08 PM

Forum Jump: