filter.
#!/usr/bin/env python
from gimpfu import *
def test_lighting(inImage, inDrawable, doIt) :
newDrawable=inDrawable.copy()
inImage.add_layer (newDrawable, 0)
pdb.plug_in_lighting (
inImage, # Input image,
newDrawable, # Input drawable,
inDrawable, # Bumpmap drawable (set to 0 if disabled),
0, # Environmentmap drawable (set to 0 if disabled),
True, # Enable bumpmapping (TRUE/FALSE),
False, # Enable Environmentmapping (TRUE/FALSE),
0, # Type of mapping (0=linear,1=log, 2=sinusoidal, 3=spherical),
0, # Type of lightsource (0=point,1=directional,3=spot,4=none),
(255,255,255),# Lightsource color (R,G,B),
-1.0,-1.0,1.0,# Lightsource position (x), (y), (z),
-1.0,-1.0,1.0,# Lightsource direction (x), (y), (z),
0.2, # Material ambient intensity (0..1),
0.5, # Material diffuse intensity (0..1),
0.5, # Material diffuse reflectivity (0..1),
0.0, # Material specular reflectivity (0..1),
0.0, # Material highlight (0..>), (note: it's exponential)
True, # Apply antialiasing (TRUE/FALSE),
False, # Create a new image (TRUE/FALSE),
False # Make BG transparent (TRUE/FALSE),
)
return
register(
"test_lighting",
"test_lighting",
"test_lighting",
"DN",
"DN",
"2024",
"test_lighting...",
"RGB*",
[
(PF_IMAGE, "image", "Input image", None),
(PF_DRAWABLE, "drawable", "Input drawable", None),
(PF_TOGGLE, "test", "do test?", True),
],
[],
test_lighting,
menu="<Image>/Diego/Test"
)
main()
The error message says: wrong parameter type.
Thanks for any help.