|
I'm hoping that someone can answer this question for me or tell me what mistake I'm making. I'm posting this to a few message boards so I will post any answers I get to all the boards.
I'm using GIMP 2.8.6 in Windows 7 (64 bit). I have a two layer image, one of which has ID=2. When I enter the following command in the Script-fu console:
(plug-in-lighting 1 1 2 0 0 FALSE FALSE 0 0 '(255, 255, 255) 57 0 10 0 0 0 0.5 0.5 0 0 0 TRUE FALSE FALSE)
I get the following error message :
Calling error for procedure 'gimp-drawable-bpp':
Procedure 'gimp-drawable-bpp' has been called with an invalid ID for argument 'drawable'. Most likely a plug-in is trying to work on a layer that doesn't exist any longer.
It's pretty clear that this is related to the 'drawable' argument. But if it's not looking for a item number (2 in this case. confirmed to be my main layer), what is it looking for? I ran this in the console right afterwards to confirm:
(gimp-item-get-name 2)
and got this response as expected:
("Main")
I also tried this command to confirm that item 2 is drawable and I got a 1 in response:
(gimp-item-is-drawable 2)
Here are the parameters so that it's easier to read:
run-mode 1 INT32 The run mode( RUN-INTERACTIVE (0), RUN-NONINTERACTIVE(1)) image 1 IMAGE input image drawable 2 DRAWABLE Input drawable bumpdrawable 0 DRAWABLE Sumpmap drawable (set to 0 if disabled) envdrawable 0 DRAWABLE Environmentmap drawable (set to 0 if disabled) dobumpmap FALSE INT32 Enable bumpmapping (TRUE/FALSE) doenvmap FALSE INT32 Enable envmapping (TRUE/FALSE) bumpmaptype 0 INT32 Type of mapping (0=linear,1=log, 2=sinusoidal, 3=spherical) lighttype 0 INT32 Type of lightsource (0=point,1=directional,3=spot,4=none) lightcolor (255, 255, 255) COLOR Lightsource color (r,g,b) lightposition-x 57 FLOAT Lightsource position (x,y,z) lightposition-y 0 FLOAT Lightsource position (x,y,z) lightposition-z 10 FLOAT Lightsource position (x,y,z) lightdirection-x 0 FLOAT Lightsource direction (x,y,z) lightdirection-y 0 FLOAT Lightsource direction (x,y,z) lightdirection-z 0 FLOAT Lightsource direction (x,y,z) ambient-intensity 0.5 FLOAT Material ambient intensity (0..1) diffuse-intensity 0.5 FLOAT Material diffuse intensity (0..1) diffuse-reflectivity 0 FLOAT Material diffuse reflectivity (0..1) specular-reflectivity 0 FLOAT Material specular reflectivity (0..1) highlight 0 FLOAT Material (0..-›), note: its expotential antialiasing TRUE INT32 Apply (TRUE/FALSE) newimage FALSE INT32 Create a new image (TRUE/FALSE) transparentbackground FALSE INT32 Make background transparent (TRUE/FALSE)
I'm not really wedded to the parameters I'm using here, they're just the first values I'm starting with to try to get the lighting effect that I want.
Once I get this command fixed, it's the final step in my project to script for icon creation for the DCikonZ app [link deleted cause the editor thinks this is spammy]. I would appreciate any help anyone can give me.
Thanks Peter
|