[gimp] pdb: replace gimppdb-utils' "writable" boolean by a bitmask



commit 5732088b0c50741015a938e7ba7d65eeb2b18171
Author: Michael Natterer <mitch gimp org>
Date:   Thu Nov 8 20:46:18 2012 +0100

    pdb: replace gimppdb-utils' "writable" boolean by a bitmask
    
    called GimpPDBItemModify that currently has one member
    GIMP_PDB_ITEM_CONTENT, in order to be prepared for adding
    the "lock position" feature from bug 674160.

 app/pdb/color-cmds.c                    |   47 ++++++++++++++++--------
 app/pdb/drawable-cmds.c                 |   18 ++++++----
 app/pdb/drawable-transform-cmds.c       |   48 ++++++++++++++++--------
 app/pdb/edit-cmds.c                     |   40 +++++++++++++-------
 app/pdb/floating-sel-cmds.c             |    3 +-
 app/pdb/gimppdb-utils.c                 |   49 ++++++++++++-------------
 app/pdb/gimppdb-utils.h                 |   11 +++---
 app/pdb/image-cmds.c                    |   33 ++++++++++-------
 app/pdb/image-select-cmds.c             |    6 ++--
 app/pdb/item-transform-cmds.c           |   27 +++++++++-----
 app/pdb/layer-cmds.c                    |   25 +++++++++----
 app/pdb/paint-tools-cmds.c              |   51 +++++++++++++++++---------
 app/pdb/paths-cmds.c                    |    3 +-
 app/pdb/pdb-types.h                     |    6 +++
 app/pdb/plug-in-compat-cmds.c           |   27 +++++++++-----
 app/pdb/selection-cmds.c                |    9 +++--
 app/pdb/text-layer-cmds.c               |   60 +++++++++++++++---------------
 app/pdb/text-tool-cmds.c                |    6 ++-
 app/pdb/transform-tools-cmds.c          |   18 ++++++---
 app/pdb/vectors-cmds.c                  |   46 +++++++++++++++---------
 tools/pdbgen/pdb/color.pdb              |   47 ++++++++++++++++--------
 tools/pdbgen/pdb/drawable.pdb           |   18 ++++++----
 tools/pdbgen/pdb/drawable_transform.pdb |   18 ++++++---
 tools/pdbgen/pdb/edit.pdb               |   40 +++++++++++++-------
 tools/pdbgen/pdb/floating_sel.pdb       |    3 +-
 tools/pdbgen/pdb/image.pdb              |   33 ++++++++++-------
 tools/pdbgen/pdb/image_select.pdb       |    6 ++--
 tools/pdbgen/pdb/item_transform.pdb     |   12 ++++--
 tools/pdbgen/pdb/layer.pdb              |   25 +++++++++----
 tools/pdbgen/pdb/paint_tools.pdb        |   54 ++++++++++++++++++---------
 tools/pdbgen/pdb/paths.pdb              |    3 +-
 tools/pdbgen/pdb/plug_in_compat.pdb     |   27 +++++++++-----
 tools/pdbgen/pdb/selection.pdb          |    9 +++--
 tools/pdbgen/pdb/text_layer.pdb         |   60 +++++++++++++++---------------
 tools/pdbgen/pdb/text_tool.pdb          |    6 ++-
 tools/pdbgen/pdb/transform_tools.pdb    |   18 ++++++---
 tools/pdbgen/pdb/vectors.pdb            |   46 +++++++++++++++---------
 37 files changed, 596 insertions(+), 362 deletions(-)
---
diff --git a/app/pdb/color-cmds.c b/app/pdb/color-cmds.c
index 3806688..d920881 100644
--- a/app/pdb/color-cmds.c
+++ b/app/pdb/color-cmds.c
@@ -71,7 +71,8 @@ brightness_contrast_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GObject *config = g_object_new (GIMP_TYPE_BRIGHTNESS_CONTRAST_CONFIG,
@@ -120,7 +121,8 @@ levels_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
           (gimp_drawable_has_alpha (drawable) || channel != GIMP_HISTOGRAM_ALPHA) &&
           (! gimp_drawable_is_gray (drawable) ||
@@ -167,7 +169,8 @@ levels_auto_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           gimp_drawable_levels_stretch (drawable, progress);
@@ -195,7 +198,8 @@ levels_stretch_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           gimp_drawable_levels_stretch (drawable, progress);
@@ -225,7 +229,8 @@ posterize_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GObject *config = g_object_new (GIMP_TYPE_POSTERIZE_CONFIG,
@@ -261,7 +266,8 @@ desaturate_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
           gimp_drawable_is_rgb (drawable))
         {
@@ -300,7 +306,8 @@ desaturate_full_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
           gimp_drawable_is_rgb (drawable))
         {
@@ -339,7 +346,8 @@ equalize_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                       GIMP_PDB_ITEM_CONTENT, error) ||
           ! gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         success = FALSE;
 
@@ -366,7 +374,8 @@ invert_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           gimp_drawable_apply_operation_by_name (drawable, progress,
@@ -403,7 +412,8 @@ curves_spline_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
           ! (num_points & 1) &&
           (gimp_drawable_has_alpha (drawable) || channel != GIMP_HISTOGRAM_ALPHA) &&
@@ -449,7 +459,8 @@ curves_explicit_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
           (num_bytes == 256) &&
           (gimp_drawable_has_alpha (drawable) || channel != GIMP_HISTOGRAM_ALPHA) &&
@@ -499,7 +510,8 @@ color_balance_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error)  &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error)  &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GObject *config = g_object_new (GIMP_TYPE_COLORIZE_CONFIG,
@@ -548,7 +560,8 @@ colorize_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
           ! gimp_drawable_is_gray (drawable))
         {
@@ -600,7 +613,7 @@ histogram_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error) ||
+      if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error) ||
           gimp_drawable_is_indexed (drawable) ||
           (! gimp_drawable_has_alpha (drawable) &&
            channel == GIMP_HISTOGRAM_ALPHA) ||
@@ -668,7 +681,8 @@ hue_saturation_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GObject *config = g_object_new (GIMP_TYPE_HUE_SATURATION_CONFIG,
@@ -714,7 +728,8 @@ threshold_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GObject *config = g_object_new (GIMP_TYPE_THRESHOLD_CONFIG,
diff --git a/app/pdb/drawable-cmds.c b/app/pdb/drawable-cmds.c
index 7bf67c3..6532113 100644
--- a/app/pdb/drawable-cmds.c
+++ b/app/pdb/drawable-cmds.c
@@ -433,7 +433,7 @@ drawable_mask_bounds_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error))
         non_empty = gimp_item_mask_bounds (GIMP_ITEM (drawable), &x1, &y1, &x2, &y2);
       else
         success = FALSE;
@@ -475,7 +475,7 @@ drawable_mask_intersect_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error))
         non_empty = gimp_item_mask_intersect (GIMP_ITEM (drawable),
                                               &x, &y, &width, &height);
       else
@@ -514,7 +514,8 @@ drawable_merge_shadow_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           const gchar *undo_desc = _("Plug-In");
@@ -672,7 +673,8 @@ drawable_set_pixel_invoker (GimpProcedure         *procedure,
           format = gimp_babl_compat_u8_format (format);
         }
 
