~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/src/buttons_script.c

  • Committer: Bazaar Package Importer
  • Author(s): Lukas Fittl
  • Date: 2006-09-20 01:57:27 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060920015727-gmoqlxwstx9wwqs3
Tags: 2.42a-1ubuntu1
* Merge from Debian unstable (Closes: Malone #55903). Remaining changes:
  - debian/genpot: Add python scripts from Lee June <blender@eyou.com> to
    generate a reasonable PO template from the sources. Since gettext is used
    in a highly nonstandard way, xgettext does not work for this job.
  - debian/rules: Call the scripts, generate po/blender.pot, and clean it up
    in the clean target.
  - Add a proper header to the generated PO template.
* debian/control: Build depend on libavformat-dev >= 3:0.cvs20060823-3.1,
  otherwise this package will FTBFS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: buttons_script.c,v 1.14 2005/10/28 16:49:47 ton Exp $ 
 
2
 * $Id: buttons_script.c,v 1.17 2006/05/14 08:49:10 campbellbarton Exp $ 
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
277
277
                        strcat(str, "OnLoad%x 2|");
278
278
                        strcat(str, "OnSave%x 8");
279
279
                }
280
 
 
 
280
                uiBlockBeginAlign(block);
281
281
                uiDefButS(block, MENU, 1, str, (short)sx, (short)sy, 140, 19, &script->flag[script->actscript-1], 0, 0, 0, 0, "Script links for this event");
282
282
 
283
283
                uiDefIDPoinBut(block, test_scriptpoin_but, ID_SCRIPT, 1, "", (short)(sx+140),(short)sy, 140, 19, &script->scripts[script->actscript-1], "Name of Script to link");
 
284
                uiBlockEndAlign(block);
284
285
        }
285
 
 
 
286
        
286
287
        sprintf(str,"%d Scr:", script->totscript);
 
288
        
287
289
        uiDefButS(block, NUM, REDRAWBUTSSCRIPT, str, (short)(sx+140), (short)sy-20,60,19, &script->actscript, 1, script->totscript, 0, 0, "Total / Active Script link (LeftMouse + Drag to change)");
288
290
 
289
291
        if (scene) {
 
292
                
290
293
                if (script->totscript<32767) 
291
294
                        uiDefBut(block, BUT, B_SSCRIPT_ADD, "New", (short)(sx+240), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Add a new Script link");
292
295
                if (script->totscript) 
293
296
                        uiDefBut(block, BUT, B_SSCRIPT_DEL, "Del", (short)(sx+200), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Delete the current Script link");
294
 
 
295
297
                uiDefBut(block, LABEL, 0, "Scene Script link",  sx,sy-20,140,20, 0, 0, 0, 0, 0, "");
296
 
 
297
 
        } 
 
298
        }
298
299
        else {
299
300
                if (script->totscript<32767) 
300
301
                        uiDefBut(block, BUT, B_SCRIPT_ADD, "New", (short)(sx+240), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Add a new Script link");
301
302
                if (script->totscript) 
302
303
                        uiDefBut(block, BUT, B_SCRIPT_DEL, "Del", (short)(sx+200), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Delete the current Script link");
303
 
 
304
304
                uiDefBut(block, LABEL, 0, "Selected Script link",       sx,sy-20,140,20, 0, 0, 0, 0, 0, "");
305
 
        }               
 
305
                
 
306
        }
 
307
        
306
308
}
307
309
 
308
310
/* ************************************* */
320
322
 
321
323
        uiDefButBitI(block, TOG, G_DOSCRIPTLINKS, REDRAWBUTSSCRIPT,
322
324
                        "Enable Script Links", xco, 200, 150, 20, &G.f, 0, 0, 0, 0,
323
 
                        "Enable execution of all assigned Script links");
 
325
                        "Enable execution of all assigned Script links amd Space Handelers");
324
326
        /* for proper alignment: */
325
327
        uiDefBut(block, LABEL, 0, "",   160, 200,150,20, NULL, 0.0, 0.0, 0, 0, "");
326
 
 
 
328
        
327
329
        if (G.f & G_DOSCRIPTLINKS) {
 
330
                //uiBlockBeginAlign(block);
328
331
                ob= OBACT;
329
332
                if(ob) 
330
333
                        uiDefIconButS(block, ROW, B_REDR, ICON_OBJECT, xco,175,25,20, &G.buts->scriptblock,  2.0, (float)ID_OB, 0, 0, "Displays Object script links");
340
343
 
341
344
                if(ob && ob->type==OB_LAMP)
342
345
                        uiDefIconButS(block, ROW, B_REDR, ICON_LAMP,    xco+=25,175,25,20, &G.buts->scriptblock, 2.0, (float)ID_LA, 0, 0, "Displays Lamp script links");
343
 
 
 
346
                //uiBlockEndAlign(block);
344
347
 
345
348
                if (ob && G.buts->scriptblock==ID_OB) {
346
349
                        script= &ob->scriptlink;