1. Denilson Sá
  2. small_scripts

Commits

Denilson Sá  committed aae4228

ungroup_grouplayer.py: Updating comments.

  • Participants
  • Parent commits 16535cd
  • Branches default

Comments (0)

Files changed (1)

File gimp-2.8-plug-ins/ungroup_grouplayer.py

View file
  • Ignore whitespace
 # vi:ts=4 sw=4 et
 
 # This script is also available on "GIMP Plugin Registry"
-# http://registry.gimp.org/node/TODO:UPLOAD!
+# http://registry.gimp.org/node/28596
 #
 # Tested on Gimp 2.8.6 with Python 2.7.5
 
 from gimpfu import *
 
 def ungroup_grouplayer(img, layer):
-    #if not isinstance(layer, gimp.GroupLayer):
     if not pdb.gimp_item_is_group(layer):
         gimp.message('The active layer is not a group. Please select a layer group/folder and try again.');
         return
 
     pdb.gimp_image_undo_group_start(img)
 
-    # The list of layers containing this GroupLayer.
-    #containing_list = layer.parent.children if layer.parent else img.layers
-    # The index of this GroupLayer in the previous list.
-    #index = containing_list.index(layer)
     index = pdb.gimp_image_get_item_position(img, layer)
 
     for child_layer in reversed(layer.children):
 register(
     'ungroup_grouplayer',
     'Ungroup a GroupLayer',
-    'Ungroup a GroupLayer. Run this on each GroupLayer to flatten the layer tree back into a layer stack.',
+    'Ungroup a GroupLayer, by moving all children to the same level as the parent. Run this on each GroupLayer to flatten the layer tree back into a layer stack.',
     u'Denilson Figueiredo de Sá',
     'Licensed under WTFPL',
     '2013-10-17',