-      if (gimp_pdb_item_is_writable (GIMP_ITEM (drawable), error) &&
+      if (gimp_pdb_item_is_modifyable (GIMP_ITEM (drawable),
+                                       GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
           x_coord < gimp_item_get_width  (GIMP_ITEM (drawable)) &&
           y_coord < gimp_item_get_height (GIMP_ITEM (drawable)) &&
@@ -707,7 +709,8 @@ drawable_fill_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_writable (GIMP_ITEM (drawable), error) &&
+      if (gimp_pdb_item_is_modifyable (GIMP_ITEM (drawable),
+                                       GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         gimp_drawable_fill_by_type (drawable, context, (GimpFillType) fill_type);
       else
@@ -741,7 +744,8 @@ drawable_offset_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         gimp_drawable_offset (drawable, context, wrap_around, fill_type,
                               offset_x, offset_y);
@@ -933,7 +937,7 @@ drawable_foreground_extract_invoker (GimpProcedure         *procedure,
   if (success)
     {
     /*
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error))
         gimp_drawable_foreground_extract (drawable, mode, mask, progress);
       else
         success = FALSE;
diff --git a/app/pdb/drawable-transform-cmds.c b/app/pdb/drawable-transform-cmds.c
index fc19b3f..0e66e9a 100644
--- a/app/pdb/drawable-transform-cmds.c
+++ b/app/pdb/drawable-transform-cmds.c
@@ -73,7 +73,8 @@ drawable_transform_flip_simple_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                           GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -141,7 +142,8 @@ drawable_transform_flip_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -225,7 +227,8 @@ drawable_transform_flip_default_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -325,7 +328,8 @@ drawable_transform_perspective_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -419,7 +423,8 @@ drawable_transform_perspective_default_invoker (GimpProcedure         *procedure
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -507,7 +512,8 @@ drawable_transform_rotate_simple_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                           GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -580,7 +586,8 @@ drawable_transform_rotate_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -668,7 +675,8 @@ drawable_transform_rotate_default_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -764,7 +772,8 @@ drawable_transform_scale_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) && x0 < x1 && y0 < y1);
+      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                          GIMP_PDB_ITEM_CONTENT, error) && x0 < x1 && y0 < y1);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -849,7 +858,8 @@ drawable_transform_scale_default_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) && x0 < x1 && y0 < y1);
+      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                          GIMP_PDB_ITEM_CONTENT, error) && x0 < x1 && y0 < y1);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -938,7 +948,8 @@ drawable_transform_shear_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -1019,7 +1030,8 @@ drawable_transform_shear_default_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -1118,7 +1130,8 @@ drawable_transform_2d_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -1210,7 +1223,8 @@ drawable_transform_2d_default_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -1314,7 +1328,8 @@ drawable_transform_matrix_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -1414,7 +1429,8 @@ drawable_transform_matrix_default_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
diff --git a/app/pdb/edit-cmds.c b/app/pdb/edit-cmds.c
index 3000c10..5f85633 100644
--- a/app/pdb/edit-cmds.c
+++ b/app/pdb/edit-cmds.c
@@ -68,7 +68,8 @@ edit_cut_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -114,7 +115,7 @@ edit_copy_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error))
         {
           GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
           GError    *my_error = NULL;
@@ -201,7 +202,8 @@ edit_paste_invoker (GimpProcedure         *procedure,
   if (success)
     {
       if (gimp->global_buffer &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           floating_sel = gimp_edit_paste (gimp_item_get_image (GIMP_ITEM (drawable)),
@@ -276,7 +278,8 @@ edit_named_cut_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -329,7 +332,7 @@ edit_named_copy_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error))
         {
           GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
           GError    *my_error = NULL;
@@ -432,7 +435,8 @@ edit_named_paste_invoker (GimpProcedure         *procedure,
       GimpBuffer *buffer = gimp_pdb_get_buffer (gimp, buffer_name, error);
 
       if (buffer &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           floating_sel = gimp_edit_paste (gimp_item_get_image (GIMP_ITEM (drawable)),
@@ -508,7 +512,8 @@ edit_clear_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -540,7 +545,8 @@ edit_fill_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -586,7 +592,8 @@ edit_bucket_fill_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -665,7 +672,8 @@ edit_bucket_fill_full_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -756,7 +764,8 @@ edit_blend_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                            GIMP_PDB_ITEM_CONTENT, error) &&
                  gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error));
 
       if (success && supersample)
@@ -809,7 +818,8 @@ edit_stroke_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GimpImage         *image   = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -850,10 +860,12 @@ edit_stroke_vectors_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
           gimp_pdb_item_is_attached (GIMP_ITEM (vectors),
-                                     gimp_item_get_image (GIMP_ITEM (drawable)), FALSE, error))
+                                     gimp_item_get_image (GIMP_ITEM (drawable)),
+                                     0, error))
         {
           GimpStrokeOptions *options = gimp_stroke_options_new (gimp, context, TRUE);
 
diff --git a/app/pdb/floating-sel-cmds.c b/app/pdb/floating-sel-cmds.c
index 536fb75..2ef2895 100644
--- a/app/pdb/floating-sel-cmds.c
+++ b/app/pdb/floating-sel-cmds.c
@@ -159,7 +159,8 @@ floating_sel_attach_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         floating_sel_attach (layer, drawable);
       else
diff --git a/app/pdb/gimppdb-utils.c b/app/pdb/gimppdb-utils.c
index eb36f30..f803b82 100644
--- a/app/pdb/gimppdb-utils.c
+++ b/app/pdb/gimppdb-utils.c
@@ -338,10 +338,10 @@ gimp_pdb_get_paint_info (Gimp         *gimp,
 }
 
 gboolean
-gimp_pdb_item_is_attached (GimpItem  *item,
-                           GimpImage *image,
-                           gboolean   writable,
-                           GError   **error)
+gimp_pdb_item_is_attached (GimpItem           *item,
+                           GimpImage          *image,
+                           GimpPDBItemModify   modify,
+                           GError            **error)
 {
   g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
   g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), FALSE);
@@ -367,23 +367,20 @@ gimp_pdb_item_is_attached (GimpItem  *item,
       return FALSE;
     }
 
-  if (writable)
-    return gimp_pdb_item_is_writable (item, error);
-
-  return TRUE;
+  return gimp_pdb_item_is_modifyable (item, modify, error);
 }
 
 gboolean
-gimp_pdb_item_is_in_tree (GimpItem   *item,
-                          GimpImage  *image,
-                          gboolean    writable,
-                          GError    **error)
+gimp_pdb_item_is_in_tree (GimpItem           *item,
+                          GimpImage          *image,
+                          GimpPDBItemModify   modify,
+                          GError            **error)
 {
   g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
   g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), FALSE);
   g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
-  if (! gimp_pdb_item_is_attached (item, image, writable, error))
+  if (! gimp_pdb_item_is_attached (item, image, modify, error))
     return FALSE;
 
   if (! gimp_item_get_tree (item))
@@ -484,13 +481,14 @@ gimp_pdb_item_is_floating (GimpItem  *item,
 }
 
 gboolean
-gimp_pdb_item_is_writable (GimpItem  *item,
-                           GError   **error)
+gimp_pdb_item_is_modifyable (GimpItem           *item,
+                             GimpPDBItemModify   modify,
+                             GError            **error)
 {
   g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
   g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
-  if (gimp_item_is_content_locked (item))
+  if ((modify & GIMP_PDB_ITEM_CONTENT) && gimp_item_is_content_locked (item))
     {
       g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
                    _("Item '%s' (%d) cannot be modified because its "
@@ -544,9 +542,9 @@ gimp_pdb_item_is_not_group (GimpItem  *item,
 }
 
 gboolean
-gimp_pdb_layer_is_text_layer (GimpLayer  *layer,
-                              gboolean    writable,
-                              GError    **error)
+gimp_pdb_layer_is_text_layer (GimpLayer          *layer,
+                              GimpPDBItemModify   modify,
+                              GError            **error)
 {
   g_return_val_if_fail (GIMP_IS_LAYER (layer), FALSE);
   g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
@@ -562,7 +560,7 @@ gimp_pdb_layer_is_text_layer (GimpLayer  *layer,
       return FALSE;
     }
 
-  return gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, writable, error);
+  return gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, modify, error);
 }
 
 static const gchar *
@@ -670,10 +668,10 @@ gimp_pdb_image_is_not_precision (GimpImage      *image,
 }
 
 GimpStroke *
-gimp_pdb_get_vectors_stroke (GimpVectors  *vectors,
-                             gint          stroke_ID,
-                             gboolean      writable,
-                             GError      **error)
+gimp_pdb_get_vectors_stroke (GimpVectors        *vectors,
+                             gint                stroke_ID,
+                             GimpPDBItemModify   modify,
+                             GError            **error)
 {
   GimpStroke *stroke = NULL;
 
@@ -683,7 +681,8 @@ gimp_pdb_get_vectors_stroke (GimpVectors  *vectors,
   if (! gimp_pdb_item_is_not_group (GIMP_ITEM (vectors), error))
     return NULL;
 
-  if (! writable || gimp_pdb_item_is_writable (GIMP_ITEM (vectors), error))
+  if (! modify || gimp_pdb_item_is_modifyable (GIMP_ITEM (vectors),
+                                               modify, error))
     {
       stroke = gimp_vectors_stroke_get_by_ID (vectors, stroke_ID);
 
diff --git a/app/pdb/gimppdb-utils.h b/app/pdb/gimppdb-utils.h
index 426a634..9168b85 100644
--- a/app/pdb/gimppdb-utils.h
+++ b/app/pdb/gimppdb-utils.h
@@ -54,11 +54,11 @@ GimpPaintInfo * gimp_pdb_get_paint_info         (Gimp               *gimp,
 
 gboolean        gimp_pdb_item_is_attached       (GimpItem           *item,
                                                  GimpImage          *image,
-                                                 gboolean            writable,
+                                                 GimpPDBItemModify   modify,
                                                  GError            **error);
 gboolean        gimp_pdb_item_is_in_tree        (GimpItem           *item,
                                                  GimpImage          *image,
-                                                 gboolean            writable,
+                                                 GimpPDBItemModify   modify,
                                                  GError            **error);
 gboolean        gimp_pdb_item_is_in_same_tree   (GimpItem           *item,
                                                  GimpItem           *item2,
@@ -70,7 +70,8 @@ gboolean        gimp_pdb_item_is_not_ancestor   (GimpItem           *item,
 gboolean        gimp_pdb_item_is_floating       (GimpItem           *item,
                                                  GimpImage          *dest_image,
                                                  GError            **error);
-gboolean        gimp_pdb_item_is_writable       (GimpItem           *item,
+gboolean        gimp_pdb_item_is_modifyable     (GimpItem           *item,
+                                                 GimpPDBItemModify   modify,
                                                  GError            **error);
 gboolean        gimp_pdb_item_is_group          (GimpItem           *item,
                                                  GError            **error);
@@ -78,7 +79,7 @@ gboolean        gimp_pdb_item_is_not_group      (GimpItem           *item,
                                                  GError            **error);
 
 gboolean        gimp_pdb_layer_is_text_layer    (GimpLayer          *layer,
-                                                 gboolean            writable,
+                                                 GimpPDBItemModify   modify,
                                                  GError            **error);
 
 gboolean        gimp_pdb_image_is_base_type     (GimpImage          *image,
@@ -97,7 +98,7 @@ gboolean        gimp_pdb_image_is_not_precision (GimpImage          *image,
 
 GimpStroke    * gimp_pdb_get_vectors_stroke     (GimpVectors        *vectors,
                                                  gint                stroke_ID,
-                                                 gboolean            writable,
+                                                 GimpPDBItemModify   modify,
                                                  GError            **error);
 
 
diff --git a/app/pdb/image-cmds.c b/app/pdb/image-cmds.c
index f81a82c..b305a46 100644
--- a/app/pdb/image-cmds.c
+++ b/app/pdb/image-cmds.c
@@ -1040,7 +1040,7 @@ image_insert_layer_invoker (GimpProcedure         *procedure,
                                        gimp_drawable_get_base_type (GIMP_DRAWABLE (layer)),
                                        error) &&
           (parent == NULL ||
-           (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, FALSE, error) &&
+           (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) &&
             gimp_pdb_item_is_group (GIMP_ITEM (parent), error))))
         {
           if (position == -1 && parent == NULL)
@@ -1076,7 +1076,7 @@ image_remove_layer_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), image, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), image, 0, error))
         gimp_image_remove_layer (image, layer, TRUE, NULL);
       else
         success = FALSE;
@@ -1143,7 +1143,7 @@ image_insert_channel_invoker (GimpProcedure         *procedure,
     {
       if (gimp_pdb_item_is_floating (GIMP_ITEM (channel), image, error) &&
           (parent == NULL ||
-           (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, FALSE, error) &&
+           (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) &&
             gimp_pdb_item_is_group (GIMP_ITEM (parent), error))))
         {
           if (position == -1 && parent == NULL)
@@ -1179,7 +1179,7 @@ image_remove_channel_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), image, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), image, 0, error))
         gimp_image_remove_channel (image, channel, TRUE, NULL);
       else
         success = FALSE;
@@ -1246,7 +1246,7 @@ image_insert_vectors_invoker (GimpProcedure         *procedure,
     {
       if (gimp_pdb_item_is_floating (GIMP_ITEM (vectors), image, error) &&
           (parent == NULL ||
-           (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, FALSE, error) &&
+           (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) &&
             gimp_pdb_item_is_group (GIMP_ITEM (parent), error))))
         {
           if (position == -1 && parent == NULL)
@@ -1282,7 +1282,7 @@ image_remove_vectors_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), image, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), image, 0, error))
         gimp_image_remove_vectors (image, vectors, TRUE, NULL);
       else
         success = FALSE;
@@ -1311,7 +1311,7 @@ image_get_item_position_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
+      if (gimp_pdb_item_is_in_tree (item, image, 0, error))
         position = gimp_item_get_index (item);
       else
         success = FALSE;
@@ -1343,7 +1343,7 @@ image_raise_item_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
+      if (gimp_pdb_item_is_in_tree (item, image, 0, error))
         success = gimp_image_raise_item (image, item, error);
       else
         success = FALSE;
@@ -1370,7 +1370,7 @@ image_lower_item_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
+      if (gimp_pdb_item_is_in_tree (item, image, 0, error))
         success = gimp_image_lower_item (image, item, error);
       else
         success = FALSE;
@@ -1397,7 +1397,7 @@ image_raise_item_to_top_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
+      if (gimp_pdb_item_is_in_tree (item, image, 0, error))
         success = gimp_image_raise_item_to_top (image, item);
       else
         success = FALSE;
@@ -1424,7 +1424,7 @@ image_lower_item_to_bottom_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
+      if (gimp_pdb_item_is_in_tree (item, image, 0, error))
         success = gimp_image_lower_item_to_bottom (image, item);
       else
         success = FALSE;
@@ -1455,7 +1455,7 @@ image_reorder_item_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_in_tree (item, image, FALSE, error) &&
+      if (gimp_pdb_item_is_in_tree (item, image, 0, error) &&
           (parent == NULL ||
            (gimp_pdb_item_is_in_same_tree (item, parent, image, error) &&
             gimp_pdb_item_is_group (parent, error) &&
@@ -1560,7 +1560,7 @@ image_merge_down_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (merge_layer), image, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (merge_layer), image, 0, error))
         {
           layer = gimp_image_merge_down (image, merge_layer, context, merge_type,
                                          error);
@@ -1630,7 +1630,12 @@ image_remove_layer_mask_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), image, mode == GIMP_MASK_APPLY, error) &&
+      GimpPDBItemModify modify = 0;
+
+      if (mode == GIMP_MASK_APPLY)
+        modify |= GIMP_PDB_ITEM_CONTENT;
+
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), image, modify, error) &&
           gimp_layer_get_mask (layer))
         gimp_layer_apply_mask (layer, mode, TRUE);
       else
diff --git a/app/pdb/image-select-cmds.c b/app/pdb/image-select-cmds.c
index 3bb4eb1..e91744c 100644
--- a/app/pdb/image-select-cmds.c
+++ b/app/pdb/image-select-cmds.c
@@ -71,7 +71,7 @@ image_select_color_invoker (GimpProcedure         *procedure,
       GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
 
       if (pdb_context->sample_merged ||
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, FALSE, error))
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, 0, error))
         {
           gimp_channel_select_by_color (gimp_image_get_mask (image), drawable,
                                         pdb_context->sample_merged,
@@ -119,7 +119,7 @@ image_select_contiguous_color_invoker (GimpProcedure         *procedure,
       GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
 
       if (pdb_context->sample_merged ||
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, FALSE, error))
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, 0, error))
         {
 
           gimp_channel_select_fuzzy (gimp_image_get_mask (image),
@@ -332,7 +332,7 @@ image_select_item_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (item, image, FALSE, error))
+      if (gimp_pdb_item_is_attached (item, image, 0, error))
         {
           GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
 
diff --git a/app/pdb/item-transform-cmds.c b/app/pdb/item-transform-cmds.c
index 4a47983..98c43d9 100644
--- a/app/pdb/item-transform-cmds.c
+++ b/app/pdb/item-transform-cmds.c
@@ -71,7 +71,8 @@ item_transform_flip_simple_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (item, NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (item, NULL,
+                                           GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (item, &x, &y, &width, &height))
@@ -145,7 +146,8 @@ item_transform_flip_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (item, NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (item, NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (item, &x, &y, &width, &height))
@@ -242,7 +244,8 @@ item_transform_perspective_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (item, NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (item, NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (item, &x, &y, &width, &height))
@@ -334,7 +337,8 @@ item_transform_rotate_simple_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (item, NULL, FALSE, error);
+      success = gimp_pdb_item_is_attached (item, NULL,
+                                           GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (item, &x, &y, &width, &height))
@@ -411,7 +415,8 @@ item_transform_rotate_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (item, NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (item, NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (item, &x, &y, &width, &height))
@@ -505,7 +510,8 @@ item_transform_scale_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = (gimp_pdb_item_is_attached (item, NULL, TRUE, error) && x0 < x1 && y0 < y1);
+      success = (gimp_pdb_item_is_attached (item, NULL,
+                                                          GIMP_PDB_ITEM_CONTENT, error) && x0 < x1 && y0 < y1);
 
       if (success &&
           gimp_item_mask_intersect (item, &x, &y, &width, &height))
@@ -592,7 +598,8 @@ item_transform_shear_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (item, NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (item, NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (item, &x, &y, &width, &height))
@@ -689,7 +696,8 @@ item_transform_2d_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (item, NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (item, NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (item, &x, &y, &width, &height))
@@ -791,7 +799,8 @@ item_transform_matrix_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (item, NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (item, NULL,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (item, &x, &y, &width, &height))
diff --git a/app/pdb/layer-cmds.c b/app/pdb/layer-cmds.c
index d6185a9..adeec46 100644
--- a/app/pdb/layer-cmds.c
+++ b/app/pdb/layer-cmds.c
@@ -316,7 +316,8 @@ layer_add_alpha_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_writable (GIMP_ITEM (layer), error) &&
+      if (gimp_pdb_item_is_modifyable (GIMP_ITEM (layer),
+                                       GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error))
         gimp_layer_add_alpha (layer);
       else
@@ -342,7 +343,8 @@ layer_flatten_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_writable (GIMP_ITEM (layer), error) &&
+      if (gimp_pdb_item_is_modifyable (GIMP_ITEM (layer),
+                                       GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error))
         gimp_layer_flatten (layer, context);
       else
@@ -374,7 +376,8 @@ layer_scale_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, TRUE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error))
         {
           GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
 
@@ -421,7 +424,8 @@ layer_scale_full_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, TRUE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error))
         {
           if (progress)
             gimp_progress_start (progress, _("Scaling"), FALSE);
@@ -466,7 +470,8 @@ layer_resize_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, TRUE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error))
         gimp_item_resize (GIMP_ITEM (layer), context,
                           new_width, new_height, offx, offy);
       else
@@ -492,7 +497,8 @@ layer_resize_to_image_size_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, TRUE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error))
         gimp_layer_resize_to_image (layer, context);
       else
         success = FALSE;
@@ -732,7 +738,12 @@ layer_remove_mask_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, mode == GIMP_MASK_APPLY, error) &&
+      GimpPDBItemModify modify = 0;
+
+      if (mode == GIMP_MASK_APPLY)
+        modify |= GIMP_PDB_ITEM_CONTENT;
+
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, modify, error) &&
           gimp_layer_get_mask (layer))
         gimp_layer_apply_mask (layer, mode, TRUE);
       else
diff --git a/app/pdb/paint-tools-cmds.c b/app/pdb/paint-tools-cmds.c
index d1c7821..77299b3 100644
--- a/app/pdb/paint-tools-cmds.c
+++ b/app/pdb/paint-tools-cmds.c
@@ -138,7 +138,8 @@ airbrush_invoker (GimpProcedure         *procedure,
                                             "gimp-airbrush");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -184,7 +185,8 @@ airbrush_default_invoker (GimpProcedure         *procedure,
                                             "gimp-airbrush");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -234,7 +236,8 @@ clone_invoker (GimpProcedure         *procedure,
                                             "gimp-clone");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -283,7 +286,8 @@ clone_default_invoker (GimpProcedure         *procedure,
                                             "gimp-clone");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -329,7 +333,8 @@ convolve_invoker (GimpProcedure         *procedure,
                                             "gimp-convolve");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -376,7 +381,8 @@ convolve_default_invoker (GimpProcedure         *procedure,
                                             "gimp-convolve");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -424,7 +430,8 @@ dodgeburn_invoker (GimpProcedure         *procedure,
                                             "gimp-dodge-burn");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -472,7 +479,8 @@ dodgeburn_default_invoker (GimpProcedure         *procedure,
                                             "gimp-dodge-burn");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -518,7 +526,8 @@ eraser_invoker (GimpProcedure         *procedure,
                                             "gimp-eraser");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -565,7 +574,8 @@ eraser_default_invoker (GimpProcedure         *procedure,
                                             "gimp-eraser");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -613,7 +623,8 @@ heal_invoker (GimpProcedure         *procedure,
                                             "gimp-heal");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -658,7 +669,8 @@ heal_default_invoker (GimpProcedure         *procedure,
                                             "gimp-heal");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -706,7 +718,8 @@ paintbrush_invoker (GimpProcedure         *procedure,
                                             "gimp-paintbrush");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GimpDynamics *pdb_dynamics  = GIMP_DYNAMICS (gimp_dynamics_new (context, "pdb"));
@@ -784,7 +797,8 @@ paintbrush_default_invoker (GimpProcedure         *procedure,
                                             "gimp-paintbrush");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -826,7 +840,8 @@ pencil_invoker (GimpProcedure         *procedure,
                                             "gimp-pencil");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -870,7 +885,8 @@ smudge_invoker (GimpProcedure         *procedure,
                                             "gimp-smudge");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -916,7 +932,8 @@ smudge_default_invoker (GimpProcedure         *procedure,
                                             "gimp-smudge");
 
       if (options &&
-          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+          gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           options = gimp_config_duplicate (GIMP_CONFIG (options));
diff --git a/app/pdb/paths-cmds.c b/app/pdb/paths-cmds.c
index afbf70a..32e1fd6 100644
--- a/app/pdb/paths-cmds.c
+++ b/app/pdb/paths-cmds.c
@@ -334,7 +334,8 @@ path_stroke_current_invoker (GimpProcedure         *procedure,
       GimpDrawable *drawable = gimp_image_get_active_drawable (image);
 
       if (vectors && drawable &&
-          gimp_pdb_item_is_writable (GIMP_ITEM (drawable), error) &&
+          gimp_pdb_item_is_modifyable (GIMP_ITEM (drawable),
+                                       GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GimpStrokeOptions *options = gimp_stroke_options_new (gimp, context, TRUE);
diff --git a/app/pdb/pdb-types.h b/app/pdb/pdb-types.h
index 9905d23..e8d1271 100644
--- a/app/pdb/pdb-types.h
+++ b/app/pdb/pdb-types.h
@@ -36,4 +36,10 @@ typedef enum
 } GimpPDBCompatMode;
 
 
+typedef enum
+{
+  GIMP_PDB_ITEM_CONTENT = 1 << 0
+} GimpPDBItemModify;
+
+
 #endif /* __PDB_TYPES_H__ */
diff --git a/app/pdb/plug-in-compat-cmds.c b/app/pdb/plug-in-compat-cmds.c
index a766a4f..fef1f60 100644
--- a/app/pdb/plug-in-compat-cmds.c
+++ b/app/pdb/plug-in-compat-cmds.c
@@ -68,7 +68,8 @@ plug_in_autocrop_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error))
         {
           gint x1, y1, x2, y2;
 
@@ -119,7 +120,8 @@ plug_in_autocrop_layer_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error))
         {
           GimpLayer *layer = gimp_image_get_active_layer (image);
           gint       x1, y1, x2, y2;
@@ -165,7 +167,8 @@ plug_in_colortoalpha_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           /* XXX: fixme disable for gray, and add alpha when needed */
@@ -209,7 +212,8 @@ plug_in_pixelize_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GeglNode *node =
@@ -252,7 +256,8 @@ plug_in_pixelize2_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GeglNode *node =
@@ -301,7 +306,8 @@ plug_in_polar_coords_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GeglNode *node =
@@ -343,7 +349,8 @@ plug_in_semiflatten_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
           gimp_drawable_has_alpha (drawable))
         {
@@ -389,7 +396,8 @@ plug_in_threshold_alpha_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
           gimp_drawable_has_alpha (drawable))
         {
@@ -428,7 +436,8 @@ plug_in_vinvert_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GeglNode *node =
diff --git a/app/pdb/selection-cmds.c b/app/pdb/selection-cmds.c
index 52c7e23..2d95734 100644
--- a/app/pdb/selection-cmds.c
+++ b/app/pdb/selection-cmds.c
@@ -200,7 +200,8 @@ selection_float_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                     GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
         {
           GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -428,7 +429,7 @@ selection_layer_alpha_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, 0, error))
         gimp_item_to_selection (GIMP_ITEM (layer),
                                 GIMP_CHANNEL_OP_REPLACE,
                                 TRUE, FALSE, 0.0, 0.0);
@@ -455,7 +456,7 @@ selection_load_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), NULL, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), NULL, 0, error))
         gimp_item_to_selection (GIMP_ITEM (channel),
                                 GIMP_CHANNEL_OP_REPLACE,
                                 TRUE, FALSE, 0.0, 0.0);
@@ -516,7 +517,7 @@ selection_combine_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), NULL, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), NULL, 0, error))
         gimp_item_to_selection (GIMP_ITEM (channel),
                                 operation,
                                 TRUE, FALSE, 0.0, 0.0);
diff --git a/app/pdb/text-layer-cmds.c b/app/pdb/text-layer-cmds.c
index 54ee498..08f24d3 100644
--- a/app/pdb/text-layer-cmds.c
+++ b/app/pdb/text-layer-cmds.c
@@ -124,7 +124,7 @@ text_layer_get_text_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "text", &text,
@@ -162,7 +162,7 @@ text_layer_set_text_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -196,7 +196,7 @@ text_layer_get_markup_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "markup", &markup,
@@ -234,7 +234,7 @@ text_layer_get_font_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "font", &font,
@@ -272,7 +272,7 @@ text_layer_set_font_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -307,7 +307,7 @@ text_layer_get_font_size_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "font-size",      &font_size,
@@ -351,7 +351,7 @@ text_layer_set_font_size_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -386,7 +386,7 @@ text_layer_get_antialias_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "antialias", &antialias,
@@ -424,7 +424,7 @@ text_layer_set_antialias_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -458,7 +458,7 @@ text_layer_get_hint_style_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "hint-style", &style,
@@ -496,7 +496,7 @@ text_layer_set_hint_style_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -530,7 +530,7 @@ text_layer_get_kerning_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "kerning", &kerning,
@@ -568,7 +568,7 @@ text_layer_set_kerning_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -602,7 +602,7 @@ text_layer_get_language_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "language", &language,
@@ -640,7 +640,7 @@ text_layer_set_language_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -674,7 +674,7 @@ text_layer_get_base_direction_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "base-direction", &direction,
@@ -712,7 +712,7 @@ text_layer_set_base_direction_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -746,7 +746,7 @@ text_layer_get_justification_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "justify", &justify,
@@ -784,7 +784,7 @@ text_layer_set_justification_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -818,7 +818,7 @@ text_layer_get_color_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           color = gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer))->color;
         }
