Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Palette as input Script/Plug-in noob question
#1
In a .py file I have this register call


Code:
register(
    'python_fu_export_palette_to_html_tt',
    'Exports Palette to HTML table',
    'Exports Palette to HTML table',
    'Tin Tran',
    'Tin Tran',
    'July 2018',
    'HTML table...',
    '',
    [
    (PF_DIRNAME, "folder", "Foler for the output file:", 0),
    (PF_STRING, "name", "The name of the file to create:", "palette.html"),
    (PF_SPINNER, "per_row", "Colors per row:", 16, (1, 500, 1)),
    ],
    [],
    python_export_palette_to_html_tt,
    menu='<Palettes>/Export as',
)

It's in the right menu, but it's only prompting for 2 inputs (the name and the per_row) and passing 3 parameters to my function which i am expecting 4.
I want it to prompt for all 3 and passing the palette in as first parameter so that my function has 4 parameters.
How to do this so that it passes palette (that is selected) and the other 3 prompted?

Okay I think I figured it out.
I just had to declare another PF_STRING for palette before the other PF'ses and it does't prompt it just passes it in. So that works for me
Reply


Messages In This Thread
Palette as input Script/Plug-in noob question - by trandoductin - 07-27-2018, 05:04 PM

Forum Jump: