On 4 Oct 2010 at 10:21:16 PDT saulgoode at flashingtwelve.brickfilms.com wrote:
> It is not a problem with the branch register command not being > processed, but that branch registration seems to require that > plug-in be associated with it (see > 'plugin_menu_branch_register_invoker()' in > app/pdb/plug-in-cmds.c). Apparently, when processed at the top > level of a Script-fu, there is no "current-active-plugin"; and > this leads to 'gimp_marshal_VOID__STRING_STRING_STRING' failing > because it is missing one of its parameters (the plug-in name). Don't have source code, so I'll pass on the c. But I get the idea. > > I did this: > > (define (wrf_register_menu_branch) > > (gimp-plugin-menu-branch-register > > "<Image>/File/Create/W_oodrat") > > "_Finger..." > > ) > > (script-fu-register "wrf_create_template_finger" > > (wrf_register_menu_branch) ; menu label > > .... > > which works. (script-fu-register when it runs has to call > > (wrf_register_menu_branch), which does the register thing. > A clever solution. However, I was unable to make it work with GIMP > 2.6.10+. What version of GIMP are you using? 2.6.10 win32 on XP. > > Anyway, my kludge seems to work. > > Thanks for pointer on how to do it. > I'm not sure how robust your kludge is. If it is not version > specific then it may be working for you (and not me) because of > something other going on than just the code you posted here > (multiple procedure registrations in the same file perhaps). > Could you provide a complete listing of your script? 2000 lines overall, 1200 lines of code. Perhaps a bit excessive to paste into a posting here. So for moment it's in woodrat.zip at https://docs.google.com/leaf?id=0B6M_pjcD- RRwNTZjODc0NzQtYjliMy00ZDBlLTgzZWItNDAyNDExMTA2YzU3&hl=en&authkey=CMGn 5i4 or http://bit.ly/btzFxD or http://www.freedrive.com/folder/282054 In version posted I invoke (wr_register_menu_branch) 3 times, with argument (the value to return each time). It also worked for me when I just invoked it once (on the first (script-fu-register)). Any comments or crits on code very welcome, e.g. if you happen to notice me doing anything wildly inefficient. To actually run the script you need the pattern file included in the zip. Yrs, Alan Never put anything smaller than your elbow into your ear. ===================== +++++ ===================== _______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user