@@ -854,7 +854,7 @@ text_layer_set_color_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -888,7 +888,7 @@ text_layer_get_indent_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "indent", &indent,
@@ -926,7 +926,7 @@ text_layer_set_indent_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -960,7 +960,7 @@ text_layer_get_line_spacing_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "line-spacing", &line_spacing,
@@ -998,7 +998,7 @@ text_layer_set_line_spacing_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -1032,7 +1032,7 @@ text_layer_get_letter_spacing_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "letter-spacing", &letter_spacing,
@@ -1070,7 +1070,7 @@ text_layer_set_letter_spacing_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
@@ -1106,7 +1106,7 @@ text_layer_resize_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           GimpText *text = gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer));
           gdouble   xres, yres;
@@ -1153,7 +1153,7 @@ text_layer_get_hinting_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, 0, error))
         {
           g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                         "hinting", &hinting,
@@ -1194,7 +1194,7 @@ text_layer_set_hinting_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+      if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
         {
           gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                                _("Set text layer attribute"),
diff --git a/app/pdb/text-tool-cmds.c b/app/pdb/text-tool-cmds.c
index b8e66af..8b130e2 100644
--- a/app/pdb/text-tool-cmds.c
+++ b/app/pdb/text-tool-cmds.c
@@ -75,7 +75,8 @@ text_fontname_invoker (GimpProcedure         *procedure,
   if (success)
     {
       if (drawable &&
-          (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, TRUE, error) ||
+          (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image,
+                                        GIMP_PDB_ITEM_CONTENT, error) ||
            ! gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error)))
         success = FALSE;
 
@@ -181,7 +182,8 @@ text_invoker (GimpProcedure         *procedure,
   if (success)
     {
       if (drawable &&
-          (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, TRUE, error) ||
+          (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image,
+                                        GIMP_PDB_ITEM_CONTENT, error) ||
            ! gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error)))
         success = FALSE;
 
diff --git a/app/pdb/transform-tools-cmds.c b/app/pdb/transform-tools-cmds.c
index cb95c51..806f203 100644
--- a/app/pdb/transform-tools-cmds.c
+++ b/app/pdb/transform-tools-cmds.c
@@ -67,7 +67,8 @@ flip_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                           GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -139,7 +140,8 @@ perspective_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                           GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -222,7 +224,8 @@ rotate_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                           GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -310,7 +313,8 @@ scale_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                            GIMP_PDB_ITEM_CONTENT, error) &&
                  x0 < x1 && y0 < y1);
 
       if (success &&
@@ -395,7 +399,8 @@ shear_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                           GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -489,7 +494,8 @@ transform_2d_invoker (GimpProcedure         *procedure,
     {
       gint x, y, width, height;
 
-      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+      success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                           GIMP_PDB_ITEM_CONTENT, error);
 
       if (success &&
           gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
diff --git a/app/pdb/vectors-cmds.c b/app/pdb/vectors-cmds.c
index 51a5cf6..3a0dd01 100644
--- a/app/pdb/vectors-cmds.c
+++ b/app/pdb/vectors-cmds.c
@@ -229,7 +229,7 @@ vectors_stroke_get_length_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, FALSE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, 0, error);
 
       if (stroke)
         length = gimp_stroke_get_length (stroke, precision);
@@ -272,7 +272,7 @@ vectors_stroke_get_point_at_dist_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, FALSE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, 0, error);
 
       if (stroke)
         {
@@ -318,7 +318,8 @@ vectors_remove_stroke_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (stroke)
         {
@@ -354,7 +355,8 @@ vectors_stroke_close_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (stroke)
         {
@@ -394,7 +396,8 @@ vectors_stroke_translate_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (stroke)
         {
@@ -434,7 +437,8 @@ vectors_stroke_scale_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (stroke)
         {
@@ -476,7 +480,8 @@ vectors_stroke_rotate_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (stroke)
         {
@@ -516,7 +521,8 @@ vectors_stroke_flip_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (stroke)
         {
@@ -560,7 +566,8 @@ vectors_stroke_flip_free_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (stroke)
         {
@@ -601,7 +608,7 @@ vectors_stroke_get_points_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, FALSE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, 0, error);
 
       if (GIMP_IS_BEZIER_STROKE (stroke))
         {
@@ -742,7 +749,7 @@ vectors_stroke_interpolate_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, FALSE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, 0, error);
 
       if (stroke)
         {
@@ -805,7 +812,8 @@ vectors_bezier_stroke_new_moveto_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_writable (GIMP_ITEM (vectors), error) &&
+      if (gimp_pdb_item_is_modifyable (GIMP_ITEM (vectors),
+                                       GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (vectors), error))
         {
           GimpStroke *stroke;
@@ -860,7 +868,8 @@ vectors_bezier_stroke_lineto_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (stroke)
         {
@@ -909,7 +918,8 @@ vectors_bezier_stroke_conicto_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (stroke)
         {
@@ -966,7 +976,8 @@ vectors_bezier_stroke_cubicto_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+      GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                        GIMP_PDB_ITEM_CONTENT, error);
 
       if (stroke)
         {
@@ -1025,7 +1036,8 @@ vectors_bezier_stroke_new_ellipse_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_writable (GIMP_ITEM (vectors), error) &&
+      if (gimp_pdb_item_is_modifyable (GIMP_ITEM (vectors),
+                                       GIMP_PDB_ITEM_CONTENT, error) &&
           gimp_pdb_item_is_not_group (GIMP_ITEM (vectors), error))
         {
           GimpStroke *stroke;
@@ -1084,7 +1096,7 @@ vectors_to_selection_invoker (GimpProcedure         *procedure,
 
   if (success)
     {
-      if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), NULL, FALSE, error))
+      if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), NULL, 0, error))
         gimp_item_to_selection (GIMP_ITEM (vectors),
                                 operation,
                                 antialias,
diff --git a/tools/pdbgen/pdb/color.pdb b/tools/pdbgen/pdb/color.pdb
index b6fe419..737eba3 100644
--- a/tools/pdbgen/pdb/color.pdb
+++ b/tools/pdbgen/pdb/color.pdb
@@ -41,7 +41,8 @@ HELP
         headers => [ qw("operations/gimpbrightnesscontrastconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GObject *config = g_object_new (GIMP_TYPE_BRIGHTNESS_CONTRAST_CONFIG,
@@ -101,7 +102,8 @@ HELP
 	headers => [ qw("operations/gimplevelsconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
       (gimp_drawable_has_alpha (drawable) || channel != GIMP_HISTOGRAM_ALPHA) &&
       (! gimp_drawable_is_gray (drawable) ||
@@ -153,7 +155,8 @@ HELP
         headers => [ qw("core/gimpdrawable-levels.h") ],
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       gimp_drawable_levels_stretch (drawable, progress);
@@ -177,7 +180,8 @@ sub levels_auto {
         headers => [ qw("core/gimpdrawable-levels.h") ],
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       gimp_drawable_levels_stretch (drawable, progress);
@@ -211,7 +215,8 @@ HELP
         headers => [ qw("operations/gimpposterizeconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GObject *config = g_object_new (GIMP_TYPE_POSTERIZE_CONFIG,
@@ -250,7 +255,8 @@ HELP
 	headers => [ qw("operations/gimpdesaturateconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
       gimp_drawable_is_rgb (drawable))
     {
@@ -297,7 +303,8 @@ HELP
 	headers => [ qw("operations/gimpdesaturateconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
       gimp_drawable_is_rgb (drawable))
     {
@@ -344,7 +351,8 @@ HELP
 	headers => [ qw("core/gimpdrawable-equalize.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                   GIMP_PDB_ITEM_CONTENT, error) ||
       ! gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     success = FALSE;
 
@@ -374,7 +382,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       gimp_drawable_apply_operation_by_name (drawable, progress,
@@ -420,7 +429,8 @@ HELP
 	headers => [ qw("operations/gimpcurvesconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
       ! (num_points & 1) &&
       (gimp_drawable_has_alpha (drawable) || channel != GIMP_HISTOGRAM_ALPHA) &&
@@ -474,7 +484,8 @@ HELP
 	headers => [ qw("operations/gimpcurvesconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
       (num_bytes == 256) &&
       (gimp_drawable_has_alpha (drawable) || channel != GIMP_HISTOGRAM_ALPHA) &&
@@ -533,7 +544,8 @@ HELP
 	headers => [ qw("operations/gimpcolorbalanceconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error)  &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error)  &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GObject *config = g_object_new (GIMP_TYPE_COLORIZE_CONFIG,
@@ -585,7 +597,8 @@ HELP
 	headers => [ qw("operations/gimpcolorizeconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
       ! gimp_drawable_is_gray (drawable))
     {
@@ -660,7 +673,7 @@ HELP
                         "core/gimphistogram.h") ],
 	code => <<'CODE'
 {
-  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error) ||
+  if (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error) ||
       gimp_drawable_is_indexed (drawable) ||
       (! gimp_drawable_has_alpha (drawable) &&
        channel == GIMP_HISTOGRAM_ALPHA) ||
@@ -723,7 +736,8 @@ HELP
 	headers => [ qw("operations/gimphuesaturationconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GObject *config = g_object_new (GIMP_TYPE_HUE_SATURATION_CONFIG,
@@ -774,7 +788,8 @@ HELP
 	headers => [ qw("operations/gimpthresholdconfig.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GObject *config = g_object_new (GIMP_TYPE_THRESHOLD_CONFIG,
diff --git a/tools/pdbgen/pdb/drawable.pdb b/tools/pdbgen/pdb/drawable.pdb
index 0efaba9..774f803 100644
--- a/tools/pdbgen/pdb/drawable.pdb
+++ b/tools/pdbgen/pdb/drawable.pdb
@@ -41,7 +41,8 @@ HELP
                         "plug-in/gimppluginmanager.h") ],
 	code    => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       const gchar *undo_desc = _("Plug-In");
@@ -120,7 +121,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_writable (GIMP_ITEM (drawable), error) &&
+  if (gimp_pdb_item_is_modifyable (GIMP_ITEM (drawable),
+                                   GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     gimp_drawable_fill_by_type (drawable, context, (GimpFillType) fill_type);
   else
@@ -207,7 +209,7 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error))
     non_empty = gimp_item_mask_bounds (GIMP_ITEM (drawable), &x1, &y1, &x2, &y2);
   else
     success = FALSE;
@@ -254,7 +256,7 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error))
     non_empty = gimp_item_mask_intersect (GIMP_ITEM (drawable),
                                           &x, &y, &width, &height);
   else
@@ -679,7 +681,8 @@ HELP
       format = gimp_babl_compat_u8_format (format);
     }
 
-  if (gimp_pdb_item_is_writable (GIMP_ITEM (drawable), error) &&
+  if (gimp_pdb_item_is_modifyable (GIMP_ITEM (drawable),
+                                   GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
       x_coord < gimp_item_get_width  (GIMP_ITEM (drawable)) &&
       y_coord < gimp_item_get_height (GIMP_ITEM (drawable)) &&
@@ -910,7 +913,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     gimp_drawable_offset (drawable, context, wrap_around, fill_type,
                           offset_x, offset_y);
@@ -947,7 +951,7 @@ HELP
         code    => <<'CODE'
 {
 /*
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error))
     gimp_drawable_foreground_extract (drawable, mode, mask, progress);
   else
     success = FALSE;
diff --git a/tools/pdbgen/pdb/drawable_transform.pdb b/tools/pdbgen/pdb/drawable_transform.pdb
index e642ff1..7cbf357 100644
--- a/tools/pdbgen/pdb/drawable_transform.pdb
+++ b/tools/pdbgen/pdb/drawable_transform.pdb
@@ -24,10 +24,12 @@
 
 sub transform_invoke {
     my ($progress_text, $assemble_matrix, $check) = @_;
-    my $success_check = 'gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);';
+    my $success_check = 'gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                    GIMP_PDB_ITEM_CONTENT, error);';
 
     if ($check) {
-        $success_check = "(gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) && " . $check . ");";
+        $success_check = "(gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                      GIMP_PDB_ITEM_CONTENT, error) && " . $check . ");";
     }
 
     %invoke = (
@@ -83,10 +85,12 @@ CODE
 
 sub transform_default_invoke {
     my ($progress_text, $assemble_matrix, $check) = @_;
-    my $success_check = 'gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);';
+    my $success_check = 'gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                    GIMP_PDB_ITEM_CONTENT, error);';
 
     if ($check) {
-        $success_check = "(gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) && " . $check . ");";
+        $success_check = "(gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                                      GIMP_PDB_ITEM_CONTENT, error) && " . $check . ");";
     }
 
     %invoke = (
@@ -175,7 +179,8 @@ sub drawable_transform_flip_simple {
 {
   gint x, y, width, height;
 
-  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                       GIMP_PDB_ITEM_CONTENT, error);
 
   if (success &&
       gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -417,7 +422,8 @@ sub drawable_transform_rotate_simple {
 {
   gint x, y, width, height;
 
-  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error);
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                       GIMP_PDB_ITEM_CONTENT, error);
 
   if (success &&
       gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
diff --git a/tools/pdbgen/pdb/edit.pdb b/tools/pdbgen/pdb/edit.pdb
index a29a049..9f6a0f1 100644
--- a/tools/pdbgen/pdb/edit.pdb
+++ b/tools/pdbgen/pdb/edit.pdb
@@ -46,7 +46,8 @@ HELP
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -99,7 +100,7 @@ HELP
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error))
     {
       GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
       GError    *my_error = NULL;
@@ -201,7 +202,8 @@ HELP
 	code => <<CODE
 {
   if (gimp->global_buffer &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       floating_sel = gimp_edit_paste (gimp_item_get_image (GIMP_ITEM (drawable)),
@@ -279,7 +281,8 @@ HELP
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -333,7 +336,7 @@ HELP
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, 0, error))
     {
       GimpImage *image    = gimp_item_get_image (GIMP_ITEM (drawable));
       GError    *my_error = NULL;
@@ -439,7 +442,8 @@ HELP
   GimpBuffer *buffer = gimp_pdb_get_buffer (gimp, buffer_name, error);
 
   if (buffer &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       floating_sel = gimp_edit_paste (gimp_item_get_image (GIMP_ITEM (drawable)),
@@ -515,7 +519,8 @@ HELP
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -556,7 +561,8 @@ HELP
     %invoke = (
 	code => <<CODE
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -626,7 +632,8 @@ HELP
 	                 "core/gimpchannel.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -733,7 +740,8 @@ HELP
 	                 "core/gimpchannel.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -833,7 +841,8 @@ HELP
         headers => [ qw("core/gimpdrawable-blend.h") ],
 	code => <<'CODE'
 {
-  success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                        GIMP_PDB_ITEM_CONTENT, error) &&
              gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error));
 
   if (success && supersample)
@@ -890,7 +899,8 @@ HELP
 	headers => [ qw("core/gimpstrokeoptions.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GimpImage         *image   = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -934,10 +944,12 @@ HELP
 	headers => [ qw("core/gimpstrokeoptions.h") ],
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
       gimp_pdb_item_is_attached (GIMP_ITEM (vectors),
-                                 gimp_item_get_image (GIMP_ITEM (drawable)), FALSE, error))
+                                 gimp_item_get_image (GIMP_ITEM (drawable)),
+                                 0, error))
     {
       GimpStrokeOptions *options = gimp_stroke_options_new (gimp, context, TRUE);
 
diff --git a/tools/pdbgen/pdb/floating_sel.pdb b/tools/pdbgen/pdb/floating_sel.pdb
index 3296795..926bfad 100644
--- a/tools/pdbgen/pdb/floating_sel.pdb
+++ b/tools/pdbgen/pdb/floating_sel.pdb
@@ -153,7 +153,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     floating_sel_attach (layer, drawable);
   else
diff --git a/tools/pdbgen/pdb/image.pdb b/tools/pdbgen/pdb/image.pdb
index 70ca996..93c6c07 100644
--- a/tools/pdbgen/pdb/image.pdb
+++ b/tools/pdbgen/pdb/image.pdb
@@ -791,7 +791,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
+  if (gimp_pdb_item_is_in_tree (item, image, 0, error))
     position = gimp_item_get_index (item);
   else
     success = FALSE;
@@ -820,7 +820,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
+  if (gimp_pdb_item_is_in_tree (item, image, 0, error))
     success = gimp_image_raise_item (image, item, error);
   else
     success = FALSE;
@@ -849,7 +849,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
+  if (gimp_pdb_item_is_in_tree (item, image, 0, error))
     success = gimp_image_lower_item (image, item, error);
   else
     success = FALSE;
@@ -880,7 +880,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
+  if (gimp_pdb_item_is_in_tree (item, image, 0, error))
     success = gimp_image_raise_item_to_top (image, item);
   else
     success = FALSE;
@@ -911,7 +911,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_in_tree (item, image, FALSE, error))
+  if (gimp_pdb_item_is_in_tree (item, image, 0, error))
     success = gimp_image_lower_item_to_bottom (image, item);
   else
     success = FALSE;
@@ -943,7 +943,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_in_tree (item, image, FALSE, error) &&
+  if (gimp_pdb_item_is_in_tree (item, image, 0, error) &&
       (parent == NULL ||
        (gimp_pdb_item_is_in_same_tree (item, parent, image, error) &&
         gimp_pdb_item_is_group (parent, error) &&
@@ -1034,7 +1034,7 @@ HELP
         headers => [ qw("core/gimpimage-merge.h") ],
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (merge_layer), image, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (merge_layer), image, 0, error))
     {
       layer = gimp_image_merge_down (image, merge_layer, context, merge_type,
                                      error);
@@ -1152,7 +1152,7 @@ HELP
                                    gimp_drawable_get_base_type (GIMP_DRAWABLE (layer)),
                                    error) &&
       (parent == NULL ||
-       (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, FALSE, error) &&
+       (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) &&
         gimp_pdb_item_is_group (GIMP_ITEM (parent), error))))
     {
       if (position == -1 && parent == NULL)
@@ -1191,7 +1191,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), image, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), image, 0, error))
     gimp_image_remove_layer (image, layer, TRUE, NULL);
   else
     success = FALSE;
@@ -1240,7 +1240,12 @@ sub image_remove_layer_mask {
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), image, mode == GIMP_MASK_APPLY, error) &&
+  GimpPDBItemModify modify = 0;
+
+  if (mode == GIMP_MASK_APPLY)
+    modify |= GIMP_PDB_ITEM_CONTENT;
+
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), image, modify, error) &&
       gimp_layer_get_mask (layer))
     gimp_layer_apply_mask (layer, mode, TRUE);
   else
@@ -1308,7 +1313,7 @@ HELP
 {
   if (gimp_pdb_item_is_floating (GIMP_ITEM (channel), image, error) &&
       (parent == NULL ||
-       (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, FALSE, error) &&
+       (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) &&
         gimp_pdb_item_is_group (GIMP_ITEM (parent), error))))
     {
       if (position == -1 && parent == NULL)
@@ -1345,7 +1350,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), image, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), image, 0, error))
     gimp_image_remove_channel (image, channel, TRUE, NULL);
   else
     success = FALSE;
@@ -1410,7 +1415,7 @@ HELP
 {
   if (gimp_pdb_item_is_floating (GIMP_ITEM (vectors), image, error) &&
       (parent == NULL ||
-       (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, FALSE, error) &&
+       (gimp_pdb_item_is_in_tree (GIMP_ITEM (parent), image, 0, error) &&
         gimp_pdb_item_is_group (GIMP_ITEM (parent), error))))
     {
       if (position == -1 && parent == NULL)
@@ -1447,7 +1452,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), image, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), image, 0, error))
     gimp_image_remove_vectors (image, vectors, TRUE, NULL);
   else
     success = FALSE;
diff --git a/tools/pdbgen/pdb/image_select.pdb b/tools/pdbgen/pdb/image_select.pdb
index ef69bf0..4c021ea 100644
--- a/tools/pdbgen/pdb/image_select.pdb
+++ b/tools/pdbgen/pdb/image_select.pdb
@@ -59,7 +59,7 @@ HELP
   GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
 
   if (pdb_context->sample_merged ||
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, FALSE, error))
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, 0, error))
     {
       gimp_channel_select_by_color (gimp_image_get_mask (image), drawable,
                                     pdb_context->sample_merged,
@@ -133,7 +133,7 @@ HELP
   GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
 
   if (pdb_context->sample_merged ||
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, FALSE, error))
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, 0, error))
     {
 
       gimp_channel_select_fuzzy (gimp_image_get_mask (image),
@@ -394,7 +394,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (item, image, FALSE, error))
+  if (gimp_pdb_item_is_attached (item, image, 0, error))
     {
       GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
 
diff --git a/tools/pdbgen/pdb/item_transform.pdb b/tools/pdbgen/pdb/item_transform.pdb
index 82ef63d..1b6dd7d 100644
--- a/tools/pdbgen/pdb/item_transform.pdb
+++ b/tools/pdbgen/pdb/item_transform.pdb
@@ -22,10 +22,12 @@
 
 sub transform_invoke {
     my ($progress_text, $assemble_matrix, $check) = @_;
-    my $success_check = 'gimp_pdb_item_is_attached (item, NULL, TRUE, error);';
+    my $success_check = 'gimp_pdb_item_is_attached (item, NULL,
+                                                    GIMP_PDB_ITEM_CONTENT, error);';
 
     if ($check) {
-        $success_check = "(gimp_pdb_item_is_attached (item, NULL, TRUE, error) && " . $check . ");";
+        $success_check = "(gimp_pdb_item_is_attached (item, NULL,
+                                                      GIMP_PDB_ITEM_CONTENT, error) && " . $check . ");";
     }
 
     %invoke = (
@@ -135,7 +137,8 @@ HELP
 {
   gint x, y, width, height;
 
-  success = gimp_pdb_item_is_attached (item, NULL, TRUE, error);
+  success = gimp_pdb_item_is_attached (item, NULL,
+                                       GIMP_PDB_ITEM_CONTENT, error);
 
   if (success &&
       gimp_item_mask_intersect (item, &x, &y, &width, &height))
@@ -342,7 +345,8 @@ HELP
 {
   gint x, y, width, height;
 
-  success = gimp_pdb_item_is_attached (item, NULL, FALSE, error);
+  success = gimp_pdb_item_is_attached (item, NULL,
+                                       GIMP_PDB_ITEM_CONTENT, error);
 
   if (success &&
       gimp_item_mask_intersect (item, &x, &y, &width, &height))
diff --git a/tools/pdbgen/pdb/layer.pdb b/tools/pdbgen/pdb/layer.pdb
index 6a3d5b1..df12ec4 100644
--- a/tools/pdbgen/pdb/layer.pdb
+++ b/tools/pdbgen/pdb/layer.pdb
@@ -389,7 +389,12 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, mode == GIMP_MASK_APPLY, error) &&
+  GimpPDBItemModify modify = 0;
+
+  if (mode == GIMP_MASK_APPLY)
+    modify |= GIMP_PDB_ITEM_CONTENT;
+
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, modify, error) &&
       gimp_layer_get_mask (layer))
     gimp_layer_apply_mask (layer, mode, TRUE);
   else
@@ -427,7 +432,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, TRUE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error))
     {
       GimpPDBContext *pdb_context = GIMP_PDB_CONTEXT (context);
 
@@ -470,7 +476,8 @@ sub layer_scale_full {
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, TRUE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error))
     {
       if (progress)
         gimp_progress_start (progress, _("Scaling"), FALSE);
@@ -521,7 +528,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, TRUE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error))
     gimp_item_resize (GIMP_ITEM (layer), context,
                       new_width, new_height, offx, offy);
   else
@@ -549,7 +557,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, TRUE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error))
     gimp_layer_resize_to_image (layer, context);
   else
     success = FALSE;
@@ -622,7 +631,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_writable (GIMP_ITEM (layer), error) &&
+  if (gimp_pdb_item_is_modifyable (GIMP_ITEM (layer),
+                                   GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error))
     gimp_layer_add_alpha (layer);
   else
@@ -654,7 +664,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_writable (GIMP_ITEM (layer), error) &&
+  if (gimp_pdb_item_is_modifyable (GIMP_ITEM (layer),
+                                   GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (layer), error))
     gimp_layer_flatten (layer, context);
   else
diff --git a/tools/pdbgen/pdb/paint_tools.pdb b/tools/pdbgen/pdb/paint_tools.pdb
index f82c140..d720529 100644
--- a/tools/pdbgen/pdb/paint_tools.pdb
+++ b/tools/pdbgen/pdb/paint_tools.pdb
@@ -57,7 +57,8 @@ HELP
                                         "gimp-airbrush");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -106,7 +107,8 @@ HELP
                                         "gimp-airbrush");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -166,7 +168,8 @@ HELP
                                         "gimp-clone");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -219,7 +222,8 @@ HELP
                                         "gimp-clone");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -264,7 +268,8 @@ HELP
                                         "gimp-convolve");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -311,7 +316,8 @@ HELP
                                         "gimp-convolve");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -359,7 +365,8 @@ HELP
                                         "gimp-eraser");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -407,7 +414,8 @@ HELP
                                         "gimp-eraser");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -460,7 +468,8 @@ HELP
                                         "gimp-eraser");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -518,7 +527,8 @@ HELP
                                         "gimp-heal");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -567,7 +577,8 @@ HELP
                                         "gimp-heal");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -623,7 +634,8 @@ HELP
                                         "gimp-paintbrush");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GimpDynamics *pdb_dynamics  = GIMP_DYNAMICS (gimp_dynamics_new (context, "pdb"));
@@ -712,7 +724,8 @@ HELP
                                         "gimp-paintbrush");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -756,7 +769,8 @@ HELP
                                         "gimp-pencil");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -799,7 +813,8 @@ HELP
                                         "gimp-smudge");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -848,7 +863,8 @@ HELP
                                         "gimp-smudge");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -896,7 +912,8 @@ HELP
                                         "gimp-dodge-burn");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
@@ -947,7 +964,8 @@ HELP
                                         "gimp-dodge-burn");
 
   if (options &&
-      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+      gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       options = gimp_config_duplicate (GIMP_CONFIG (options));
diff --git a/tools/pdbgen/pdb/paths.pdb b/tools/pdbgen/pdb/paths.pdb
index 6827eaf..a3a10be 100644
--- a/tools/pdbgen/pdb/paths.pdb
+++ b/tools/pdbgen/pdb/paths.pdb
@@ -267,7 +267,8 @@ sub path_stroke_current {
   GimpDrawable *drawable = gimp_image_get_active_drawable (image);
 
   if (vectors && drawable &&
-      gimp_pdb_item_is_writable (GIMP_ITEM (drawable), error) &&
+      gimp_pdb_item_is_modifyable (GIMP_ITEM (drawable),
+                                   GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GimpStrokeOptions *options = gimp_stroke_options_new (gimp, context, TRUE);
diff --git a/tools/pdbgen/pdb/plug_in_compat.pdb b/tools/pdbgen/pdb/plug_in_compat.pdb
index e3e23ed..f3505ec 100644
--- a/tools/pdbgen/pdb/plug_in_compat.pdb
+++ b/tools/pdbgen/pdb/plug_in_compat.pdb
@@ -38,7 +38,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error))
     {
       gint x1, y1, x2, y2;
 
@@ -93,7 +94,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error))
     {
       GimpLayer *layer = gimp_image_get_active_layer (image);
       gint       x1, y1, x2, y2;
@@ -146,7 +148,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       /* XXX: fixme disable for gray, and add alpha when needed */
@@ -197,7 +200,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GeglNode *node =
@@ -247,7 +251,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GeglNode *node =
@@ -303,7 +308,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GeglNode *node =
@@ -352,7 +358,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
       gimp_drawable_has_alpha (drawable))
     {
@@ -404,7 +411,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error) &&
       gimp_drawable_has_alpha (drawable))
     {
@@ -453,7 +461,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GeglNode *node =
diff --git a/tools/pdbgen/pdb/selection.pdb b/tools/pdbgen/pdb/selection.pdb
index 1acf588..fec062f 100644
--- a/tools/pdbgen/pdb/selection.pdb
+++ b/tools/pdbgen/pdb/selection.pdb
@@ -188,7 +188,8 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                 GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
     {
       GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
@@ -426,7 +427,7 @@ sub selection_layer_alpha {
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (layer), NULL, 0, error))
     gimp_item_to_selection (GIMP_ITEM (layer),
                             GIMP_CHANNEL_OP_REPLACE,
                             TRUE, FALSE, 0.0, 0.0);
@@ -448,7 +449,7 @@ sub selection_load {
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), NULL, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), NULL, 0, error))
     gimp_item_to_selection (GIMP_ITEM (channel),
                             GIMP_CHANNEL_OP_REPLACE,
                             TRUE, FALSE, 0.0, 0.0);
@@ -472,7 +473,7 @@ sub selection_combine {
     %invoke = (
 	code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), NULL, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (channel), NULL, 0, error))
     gimp_item_to_selection (GIMP_ITEM (channel),
                             operation,
                             TRUE, FALSE, 0.0, 0.0);
diff --git a/tools/pdbgen/pdb/text_layer.pdb b/tools/pdbgen/pdb/text_layer.pdb
index 9e0e7be..d0adf82 100644
--- a/tools/pdbgen/pdb/text_layer.pdb
+++ b/tools/pdbgen/pdb/text_layer.pdb
@@ -102,7 +102,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "text", &text,
@@ -136,7 +136,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -178,7 +178,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "markup", &markup,
@@ -215,7 +215,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "font", &font,
@@ -249,7 +249,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -291,7 +291,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "font-size",      &font_size,
@@ -329,7 +329,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -364,7 +364,7 @@ sub text_layer_get_hinting {
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "hinting", &hinting,
@@ -404,7 +404,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -442,7 +442,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "antialias", &antialias,
@@ -476,7 +476,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -516,7 +516,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "hint-style", &style,
@@ -552,7 +552,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -590,7 +590,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "kerning", &kerning,
@@ -624,7 +624,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -663,7 +663,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "language", &language,
@@ -698,7 +698,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -737,7 +737,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "base-direction", &direction,
@@ -772,7 +772,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -811,7 +811,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "justify", &justify,
@@ -846,7 +846,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -884,7 +884,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       color = gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer))->color;
     }
@@ -916,7 +916,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -954,7 +954,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "indent", &indent,
@@ -988,7 +988,7 @@ HELP
      %invoke = (
          code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -1026,7 +1026,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "line-spacing", &line_spacing,
@@ -1060,7 +1060,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -1099,7 +1099,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, FALSE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, 0, error))
     {
       g_object_get (gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer)),
                     "letter-spacing", &letter_spacing,
@@ -1134,7 +1134,7 @@ HELP
     %invoke = (    
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       gimp_text_layer_set (GIMP_TEXT_LAYER (layer),
                            _("Set text layer attribute"),
@@ -1173,7 +1173,7 @@ HELP
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_layer_is_text_layer (layer, TRUE, error))
+  if (gimp_pdb_layer_is_text_layer (layer, GIMP_PDB_ITEM_CONTENT, error))
     {
       GimpText *text = gimp_text_layer_get_text (GIMP_TEXT_LAYER (layer));
       gdouble   xres, yres;
diff --git a/tools/pdbgen/pdb/text_tool.pdb b/tools/pdbgen/pdb/text_tool.pdb
index c7f47ff..f30ac1c 100644
--- a/tools/pdbgen/pdb/text_tool.pdb
+++ b/tools/pdbgen/pdb/text_tool.pdb
@@ -73,7 +73,8 @@ HELP
         code => <<'CODE'
 {
   if (drawable &&
-      (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, TRUE, error) ||
+      (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image,
+                                    GIMP_PDB_ITEM_CONTENT, error) ||
        ! gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error)))
     success = FALSE;
 
@@ -195,7 +196,8 @@ sub text {
         code => <<'CODE'
 {
   if (drawable &&
-      (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image, TRUE, error) ||
+      (! gimp_pdb_item_is_attached (GIMP_ITEM (drawable), image,
+                                    GIMP_PDB_ITEM_CONTENT, error) ||
        ! gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error)))
     success = FALSE;
 
diff --git a/tools/pdbgen/pdb/transform_tools.pdb b/tools/pdbgen/pdb/transform_tools.pdb
index 6a48e3d..bea3e26 100644
--- a/tools/pdbgen/pdb/transform_tools.pdb
+++ b/tools/pdbgen/pdb/transform_tools.pdb
@@ -37,7 +37,8 @@ sub flip {
 {
   gint x, y, width, height;
 
-  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                       GIMP_PDB_ITEM_CONTENT, error);
 
   if (success &&
       gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -111,7 +112,8 @@ sub perspective {
 {
   gint x, y, width, height;
 
-  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                       GIMP_PDB_ITEM_CONTENT, error);
 
   if (success &&
       gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -188,7 +190,8 @@ sub rotate {
 {
   gint x, y, width, height;
 
-  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                       GIMP_PDB_ITEM_CONTENT, error);
 
   if (success &&
       gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -274,7 +277,8 @@ sub scale {
 {
   gint x, y, width, height;
 
-  success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error) &&
+  success = (gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                        GIMP_PDB_ITEM_CONTENT, error) &&
              x0 < x1 && y0 < y1);
 
   if (success &&
@@ -354,7 +358,8 @@ sub shear {
 {
   gint x, y, width, height;
 
-  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                       GIMP_PDB_ITEM_CONTENT, error);
 
   if (success &&
       gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
@@ -442,7 +447,8 @@ sub transform_2d {
 {
   gint x, y, width, height;
 
-  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL, TRUE, error);
+  success = gimp_pdb_item_is_attached (GIMP_ITEM (drawable), NULL,
+                                       GIMP_PDB_ITEM_CONTENT, error);
 
   if (success &&
       gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
diff --git a/tools/pdbgen/pdb/vectors.pdb b/tools/pdbgen/pdb/vectors.pdb
index f85a553..22087bd 100644
--- a/tools/pdbgen/pdb/vectors.pdb
+++ b/tools/pdbgen/pdb/vectors.pdb
@@ -191,7 +191,7 @@ sub vectors_stroke_get_length {
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, FALSE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, 0, error);
   
   if (stroke)
     length = gimp_stroke_get_length (stroke, precision);
@@ -240,7 +240,7 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, FALSE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, 0, error);
   
   if (stroke)
     {
@@ -277,7 +277,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                    GIMP_PDB_ITEM_CONTENT, error);
   
   if (stroke)
     {
@@ -314,7 +315,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                    GIMP_PDB_ITEM_CONTENT, error);
   
   if (stroke)
     {
@@ -356,7 +358,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                    GIMP_PDB_ITEM_CONTENT, error);
   
   if (stroke)
     {
@@ -397,7 +400,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                    GIMP_PDB_ITEM_CONTENT, error);
   
   if (stroke)
     {
@@ -439,7 +443,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                    GIMP_PDB_ITEM_CONTENT, error);
   
   if (stroke)
     {
@@ -480,7 +485,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                    GIMP_PDB_ITEM_CONTENT, error);
   
   if (stroke)
     {
@@ -526,7 +532,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                    GIMP_PDB_ITEM_CONTENT, error);
   
   if (stroke)
     {
@@ -576,7 +583,7 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, FALSE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, 0, error);
   
   if (GIMP_IS_BEZIER_STROKE (stroke))
     {
@@ -642,7 +649,7 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, FALSE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, 0, error);
   
   if (stroke)
     {
@@ -781,7 +788,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  if (gimp_pdb_item_is_writable (GIMP_ITEM (vectors), error) &&
+  if (gimp_pdb_item_is_modifyable (GIMP_ITEM (vectors),
+                                   GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (vectors), error))
     {
       GimpStroke *stroke;
@@ -832,7 +840,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                    GIMP_PDB_ITEM_CONTENT, error);
 
   if (stroke)
     {
@@ -884,7 +893,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                    GIMP_PDB_ITEM_CONTENT, error);
 
   if (stroke)
     {
@@ -942,7 +952,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id, TRUE, error);
+  GimpStroke *stroke = gimp_pdb_get_vectors_stroke (vectors, stroke_id,
+                                                    GIMP_PDB_ITEM_CONTENT, error);
 
   if (stroke)
     {
@@ -1006,7 +1017,8 @@ HELP
     %invoke = (
         code => <<"CODE"
 {
-  if (gimp_pdb_item_is_writable (GIMP_ITEM (vectors), error) &&
+  if (gimp_pdb_item_is_modifyable (GIMP_ITEM (vectors),
+                                   GIMP_PDB_ITEM_CONTENT, error) &&
       gimp_pdb_item_is_not_group (GIMP_ITEM (vectors), error))
     {
       GimpStroke *stroke;
@@ -1056,7 +1068,7 @@ sub vectors_to_selection {
     %invoke = (
         code => <<'CODE'
 {
-  if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), NULL, FALSE, error))
+  if (gimp_pdb_item_is_attached (GIMP_ITEM (vectors), NULL, 0, error))
     gimp_item_to_selection (GIMP_ITEM (vectors),
                             operation,
                             antialias,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]