Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
color grading plugin
#20
This plugin isn't using the correct way to identify the Gimp directories. The Gimp user profile location can be obtained by gimp.directory (for all OSes and Gimp versions), so all three items in the orignal script (that are various locations for the profile across OSes and Gimp versions) can be replaced by single one:

Code:
candidate_dirs = [os.path.join(gimp.directory,'plug-ins')]

The plugins in the system installation can be found in gimp.plug_in_directory, so we can try either:

Code:
candidate_dirs = [os.path.join(gimp.plug_in_directory,'plug-ins'),os.path.join(gimp.directory,'plug-ins')]

and if you want to check for a plugin in a plugin directory, complement the list by adding a copy where you have added the plug-in directory:

Code:
candidate_dirs += [os.path.join(d,'color_grading_cw_v174') for d in candidate_dirs]

Btw, order is important, the script uses the last existing directory in the list of candidates.

The script seems also to do unholy things to find the color wheel if it runs on a portable version, but normally the above code should take care of that.

As always, remember this is Python and indentation is important.  Editing this code with an editor that tries the "help"(*) like Notepad can break the code.


(*) like a 6yo "helps" Mom & Dad in the kitchen.
Reply


Messages In This Thread
color grading plugin - by denzjos - 07-04-2021, 06:48 PM
RE: color grading plugin - by Ottia Tuota - 07-04-2021, 07:35 PM
RE: color grading plugin - by rich2005 - 07-04-2021, 07:52 PM
RE: color grading plugin - by denzjos - 07-04-2021, 08:15 PM
RE: color grading plugin - by rich2005 - 07-04-2021, 08:27 PM
RE: color grading plugin - by denzjos - 07-05-2021, 06:38 AM
RE: color grading plugin - by Ottia Tuota - 07-04-2021, 08:40 PM
RE: color grading plugin - by rich2005 - 07-05-2021, 07:30 AM
RE: color grading plugin - by Krikor - 07-05-2021, 06:46 PM
RE: color grading plugin - by rich2005 - 07-05-2021, 07:14 PM
RE: color grading plugin - by Krikor - 07-06-2021, 12:51 AM
RE: color grading plugin - by rich2005 - 07-06-2021, 07:49 AM
RE: color grading plugin - by meetdilip - 07-06-2021, 08:27 AM
RE: color grading plugin - by rich2005 - 07-06-2021, 09:00 AM
RE: color grading plugin - by meetdilip - 07-06-2021, 09:36 AM
RE: color grading plugin - by rich2005 - 07-06-2021, 09:55 AM
RE: color grading plugin - by meetdilip - 07-06-2021, 10:06 AM
RE: color grading plugin - by Krikor - 07-06-2021, 01:09 PM
RE: color grading plugin - by QGtKMlLz - 05-21-2023, 11:49 PM
RE: color grading plugin - by Ofnuts - 05-22-2023, 07:22 AM

Forum Jump: