From 1666f82b20e7e5987b03f1bbf1e405d06c4b3952 Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Thu, 11 Jan 2024 03:20:04 +0000 Subject: [PATCH] scripts: Partially fix spinning-globe.scm During the API port, the Map Object plugin had some parameters added and others changed to GimpChoice strings. This broke the Spinning Globe filter which called on the map-object plugin. This patch updates the procedure call and fixes ranges in the map-object plugin so spinning-globe works again, but larger scope warnings persist. --- plug-ins/map-object/map-object-main.c | 6 ++-- plug-ins/script-fu/scripts/spinning-globe.scm | 36 ++++++++++--------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/plug-ins/map-object/map-object-main.c b/plug-ins/map-object/map-object-main.c index 7a4cb15023..1bfe34bcad 100644 --- a/plug-ins/map-object/map-object-main.c +++ b/plug-ins/map-object/map-object-main.c @@ -209,17 +209,17 @@ map_create_procedure (GimpPlugIn *plug_in, GIMP_PROC_ARG_DOUBLE (procedure, "rotation-angle-x", _("Angle X"), _("Rotation about X axis in degrees"), - -180, 180, 0.0, + -360, 360, 0.0, G_PARAM_READWRITE); GIMP_PROC_ARG_DOUBLE (procedure, "rotation-angle-y", _("Angle Y"), _("Rotation about Y axis in degrees"), - -180, 180, 0.0, + -360, 360, 0.0, G_PARAM_READWRITE); GIMP_PROC_ARG_DOUBLE (procedure, "rotation-angle-z", _("Angle Z"), _("Rotation about Z axis in degrees"), - -180, 180, 0.0, + -360, 360, 0.0, G_PARAM_READWRITE); GIMP_PROC_ARG_CHOICE (procedure, "light-type", diff --git a/plug-ins/script-fu/scripts/spinning-globe.scm b/plug-ins/script-fu/scripts/spinning-globe.scm index f431cf55f5..63d6165fb5 100644 --- a/plug-ins/script-fu/scripts/spinning-globe.scm +++ b/plug-ins/script-fu/scripts/spinning-globe.scm @@ -51,23 +51,27 @@ (plug-in-map-object RUN-NONINTERACTIVE theImage ; mapping image 1 (vector theFrame) ; mapping drawables - 1 ; viewpoint - 0.5 0.5 2.0 ; object pos - 0.5 0.5 0.0 ; first axis - 1.0 0.0 0.0 ; 2nd axis - 0.0 1.0 0.0 ; axis rotation - 0.0 (* n ang) 0.0 ; light (type, color) - 0 '(255 255 255) ; light position - -0.5 -0.5 2.0 ; light direction - -1.0 -1.0 1.0 ; material (amb, diff, refl, spec, high) - 0.3 1.0 0.5 0.0 27.0 ; antialias - TRUE ; tile + "map-sphere" ; sphere + 0.5 0.5 2.0 ; viewpoint + 0.5 0.5 0.0 ; object pos + 1.0 0.0 0.0 ; first axis + 0.0 1.0 0.0 ; 2nd axis + 0.0 (* n ang) 0.0 ; axis rotation + "point-light" ; light type + '(255 255 255) ; light color + -0.5 -0.5 2.0 ; light position + -1.0 -1.0 1.0 ; light direction + 0.3 1.0 0.5 0.0 27.0 ; material (amb, diff, refl, spec, high) + TRUE ; antialias + 3.0 ; depth + 0.25 ; threshold + FALSE ; tile FALSE ; new image - FALSE ; transparency - inTransparent ; radius - 0.25 ; unused parameters - 1.0 1.0 1.0 1.0 - -1 -1 -1 -1 -1 -1 -1 -1 + FALSE ; new layer + inTransparent ; transparency + 0.25 ; radius + 1.0 1.0 1.0 1.0 ; unused parameters + -1 -1 0.5 0.5 0.5 -1 -1 0.25 0.25 ) )