Jump to content

RodD

Newbies
  • Posts

    6
  • Joined

  • Last visited

RodD's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. That's ok i can load them into PaintDotNet via a shellout script through Gimp.It turns the layer into an temp png, exports the file into PDN.I can then edit the one layer and send it back to Gimp. I am just kind of curious why it will not work on my Windows xp 32 bit platform.Oh well. Thanks for all your help though, -Rod
  2. My specs - Windows XP updated regularly. My PDN Version - Paint.NET v3.5.10 (Final Release build 3.510.4297.28964) More info- That still didn't fix the errors. Can't run debug, sorry. I did run the check for errors plug-in and found 5 corrupt dll files. (all deleted) Running the utilities>View Plugin Load Errors dialog - 2 wouldn't load due to the fact they probably needed to be updated. All those are gone now, but your filter still doesn't load XCF files for me. Here is the xcf file i am trying to load. Basically though i tried several just to be sure.None would load. I do have the pdn2xcf and xcf2pdn.exe files could those be causing your plug-in to fail? Thanks. SpaceButton_2012_RD.zip
  3. Sweet! But i get an "error cannot find file" dialog every time i go to load an existing XCF. Then when i go to save a XCF i create in PDN i get an "unspecified error while trying to save xcf file"
  4. I only posted this because i saw a post here somewhere about asking for a plug-in for something like this.
  5. I should add you need Python installed for this to work. Python 2.6. (Python 2.7 seems not to work) Here is a link to get the files you need for this http://www.gimpusers.com/tutorials/install-python-for-gimp-2-6-windows
  6. This file calls Paint Dot Net from Gimp.So you can then edit any part of the image you want and Gimp exports it back to Gimp as the top layer. Written by Rob A for XnView call for PS filters (8bf), and rewritten to call Paint Dot Net by me. More info here - http://www.gimpchat....c.php?f=9&t=970 #!/usr/bin/env python ''' Paint.NETShell.py Call Paint.Net to allow use of Paint.Nets filters. Windows Only. Author: Rob Antonishen - Rod D changed to call Paint Dot Net Version: 0.3 Fixed to work with filters that change alpha this script is modelled after the mm extern LabCurves trace plugin by Michael Munzert [url="http://www.mm-log.com/lab-curves-gimp"]http://www.mm-log.com/lab-curves-gimp[/url] License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The GNU Public License is available at [url="http://www.gnu.org/copyleft/gpl.html"]http://www.gnu.org/copyleft/gpl.html[/url] ''' from gimpfu import * import shlex import subprocess import os, sys import tempfile def plugin_main(image, drawable, visible): pdb.gimp_image_undo_group_start(image) # Copy so the save operations doesn't affect the original if visible == 0: # Save in temporary. Note: empty user entered file name temp = pdb.gimp_image_get_active_drawable(image) else: # Get the current visible temp = pdb.gimp_layer_new_from_visible(image, image, "Visible") image.add_layer(temp, 0) buffer = pdb.gimp_edit_named_copy(temp, "PaintDotNETShellTemp") #save selection if one exists hassel = pdb.gimp_selection_is_empty(image) == 0 if hassel: savedsel = pdb.gimp_selection_save(image) tempimage = pdb.gimp_edit_named_paste_as_new(buffer) pdb.gimp_buffer_delete(buffer) if not tempimage: raise RuntimeError pdb.gimp_image_undo_disable(tempimage) tempdrawable = pdb.gimp_image_get_active_layer(tempimage) # Use temp file names from gimp, it reflects the user's choices in gimp.rc # change as indicated if you always want to use the same temp file name tempfilename = pdb.gimp_temp_name("png") #tempfilename = os.path.join(tempfile.gettempdir(), "Inkscapetempfile.png") # !!! Note no run-mode first parameter, and user entered filename is empty string pdb.gimp_progress_set_text ("Saving a copy") pdb.file_png_save_defaults(tempimage, tempdrawable, tempfilename, tempfilename) # Command line - Change to match where you installed XnView command = "\"C:\\Program Files\\Paint.NET\\PaintDotNet.exe\" \"" + tempfilename + "\"" args = shlex.split(command) # Invoke external command pdb.gimp_progress_set_text ("run PaintDotNET...") pdb.gimp_progress_pulse() child = subprocess.Popen(args, shell=False) child.communicate() # put it as a new layer in the opened image try: newlayer2 = pdb.gimp_file_load_layer(tempimage, tempfilename) except: RuntimeError tempimage.add_layer(newlayer2,-1) buffer = pdb.gimp_edit_named_copy(newlayer2, "PaintDotNETShellTemp") if visible == 0: sel = pdb.gimp_edit_named_paste(drawable, buffer, 1) else: sel = pdb.gimp_edit_named_paste(temp, buffer, 1) pdb.gimp_buffer_delete(buffer) pdb.gimp_edit_clear(temp) pdb.gimp_floating_sel_anchor(sel) #load up old selection if hassel: pdb.gimp_selection_load(savedsel) image.remove_channel(savedsel) # cleanup os.remove(tempfilename) # delete the temporary file gimp.delete(tempimage) # delete the temporary image # Note the new image is dirty in Gimp and the user will be asked to save before closing. pdb.gimp_image_undo_group_end(image) gimp.displays_flush() register( "python_fu_paintdotnetshell", "Call PaintDotNET", "Call PaintDotNET", "Rob Antonishen", "Copyright 2011 Rob Antonishen", "2011", "<Image>/Filters/Call/PaintDotNET...", "RGB*, GRAY*", [ (PF_RADIO, "visible", "Layer:", 1, (("new from visible", 1),("current layer",0))) ], [], plugin_main, ) main() Open the code in your text editor - save it as Paint.NETShell.py - place it in your Plug-ins folder in the Gimp program directory or your user docs folder "Plug-ins" You will find the filter in Filters/Call/Paint Dot Net Simply open an image in Gimp or create one Go to Filters/Call/Paint Dot Net Run the filter You have a few options to choose in the pop up dialog - edit layer or new from layer Gimp will then open Paint dot Net and export the file to it Run your filters - click to close Paint dot Net - you will be asked to save the temp image - select yes Gimp will close paint dot net, and export the file back into Gimp as the top layer or edited layer. Enjoy If you need further explanation of the filter or editing of the script PM me. A small image to show results of the Gimp Python plug-in http://img684.imageshack.us/img684/9468/paintdotnetliquify.png
×
×
  • Create New...