mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
plug-ins: port palette-offset to Python 3.
Oups, I left the plug-in as Python 2. This was still a good proof-of-concept that GIMP 3 will support as well Python 2 and Python 3 (even though Python 2 is end-of-life soon anyway).
This commit is contained in:
parent
dca353f8cd
commit
82ada55b99
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python2
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -48,10 +48,10 @@ def run(procedure, args, data):
|
|||
palette = Gimp.palette_duplicate (palette)
|
||||
|
||||
tmp_entry_array = []
|
||||
for i in xrange (num_colors):
|
||||
for i in range (num_colors):
|
||||
tmp_entry_array.append ((Gimp.palette_entry_get_name (palette, i)[1],
|
||||
Gimp.palette_entry_get_color (palette, i)[1]))
|
||||
for i in xrange (num_colors):
|
||||
for i in range (num_colors):
|
||||
target_index = i + amount
|
||||
if target_index >= num_colors:
|
||||
target_index -= num_colors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue