def _setup(self): # Save context in case hook functions modify the context without reverting to its original state. pdb.gimp_context_push() self._image_copy = pgpdb.duplicate(self.image, metadata_only=True) pdb.gimp_image_undo_freeze(self._image_copy) self._on_after_create_image_copy_func(self._image_copy) if self._use_another_image_copy: self._another_image_copy = pgpdb.duplicate(self._image_copy, metadata_only=True) pdb.gimp_image_undo_freeze(self._another_image_copy) if pygimplib.config.DEBUG_IMAGE_PROCESSING: self._display_id = pdb.gimp_display_new(self._image_copy)
def _setup(self): # Save context just in case. No need for undo groups or undo freeze here. pdb.gimp_context_push() # Perform subsequent operations on a new image so that the original image # and its soon-to-be exported layers are left intact. self._image_copy = pgpdb.duplicate(self.image, metadata_only=True) if constants.DEBUG_IMAGE_PROCESSING: self._display_id = pdb.gimp_display_new(self._image_copy)
def _setup(self): # Save context just in case. No need for undo groups or undo freeze here. pdb.gimp_context_push() # Perform subsequent operations on a new image so that the original image # and its soon-to-be exported layers are left intact. self._image_copy = pgpdb.duplicate(self.image, remove_items=True) if constants.DEBUG_IMAGE_PROCESSING: self._display_id = pdb.gimp_display_new(self._image_copy)