Use 3D Transform in a python script

I would like to use Tools -> Transform Tools -> 3D Transform in a loop to create an animation with an image rotating around its vertical axis. How can I find out which function is associated with that menu item?

Regards,
Christina

No replies ?

As far as I know it is not possible to use 3D Transform in a script. It is a tool and does not register in either Plug-in Browser or Procedure Browser. Nor is it a GEGL function that might script using a utility plugin.

For a surface that is rotated there is Filters → Map → Map Object but it has a horrendous list of parameters.

Is this for generating an animation ?

I had a good look around and while there are scripts that rotate sequentially, none that apply perspective. One possibility is the gimp_gmic_qt plugin, the 3D image object filter. Not tried it into an animation but it is 0 - 90 deg and no back face (greater than 90 deg), that needs a separate render and a bit of hand editing.

EDIT: Not paying attention as usual.

Using gimp_gmic_qt plugin, 3D Image Object filter. By hand. It is 37 layers and once you know gmic not difficult Four sections - front 0 - 90 back 280 -360 back 10 - 90, front 280 - 360 for a complete rotation.

forward

If you want to make a python plugin, gmic registers in the pdb and a singlecommand looks like (you get that from “save to clipboard”
pdb.plug_in_gmic_qt (image, drawable, 1, 0, “fx_imageobject3d 0,603,521,0.9,0,y-angle,0,45,-100,-100,-100,0,0,2,1”)
…and put y-angle from a loop.

I think this has been done before, a good search for existing plugins came up with nothing, but my memory is poor these days.

Indeed, I’d like to create an animation. Thanks a lot for your input. Now I have a point where I can start from.