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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include <stdlib.h>
36
36
#include <string.h>
37
37
 
38
 
#ifdef HAVE_CONFIG_H
39
 
#include <config.h>
40
 
#endif
41
 
 
42
 
#ifdef WIN32
43
 
#include "BLI_winstuff.h"
44
 
#endif
45
 
 
46
38
#include "MEM_guardedalloc.h"
47
39
#include "DNA_screen_types.h"
48
40
#include "DNA_space_types.h"
64
56
 
65
57
#include "BIF_gl.h"
66
58
#include "BIF_graphics.h"
 
59
#include "BIF_glutil.h"
 
60
#include "BIF_interface.h"
67
61
#include "BIF_keyval.h"
68
62
#include "BIF_mainqueue.h"
 
63
#include "BIF_mywindow.h"
69
64
#include "BIF_resources.h"
 
65
#include "BIF_renderwin.h"
70
66
#include "BIF_screen.h"
71
 
#include "BIF_mywindow.h"
72
67
#include "BIF_space.h"
73
 
#include "BIF_glutil.h"
74
 
#include "BIF_interface.h"
75
68
#include "BIF_toolbox.h"
76
69
 
77
70
#include "BIF_butspace.h"
85
78
#include "DNA_image_types.h"
86
79
#include "BKE_writeavi.h"
87
80
#include "BKE_image.h"
88
 
#include "BIF_renderwin.h"
89
81
#include "BIF_writeimage.h"
90
82
#include "BIF_writeavicodec.h"
91
83
#include "BIF_editsound.h"
140
132
                }
141
133
        }
142
134
 
 
135
        BIF_undo_push("Load new audio file");
143
136
        allqueue(REDRAWBUTSSCENE, 0);
144
137
 
145
138
}
223
216
                        sound = tempsound;
224
217
                        id = &sound->id;
225
218
                        G.buts->lockpoin = (bSound*)id;
 
219
                        BIF_undo_push("Copy sound");
226
220
                        do_soundbuts(B_SOUND_REDRAW);
227
221
                }
228
222
                break;
283
277
 
284
278
        yco -= 30;
285
279
        uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Doppler: ",
286
 
        xco,yco,195,24,&G.listener->dopplervelocity, 0.0, 10.0, 1.0, 0, "Use this for scaling the doppler effect");
 
280
        xco,yco,195,24,&G.listener->dopplerfactor, 0.0, 10.0, 1.0, 0, "Use this for scaling the doppler effect");
 
281
        
 
282
        yco -=30;
 
283
        uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Velocity: ",
 
284
        xco,yco,195,24,&G.listener->dopplervelocity,0.0,10000.0, 1.0,0, "Sets the propagation speed of sound");
287
285
 
288
286
        
289
287
}
394
392
                uiDefBut(block, BUT, B_SOUND_PLAY_SAMPLE, "Play",       160, 95, 150, 24, 0, 0.0, 0, 0, 0, "Playback sample using settings below");
395
393
                
396
394
                uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Volume: ",
397
 
                        10,70,150,20, &sound->volume, 0.0, 1.0, 0, 0, "Set the volume of this sound");
 
395
                        10,70,150,20, &sound->volume, 0.0, 1.0, 0, 0, "Game engine only: Set the volume of this sound");
398
396
 
399
397
                uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Pitch: ",
400
 
                        160,70,150,20, &sound->pitch, -12.0, 12.0, 0, 0, "Set the pitch of this sound");
 
398
                        160,70,150,20, &sound->pitch, -12.0, 12.0, 0, 0, "Game engine only: Set the pitch of this sound");
401
399
 
402
400
                /* looping */
403
401
                uiDefButI(block, TOG|BIT|SOUND_FLAGS_LOOP_BIT, B_SOUND_REDRAW, "Loop",
404
 
                        10, 50, 95, 20, &sound->flags, 0.0, 0.0, 0, 0, "Toggle between looping on/off");
 
402
                        10, 50, 95, 20, &sound->flags, 0.0, 0.0, 0, 0, "Game engine only: Toggle between looping on/off");
405
403
 
406
404
                if (sound->flags & SOUND_FLAGS_LOOP) {
407
405
                        uiDefButI(block, TOG|BIT|SOUND_FLAGS_BIDIRECTIONAL_LOOP_BIT, B_SOUND_REDRAW, "Ping Pong",
408
 
                                105, 50, 95, 20, &sound->flags, 0.0, 0.0, 0, 0, "Toggle between A->B and A->B->A looping");
 
406
                                105, 50, 95, 20, &sound->flags, 0.0, 0.0, 0, 0, "Game engine only: Toggle between A->B and A->B->A looping");
409
407
                        
410
408
                }
411
409
        
414
412
 
415
413
                if (sound->sample->channels == 1) {
416
414
                        uiDefButI(block, TOG|BIT|SOUND_FLAGS_3D_BIT, B_SOUND_REDRAW, "3D Sound",
417
 
                                10, 10, 90, 20, &sound->flags, 0, 0, 0, 0, "Turns 3D sound on");
 
415
                                10, 10, 90, 20, &sound->flags, 0, 0, 0, 0, "Game engine only: Turns 3D sound on");
418
416
                        
419
417
                        if (sound->flags & SOUND_FLAGS_3D) {
420
418
                                uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Scale: ",
421
 
                                        100,10,210,20, &sound->attenuation, 0.0, 5.0, 1.0, 0, "Sets the surround scaling factor for this sound");
 
419
                                        100,10,210,20, &sound->attenuation, 0.0, 5.0, 1.0, 0, "Game engine only: Sets the surround scaling factor for this sound");
422
420
                                
423
421
                        }
424
422
                }
433
431
{
434
432
        strcpy(G.scene->r.pic, name);
435
433
        allqueue(REDRAWBUTSSCENE, 0);
 
434
        BIF_undo_push("Change output picture directory");
436
435
}
437
436
 
438
437
static void backbuf_pic(char *name)
447
446
                free_image_buffers(ima);        /* force read again */
448
447
                ima->ok= 1;
449
448
        }
 
449
        BIF_undo_push("Change background picture");
450
450
}
451
451
 
452
452
static void ftype_pic(char *name)
462
462
                
463
463
                allqueue(REDRAWBUTSSCENE, 0);
464
464
                allqueue(REDRAWVIEW3D, 0);
 
465
                BIF_undo_push("Change set Scene");
465
466
        }
466
467
}
467
468
 
470
471
        char str[FILE_MAXDIR+FILE_MAXFILE];
471
472
        int pos[2], size[2];
472
473
 
473
 
        calc_renderwin_rectangle(R.winpos, pos, size);
 
474
        calc_renderwin_rectangle(G.winpos, pos, size);
474
475
 
475
476
        sprintf(str, "%s -a -p %d %d \"%s\"", bprogname, pos[0], pos[1], file);
476
477
        system(str);
490
491
        case B_RTCHANGED:
491
492
                allqueue(REDRAWALL, 0);
492
493
                break;
 
494
        case B_SWITCHRENDER:
 
495
                /* new panels added, so... */
 
496
                G.buts->re_align= 1;
 
497
                allqueue(REDRAWBUTSSCENE, 0);
 
498
                break;
493
499
        case B_PLAYANIM:
494
500
#ifdef WITH_QUICKTIME
495
501
                if(G.scene->r.imtype == R_QUICKTIME)
551
557
                G.scene->r.xparts=  G.scene->r.yparts= 1;
552
558
                
553
559
                BLI_init_rctf(&G.scene->r.safety, 0.1, 0.9, 0.1, 0.9);
 
560
                BIF_undo_push("Set PAL");
554
561
                allqueue(REDRAWBUTSSCENE, 0);
555
562
                allqueue(REDRAWVIEWCAM, 0);
556
563
                break;
557
564
 
558
 
#ifdef WITH_QUICKTIME
559
565
        case B_FILETYPEMENU:
560
566
                allqueue(REDRAWBUTSSCENE, 0);
561
567
#if defined (_WIN32) || defined (__APPLE__)
568
574
                } else {
569
575
                  break;
570
576
                }
571
 
#else /* libquicktime */
572
 
                if(G.scene->r.imtype == R_QUICKTIME) {
573
 
                        /* i'm not sure if this should be here... */
574
 
                        /* set default quicktime codec */
575
 
                        if (!G.scene->r.qtcodecdata) {
576
 
                                G.scene->r.qtcodecdata = MEM_callocN(sizeof(QtCodecData),   "QtCodecData");
577
 
                                qtcodec_idx = 1;
578
 
                        }
579
 
                        
580
 
                        qt_init_codecs();
581
 
                        if (qtcodec_idx < 1) qtcodec_idx = 1;   
582
 
                        
583
 
                        G.scene->r.qtcodecdata->fourcc =  qtcodecidx_to_fcc(qtcodec_idx-1);
584
 
                        qt_init_codecdata(G.scene->r.qtcodecdata);
585
 
/* I'm not sure if this is really needed, so don't remove it yet */
586
 
#if 0
587
 
                        /* get index of codec that can handle a given fourcc */
588
 
                        if (qtcodec_idx < 1)
589
 
                                qtcodec_idx = get_qtcodec_idx(G.scene->r.qtcodecdata->fourcc)+1;
590
 
 
591
 
                        /* no suitable codec found, alert user */
592
 
                        if (qtcodec_idx < -1) {
593
 
                                error("no suitable codec found!");
594
 
                                qtcodec_idx = 1;
595
 
                        }
596
 
#endif /* 0 */
597
 
                }
598
577
#endif /*_WIN32 || __APPLE__ */
599
578
 
600
579
        case B_SELECTCODEC:
601
580
#if defined (_WIN32) || defined (__APPLE__)
602
581
                if ((G.scene->r.imtype == R_QUICKTIME)) { /* || (G.scene->r.qtcodecdata)) */
 
582
#ifdef WITH_QUICKTIME
603
583
                        get_qtcodec_settings();
 
584
#endif /* WITH_QUICKTIME */
604
585
                }
605
 
#ifdef _WIN32
 
586
#if defined (_WIN32) && !defined(FREE_WINDOWS)
606
587
                else
607
588
                        get_avicodec_settings();
608
 
#endif /* _WIN32 */
609
 
#else /* libquicktime */
610
 
                if (!G.scene->r.qtcodecdata) {
611
 
                        G.scene->r.qtcodecdata = MEM_callocN(sizeof(QtCodecData),  "QtCodecData");
612
 
                        qtcodec_idx = 1;
613
 
                }
614
 
                if (qtcodec_idx < 1) {
615
 
                        qtcodec_idx = 1;
616
 
                        qt_init_codecs();
617
 
                }
618
 
 
619
 
                G.scene->r.qtcodecdata->fourcc = qtcodecidx_to_fcc(qtcodec_idx-1);
620
 
                /* if the selected codec differs from the previous one, reinit it */
621
 
                qt_init_codecdata(G.scene->r.qtcodecdata);      
622
 
                allqueue(REDRAWBUTSSCENE, 0);
 
589
#endif /* _WIN32 && !FREE_WINDOWS */
623
590
#endif /* _WIN32 || __APPLE__ */
624
591
                break;
625
 
#endif /* WITH_QUICKTIME */
626
592
 
627
593
        case B_PR_FULL:
628
594
                G.scene->r.xsch= 1280;
634
600
                G.scene->r.xparts=  G.scene->r.yparts= 1;
635
601
 
636
602
                BLI_init_rctf(&G.scene->r.safety, 0.1, 0.9, 0.1, 0.9);
 
603
                BIF_undo_push("Set FULL");
637
604
                allqueue(REDRAWBUTSSCENE, 0);
638
605
                allqueue(REDRAWVIEWCAM, 0);
639
606
                break;
674
641
                G.scene->r.xparts=  G.scene->r.yparts= 1;
675
642
 
676
643
                BLI_init_rctf(&G.scene->r.safety, 0.1, 0.9, 0.1, 0.9);
 
644
                BIF_undo_push("Set PAL 16/9");
677
645
                allqueue(REDRAWVIEWCAM, 0);
678
646
                allqueue(REDRAWBUTSSCENE, 0);
679
647
                break;
713
681
                G.scene->r.xparts=  G.scene->r.yparts= 1;
714
682
 
715
683
                BLI_init_rctf(&G.scene->r.safety, 0.0, 1.0, 0.0, 1.0);
 
684
                BIF_undo_push("Set PC");
716
685
                allqueue(REDRAWVIEWCAM, 0);
717
686
                allqueue(REDRAWBUTSSCENE, 0);
718
687
                break;
727
696
                G.scene->r.xparts=  G.scene->r.yparts= 1;
728
697
 
729
698
                BLI_init_rctf(&G.scene->r.safety, 0.1, 0.9, 0.1, 0.9);
 
699
                BIF_undo_push("Set Default");
730
700
                allqueue(REDRAWVIEWCAM, 0);
731
701
                allqueue(REDRAWBUTSSCENE, 0);
732
702
                break;
741
711
                G.scene->r.yparts= 1;
742
712
 
743
713
                BLI_init_rctf(&G.scene->r.safety, 0.1, 0.9, 0.1, 0.9);
 
714
                BIF_undo_push("Set Panorama");
744
715
                allqueue(REDRAWVIEWCAM, 0);
745
716
                allqueue(REDRAWBUTSSCENE, 0);
746
717
                break;
755
726
                G.scene->r.xparts=  G.scene->r.yparts= 1;
756
727
                
757
728
                BLI_init_rctf(&G.scene->r.safety, 0.1, 0.9, 0.1, 0.9);
 
729
                BIF_undo_push("Set NTSC");
758
730
                allqueue(REDRAWBUTSSCENE, 0);
759
731
                allqueue(REDRAWVIEWCAM, 0);
760
732
                break;
776
748
        case B_CLEARSET:
777
749
                scene_change_set(G.scene, NULL);
778
750
                break;
 
751
        case B_FBUF_REDO:
 
752
                if(R.rectftot) {
 
753
                        /* copy is needed... not so nice, but how better? */
 
754
                        R.r.postgamma= G.scene->r.postgamma;
 
755
                        R.r.postigamma= 1.0/R.r.postgamma;
 
756
                        R.r.postadd= G.scene->r.postadd;
 
757
                        R.r.postmul= G.scene->r.postmul;
 
758
                        R.r.posthue= G.scene->r.posthue;
 
759
                        R.r.postsat= G.scene->r.postsat;
 
760
                        R.r.dither_intensity= G.scene->r.dither_intensity;
 
761
                        
 
762
                        RE_floatbuffer_to_output();
 
763
                        BIF_redraw_render_rect();
 
764
                }
 
765
                break;
 
766
        case B_SET_EDGE:
 
767
                G.scene->r.mode &= ~R_ZBLUR;
 
768
                allqueue(REDRAWBUTSSCENE, 0);
 
769
                break;
 
770
        case B_SET_ZBLUR:
 
771
                G.scene->r.mode &= ~R_EDGE;
 
772
                allqueue(REDRAWBUTSSCENE, 0);
 
773
                break;
779
774
        }
780
775
}
781
776
 
786
781
        block= uiNewBlock(&curarea->uiblocks, "edge render", UI_EMBOSS, UI_HELV, curarea->win);
787
782
                
788
783
        /* use this for a fake extra empy space around the buttons */
789
 
        uiDefBut(block, LABEL, 0, "",  285, -20, 230, 120, NULL,  0, 0, 0, 0, "");
 
784
        uiDefBut(block, LABEL, 0, "",  290, -15, 220, 115, NULL,  0, 0, 0, 0, "");
790
785
        
791
 
        uiDefButS(block, NUM, 0,"Eint:",  295,50,70,19,  &G.scene->r.edgeint, 0.0, 255.0, 0, 0,
 
786
        uiBlockBeginAlign(block);
 
787
        uiDefButS(block, NUM, 0,"Eint:",        370,75,135,19,  &G.scene->r.edgeint, 0.0, 255.0, 0, 0,
792
788
                  "Sets edge intensity for Toon shading");
793
 
        uiDefButI(block, TOG, 0,"Shift", 365,50,70,19,  &G.compat, 0, 0, 0, 0,
 
789
        uiDefButS(block, NUM, 0,"AntiShift",370,55,135,19,  &(G.scene->r.same_mat_redux), 0, 255.0, 0, 0,
 
790
                  "For unified renderer: reduce intensity on boundaries "
 
791
                  "with identical materials with this number.");
 
792
 
 
793
        uiBlockBeginAlign(block);
 
794
        uiDefButI(block, TOG, 0,"Shift",        295,75,70,19,  &G.compat, 0, 0, 0, 0,
794
795
                  "For unified renderer: use old offsets for edges");
795
 
        uiDefButI(block, TOG, 0,"All",          435,50,70,19,  &G.notonlysolid, 0, 0, 0, 0,
 
796
        uiDefButI(block, TOG, 0,"All",          295,55,70,19,  &G.notonlysolid, 0, 0, 0, 0,
796
797
                  "For unified renderer: also consider transparent faces for toon shading");
797
 
 
 
798
        uiBlockEndAlign(block);
 
799
        
798
800
        /* colour settings for the toon shading */
799
 
        uiDefButF(block, COL, B_EDGECOLSLI, "", 295,-10,30,60,  &(G.scene->r.edgeR), 0, 0, 0, 0, "");
 
801
        uiDefButF(block, COL, 0, "",            295,-10,30,60,  &(G.scene->r.edgeR), 0, 0, 0, B_EDGECOLSLI, "");
800
802
        
801
 
        uiDefButF(block, NUMSLI, 0, "R ",   325, 30, 180,19,   &G.scene->r.edgeR, 0.0, 1.0, B_EDGECOLSLI, 0,
802
 
                  "For unified renderer: Colour for edges in toon shading mode.");
803
 
        uiDefButF(block, NUMSLI, 0, "G ",  325, 10, 180,19,  &G.scene->r.edgeG, 0.0, 1.0, B_EDGECOLSLI, 0,
804
 
                  "For unified renderer: Colour for edges in toon shading mode.");
805
 
        uiDefButF(block, NUMSLI, 0, "B ",  325, -10, 180,19,  &G.scene->r.edgeB, 0.0, 1.0, B_EDGECOLSLI, 0,
 
803
        uiBlockBeginAlign(block);
 
804
        uiDefButF(block, NUMSLI, 0, "R ",   330, 30, 175,19,   &G.scene->r.edgeR, 0.0, 1.0, B_EDGECOLSLI, 0,
 
805
                  "For unified renderer: Colour for edges in toon shading mode.");
 
806
        uiDefButF(block, NUMSLI, 0, "G ",       330, 10, 175,19,  &G.scene->r.edgeG, 0.0, 1.0, B_EDGECOLSLI, 0,
 
807
                  "For unified renderer: Colour for edges in toon shading mode.");
 
808
        uiDefButF(block, NUMSLI, 0, "B ",       330, -10, 175,19,  &G.scene->r.edgeB, 0.0, 1.0, B_EDGECOLSLI, 0,
806
809
                  "For unified renderer: Colour for edges in toon shading mode.");
807
810
 
808
 
        uiDefButS(block, NUM, 0,"AntiShift",   365,70,140,19,  &(G.scene->r.same_mat_redux), 0, 255.0, 0, 0,
809
 
                  "For unified renderer: reduce intensity on boundaries "
810
 
                  "with identical materials with this number.");
811
811
        
812
812
        uiBlockSetDirection(block, UI_TOP);
813
813
        
821
821
        block= uiNewBlock(&curarea->uiblocks, "post render", UI_EMBOSS, UI_HELV, curarea->win);
822
822
                
823
823
        /* use this for a fake extra empy space around the buttons */
824
 
        uiDefBut(block, LABEL, 0, "",                   -10, 10, 200, 80, NULL, 0, 0, 0, 0, "");
825
 
        
826
 
        uiDefButF(block, NUMSLI, 0,"Add:",              0,60,180,19,  &G.scene->r.postadd, -1.0, 1.0, 0, 0, "");
827
 
        uiDefButF(block, NUMSLI, 0,"Mul:",              0,40,180,19,  &G.scene->r.postmul, 0.01, 4.0, 0, 0, "");
828
 
        uiDefButF(block, NUMSLI, 0,"Gamma:",            0,20,180,19,  &G.scene->r.postgamma, 0.2, 2.0, 0, 0, "");
 
824
        uiDefBut(block, LABEL, 0, "",                   -10, -10, 200, 120, NULL, 0, 0, 0, 0, "");
 
825
        uiBlockBeginAlign(block);
 
826
        uiDefButF(block, NUMSLI, 0, "Add:",             0,80,180,19, &G.scene->r.postadd, -1.0, 1.0, 0, 0, "");
 
827
        uiDefButF(block, NUMSLI, 0, "Mul:",             0,60,180,19,  &G.scene->r.postmul, 0.01, 4.0, 0, 0, "");
 
828
        uiDefButF(block, NUMSLI, 0, "Gamma:",   0,40,180,19,  &G.scene->r.postgamma, 0.1, 4.0, 0, 0, "");
 
829
        uiDefButF(block, NUMSLI, 0, "Hue:",             0,20,180,19,  &G.scene->r.posthue, -0.5, 0.5, 0, 0, "");
 
830
        uiDefButF(block, NUMSLI, 0, "Sat:",             0, 0,180,19,  &G.scene->r.postsat, 0.0, 4.0, 0, 0, "");
829
831
 
830
832
        uiBlockSetDirection(block, UI_TOP);
831
833
        
 
834
        addqueue(curarea->win, UI_BUT_EVENT, B_FBUF_REDO);
 
835
        
832
836
        return block;
833
837
}
834
838
 
836
840
static uiBlock *framing_render_menu(void *arg_unused)
837
841
{
838
842
        uiBlock *block;
839
 
        short yco = 60, xco = 0;
 
843
        short yco = 190, xco = 0;
840
844
        int randomcolorindex = 1234;
841
845
 
842
846
        block= uiNewBlock(&curarea->uiblocks, "framing_options", UI_EMBOSS, UI_HELV, curarea->win);
843
847
 
844
848
        /* use this for a fake extra empy space around the buttons */
845
 
        uiDefBut(block, LABEL, 0, "",                   -10, -10, 300, 100, NULL, 0, 0, 0, 0, "");
 
849
        uiDefBut(block, LABEL, 0, "",                   -5, -10, 295, 224, NULL, 0, 0, 0, 0, "");
846
850
 
847
851
        uiDefBut(block, LABEL, B_NOP, "Framing:", xco, yco, 68,19, 0, 0, 0, 0, 0, "");
 
852
        uiBlockBeginAlign(block);
848
853
        uiDefButC(block, ROW, 0, "Stretch",     xco += 70, yco, 68, 19, &G.scene->framing.type, 1.0, SCE_GAMEFRAMING_SCALE , 0, 0, "Stretch or squeeze the viewport to fill the display window");
849
854
        uiDefButC(block, ROW, 0, "Expose",      xco += 70, yco, 68, 19, &G.scene->framing.type, 1.0, SCE_GAMEFRAMING_EXTEND, 0, 0, "Show the entire viewport in the display window, viewing more horizontally or vertically");
850
 
        uiDefButC(block, ROW, 0, "Bars",            xco += 70, yco, 68, 19, &G.scene->framing.type, 1.0, SCE_GAMEFRAMING_BARS  , 0, 0, "Show the entire viewport in the display window, using bar horizontally or vertically");
851
 
 
852
 
        yco -= 20;
853
 
        xco = 35;
854
 
 
855
 
        uiDefButF(block, COL, randomcolorindex, "",                0, yco - 58 + 18, 33, 58, &G.scene->framing.col[0], 0, 0, 0, 0, "");
856
 
 
 
855
        uiDefButC(block, ROW, 0, "Letterbox",       xco += 70, yco, 68, 19, &G.scene->framing.type, 1.0, SCE_GAMEFRAMING_BARS  , 0, 0, "Show the entire viewport in the display window, using bar horizontally or vertically");
 
856
        uiBlockEndAlign(block);
 
857
 
 
858
        yco -= 25;
 
859
        xco = 40;
 
860
 
 
861
        uiDefButF(block, COL, 0, "",                0, yco - 58 + 18, 33, 58, &G.scene->framing.col[0], 0, 0, 0, randomcolorindex, "");
 
862
 
 
863
        uiBlockBeginAlign(block);
857
864
        uiDefButF(block, NUMSLI, 0, "R ", xco,yco,243,18, &G.scene->framing.col[0], 0.0, 1.0, randomcolorindex, 0, "Set the red component of the bars");
858
865
        yco -= 20;
859
866
        uiDefButF(block, NUMSLI, 0, "G ", xco,yco,243,18, &G.scene->framing.col[1], 0.0, 1.0, randomcolorindex, 0, "Set the green component of the bars");
860
867
        yco -= 20;
861
868
        uiDefButF(block, NUMSLI, 0, "B ", xco,yco,243,18, &G.scene->framing.col[2], 0.0, 1.0, randomcolorindex, 0, "Set the blue component of the bars");
 
869
        uiBlockEndAlign(block);
 
870
        
 
871
        xco = 0;
 
872
        uiDefBut(block, LABEL, 0, "Fullscreen:",                xco, yco-=30, 100, 19, 0, 0.0, 0.0, 0, 0, "");
 
873
        uiDefButS(block, TOG, 0, "Fullscreen", xco+70, yco, 68, 19, &G.scene->r.fullscreen, 0.0, 0.0, 0, 0, "Starts player in a new fullscreen display");
 
874
        uiBlockBeginAlign(block);
 
875
        uiDefButS(block, NUM, 0, "X:",          xco+40, yco-=27, 100, 19, &G.scene->r.xplay, 10.0, 2000.0, 0, 0, "Displays current X screen/window resolution. Click to change.");
 
876
        uiDefButS(block, NUM, 0, "Y:",          xco+140, yco, 100, 19, &G.scene->r.yplay,    10.0, 2000.0, 0, 0, "Displays current Y screen/window resolution. Click to change.");
 
877
        uiDefButS(block, NUM, 0, "Freq:",       xco+40, yco-=21, 100, 19, &G.scene->r.freqplay, 10.0, 2000.0, 0, 0, "Displays clock frequency of fullscreen display. Click to change.");
 
878
        uiDefButS(block, NUM, 0, "Bits:",       xco+140, yco, 100, 19, &G.scene->r.depth, 8.0, 32.0, 800.0, 0, "Displays bit depth of full screen display. Click to change.");
 
879
        uiBlockEndAlign(block);
 
880
 
 
881
        /* stereo settings */
 
882
        /* can't use any definition from the game engine here so hardcode it. Change it here when it changes there!
 
883
         * RAS_IRasterizer has definitions:
 
884
         * RAS_STEREO_NOSTEREO           1
 
885
         * RAS_STEREO_QUADBUFFERED 2
 
886
         * RAS_STEREO_ABOVEBELOW         3
 
887
         * RAS_STEREO_INTERLACED         4       future
 
888
         * RAS_STEREO_ANAGLYPH          5
 
889
         * RAS_STEREO_SIDEBYSIDE        6
 
890
         * RAS_STEREO_VINTERLACE        7
 
891
         */
 
892
        uiBlockBeginAlign(block);
 
893
        uiDefButS(block, ROW, 0, "No Stereo", xco, yco-=30, 88, 19, &(G.scene->r.stereomode), 7.0, 1.0, 0, 0, "Disables stereo");
 
894
        uiDefButS(block, ROW, 0, "Pageflip", xco+=90, yco, 88, 19, &(G.scene->r.stereomode), 7.0, 2.0, 0, 0, "Enables hardware pageflip stereo method");
 
895
        uiDefButS(block, ROW, 0, "Syncdouble", xco+=90, yco, 88, 19, &(G.scene->r.stereomode), 7.0, 3.0, 0, 0, "Enables syncdoubling stereo method");
 
896
        uiDefButS(block, ROW, 0, "Anaglyph", xco-=180, yco-=21, 88, 19, &(G.scene->r.stereomode), 7.0, 5.0, 0, 0, "Enables anaglyph (Red-Blue) stereo method");
 
897
        uiDefButS(block, ROW, 0, "Side by Side", xco+=90, yco, 88, 19, &(G.scene->r.stereomode), 7.0, 6.0, 0, 0, "Enables side by side left and right images");
 
898
        uiDefButS(block, ROW, 0, "V Interlace", xco+=90, yco, 88, 19, &(G.scene->r.stereomode), 7.0, 7.0, 0, 0, "Enables interlaced vertical strips for autostereo display");
 
899
        
 
900
        uiBlockEndAlign(block);
862
901
 
863
902
        uiBlockSetDirection(block, UI_TOP);
864
903
 
956
995
        if(uiNewPanel(curarea, block, "Output", "Render", 0, 0, 318, 204)==0) return;
957
996
        
958
997
        uiBlockBeginAlign(block);
959
 
        uiDefIconBut(block, BUT, B_FS_PIC, ICON_FILESEL,        8, 170, 20, 19, 0, 0, 0, 0, 0, "Open Fileselect to get Pics dir/name");
960
 
        uiDefBut(block, TEX,0,"",                                                       30, 170, 268, 19,G.scene->r.pic, 0.0,79.0, 0, 0, "Directory/name to save rendered Pics to");
961
 
        uiDefIconBut(block, BUT,B_FS_BACKBUF, ICON_FILESEL, 8, 148, 20, 19, 0, 0, 0, 0, 0, "Open Fileselect to get Backbuf image");
962
 
        uiDefBut(block, TEX,0,"",                                                       30, 148, 268, 19,G.scene->r.backbuf, 0.0,79.0, 0, 0, "Image to use as background for rendering");
963
 
        uiDefIconBut(block, BUT,B_FS_FTYPE, ICON_FILESEL,       8, 125, 20, 19, 0, 0, 0, 0, 0, "Open Fileselect to get Ftype image");
964
 
        uiDefBut(block, TEX,0,"",                                                       30, 125, 268, 19,G.scene->r.ftype,0.0,79.0, 0, 0, "Image to use with FTYPE Image type");
 
998
        uiDefIconBut(block, BUT, B_FS_PIC, ICON_FILESEL,        10, 190, 20, 20, 0, 0, 0, 0, 0, "Open Fileselect to get Pics dir/name");
 
999
        uiDefBut(block, TEX,0,"",                                                       31, 190, 279, 20,G.scene->r.pic, 0.0,79.0, 0, 0, "Directory/name to save rendered Pics to");
 
1000
        uiDefIconBut(block, BUT,B_FS_BACKBUF, ICON_FILESEL, 10, 168, 20, 20, 0, 0, 0, 0, 0, "Open Fileselect to get Backbuf image");
 
1001
        uiDefBut(block, TEX,0,"",                                                       31, 168, 279, 20,G.scene->r.backbuf, 0.0,79.0, 0, 0, "Image to use as background for rendering");
 
1002
        uiDefIconBut(block, BUT,B_FS_FTYPE, ICON_FILESEL,       10, 146, 20, 20, 0, 0, 0, 0, 0, "Open Fileselect to get Ftype image");
 
1003
        uiDefBut(block, TEX,0,"",                                                       31, 146, 279, 20,G.scene->r.ftype,0.0,79.0, 0, 0, "Image to use with FTYPE Image type");
 
1004
        uiBlockEndAlign(block);
965
1005
        
966
1006
        
967
1007
        /* SET BUTTON */
969
1009
        id= (ID *)G.scene->set;
970
1010
        IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->scene), id, &(G.buts->menunr));
971
1011
        if(strp[0])
972
 
                uiDefButS(block, MENU, B_SETBROWSE, strp, 8, 96, 20, 19, &(G.buts->menunr), 0, 0, 0, 0, "Scene to link as a Set");
 
1012
                uiDefButS(block, MENU, B_SETBROWSE, strp, 10, 120, 20, 20, &(G.buts->menunr), 0, 0, 0, 0, "Scene to link as a Set");
973
1013
        MEM_freeN(strp);
974
1014
 
975
1015
        if(G.scene->set) {
976
1016
                uiSetButLock(1, NULL);
977
 
                uiDefIDPoinBut(block, test_scenepoin_but, 0, "",        29, 96, 100, 19, &(G.scene->set), "Name of the Set");
 
1017
                uiDefIDPoinBut(block, test_scenepoin_but, 0, "",        31, 120, 100, 20, &(G.scene->set), "Name of the Set");
978
1018
                uiClearButLock();
979
 
                uiDefIconBut(block, BUT, B_CLEARSET, ICON_X,            131, 96, 20, 19, 0, 0, 0, 0, 0, "Remove Set link");
 
1019
                uiDefIconBut(block, BUT, B_CLEARSET, ICON_X,            132, 120, 20, 20, 0, 0, 0, 0, 0, "Remove Set link");
980
1020
        }
981
1021
        uiBlockEndAlign(block);
982
1022
 
983
1023
        uiBlockSetCol(block, TH_BUT_SETTING1);
984
 
        uiDefButS(block, TOG|BIT|0, 0,"Backbuf",        8, 70, 62, 19, &G.scene->r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image"); 
 
1024
        uiDefButS(block, TOG|BIT|0, B_NOP,"Backbuf",    10, 94, 80, 20, &G.scene->r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image");        
 
1025
        uiDefButI(block, TOG|BIT|19, B_NOP,"Threads",   10, 68, 80, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable/Disable render in two threads");  
985
1026
        uiBlockSetCol(block, TH_AUTO);
986
1027
                
987
1028
        uiBlockBeginAlign(block);
988
1029
        for(b=2; b>=0; b--)
989
1030
                for(a=0; a<3; a++)
990
 
                        uiDefButS(block, TOG|BIT|(3*b+a), 800,"",       (short)(9+18*a),(short)(7+12*b),16,10, &R.winpos, 0, 0, 0, 0, "Render window placement on screen");
 
1031
                        uiDefButS(block, TOG|BIT|(3*b+a), 800,"",       (short)(10+18*a),(short)(10+14*b),16,12, &G.winpos, 0, 0, 0, 0, "Render window placement on screen");
 
1032
        uiBlockEndAlign(block);
991
1033
 
992
1034
        uiBlockBeginAlign(block);
993
 
        uiDefButS(block, ROW, B_REDR, "DispView",       72, 7, 65, 19, &R.displaymode, 0.0, (float)R_DISPLAYVIEW, 0, 0, "Sets render output to display in 3D view");
994
 
        uiDefButS(block, ROW, B_REDR, "DispWin",        139, 7, 62, 19, &R.displaymode, 0.0, (float)R_DISPLAYWIN, 0, 0, "Sets render output to display in a seperate window");
 
1035
        uiDefButS(block, TOG|BIT|2, REDRAWVIEW3D, "Passepartout", 72, 30, 122, 20, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Draws darkened passepartout in camera view");
 
1036
        uiDefButS(block, ROW, B_REDR, "DispWin",        72, 10, 60, 20, &G.displaymode, 0.0, (float)R_DISPLAYWIN, 0, 0, "Sets render output to display in a seperate window");
 
1037
        uiDefButS(block, ROW, B_REDR, "DispView",       134, 10, 60, 20, &G.displaymode, 0.0, (float)R_DISPLAYVIEW, 0, 0, "Sets render output to display in 3D view");
995
1038
        uiBlockEndAlign(block);
996
1039
 
997
 
        uiDefButS(block, TOG|BIT|4, 0, "Extensions",    228, 8, 67, 18, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Adds extensions to the output when rendering animations");
 
1040
        uiDefButS(block, TOG|BIT|4, 0, "Extensions", 205, 10, 105, 19, &G.scene->r.scemode, 0.0, 0.0, 0, 0, "Adds extensions to the output when rendering animations");
998
1041
 
 
1042
        /* Dither control */
 
1043
        uiDefButF(block, NUM,B_DIFF, "Dither:",         205,31,105,19, &G.scene->r.dither_intensity, 0.0, 2.0, 0, 0, "The amount of dithering noise present in the output image (0.0 = no dithering)");
 
1044
        
999
1045
        /* Toon shading buttons */
1000
1046
        uiBlockBeginAlign(block);
1001
 
        uiDefButI(block, TOG|BIT|5, 0,"Edge",   154, 70, 47, 19, &G.scene->r.mode, 0, 0, 0, 0, "Enable Toon shading");
1002
 
        uiDefBlockBut(block, edge_render_menu, NULL, "Edge Settings |>> ", 204, 70, 93, 19, "Display edge settings");
 
1047
        uiDefButI(block, TOG|BIT|5, 0,"Edge",   100, 94, 70, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Toon edge shading");
 
1048
        uiDefBlockBut(block, edge_render_menu, NULL, "Edge Settings", 170, 94, 140, 20, "Display edge settings");
 
1049
        
 
1050
        /* postprocess render buttons */
 
1051
        uiBlockBeginAlign(block);
 
1052
        if(R.rectftot)
 
1053
                uiDefIconTextButI(block, TOG|BIT|18, B_NOP, ICON_IMAGE_DEHLT," Fbuf", 100, 68, 70, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render; buffer available");
 
1054
        else
 
1055
                uiDefButI(block, TOG|BIT|18, 0,"Fbuf",  100, 68, 70, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render, no buffer available now");
 
1056
        uiDefBlockBut(block, post_render_menu, NULL, "Post process", 170, 68, 140, 20, "Applies on RGBA floats while render or with Fbuf available");
1003
1057
        uiBlockEndAlign(block);
1004
 
 
1005
 
        /* unified render buttons */
1006
 
        if(G.scene->r.mode & R_UNIFIED) {
1007
 
                uiDefBlockBut(block, post_render_menu, NULL, "Post process |>> ", 205, 48, 92, 19, "Only for unified render");
1008
 
                if (G.scene->r.mode & R_GAMMA) {
1009
 
                        uiDefButF(block, NUMSLI, 0,"Gamma:",            8, 48, 143, 19,
1010
 
                                         &(G.scene->r.gamma), 0.2, 5.0, B_GAMMASLI, 0,
1011
 
                                         "The gamma value for blending oversampled images (1.0 = no correction).");
1012
 
                }
1013
 
        }
 
1058
        
 
1059
        /* removed, for time being unified and normal render will use same gamma for blending (2.0) */
 
1060
        //if (G.scene->r.mode & R_GAMMA) {
 
1061
        //      uiDefButF(block, NUMSLI, 0,"Gamma:",            10, 68, 142, 20,
 
1062
        //                       &(G.scene->r.gamma), 0.2, 5.0, B_GAMMASLI, 0,
 
1063
        //                       "The gamma value for blending oversampled images (1.0 = no correction).");
 
1064
        //}
1014
1065
}
1015
1066
 
1016
1067
static void render_panel_render(void)
1022
1073
        if(uiNewPanel(curarea, block, "Render", "Render", 320, 0, 318, 204)==0) return;
1023
1074
 
1024
1075
        uiBlockBeginAlign(block);
1025
 
        uiDefBut(block, BUT,B_DORENDER,"RENDER",        369, 164, 192,37, 0, 0, 0, 0, 0, "Start the rendering");
 
1076
        uiDefBut(block, BUT,B_DORENDER,"RENDER",        369, 164, 191,37, 0, 0, 0, 0, 0, "Start the rendering");
1026
1077
        /* yafray: on request, render engine menu is back again, and moved to Render panel */
1027
 
        uiDefButS(block, MENU, B_REDR, "Rendering Engine %t|Blender Internal %x0|YafRay %x1", 
1028
 
                                                                                                369, 142, 192, 20, &G.scene->r.renderer, 0, 0, 0, 0, "Choose rendering engine");        
1029
 
 
1030
 
        uiBlockBeginAlign(block);
1031
 
        uiDefButI(block, TOG|BIT|0, 0, "OSA",           369,110,122,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)");
1032
 
        uiDefButS(block, ROW,B_DIFF,"5",                        369,86,28,20,&G.scene->r.osa,2.0,5.0, 0, 0, "Sets oversample level to 5");
1033
 
        uiDefButS(block, ROW,B_DIFF,"8",                        397,86,28,20,&G.scene->r.osa,2.0,8.0, 0, 0, "Sets oversample level to 8 (Recommended)");
1034
 
        uiDefButS(block, ROW,B_DIFF,"11",                       425,86,33,20,&G.scene->r.osa,2.0,11.0, 0, 0, "Sets oversample level to 11");
1035
 
        uiDefButS(block, ROW,B_DIFF,"16",                       458,86,33,20,&G.scene->r.osa,2.0,16.0, 0, 0, "Sets oversample level to 16");
1036
 
 
1037
 
        uiBlockBeginAlign(block);
1038
 
        uiDefButI(block, TOG|BIT|14, 0, "MBLUR",        495,110,66,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Motion Blur calculation");
1039
 
        uiDefButF(block, NUM,B_DIFF,"Bf:",                      495,86,65,20,&G.scene->r.blurfac, 0.01, 5.0, 10, 2, "Sets motion blur factor");
1040
 
 
1041
 
        uiBlockBeginAlign(block);
1042
 
        uiDefButS(block, NUM,B_DIFF,"Xparts:",          369,42,99,31,&G.scene->r.xparts,1.0, 64.0, 0, 0, "Sets the number of horizontal parts to render image in (For panorama sets number of camera slices)");
1043
 
        uiDefButS(block, NUM,B_DIFF,"Yparts:",          472,42,86,31,&G.scene->r.yparts,1.0, 64.0, 0, 0, "Sets the number of vertical parts to render image in");
1044
 
 
1045
 
        uiBlockBeginAlign(block);
1046
 
        uiDefButS(block, ROW,800,"Sky",         369,11,30,24,&G.scene->r.alphamode,3.0,0.0, 0, 0, "Fill background with sky");
1047
 
        uiDefButS(block, ROW,800,"Premul",      400,11,50,24,&G.scene->r.alphamode,3.0,1.0, 0, 0, "Multiply alpha in advance");
1048
 
        uiDefButS(block, ROW,800,"Key",         450,11,40,24,&G.scene->r.alphamode,3.0,2.0, 0, 0, "Alpha and colour values remain unchanged");
1049
 
        uiBlockEndAlign(block);
1050
 
        
 
1078
        uiDefButS(block, MENU, B_SWITCHRENDER, "Rendering Engine %t|Blender Internal %x0|YafRay %x1", 
 
1079
                                                                                                369, 142, 191, 20, &G.scene->r.renderer, 0, 0, 0, 0, "Choose rendering engine");        
 
1080
 
 
1081
        uiBlockBeginAlign(block);
 
1082
        uiDefButI(block, TOG|BIT|0, 0, "OSA",           369,109,122,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)");
 
1083
        uiDefButS(block, ROW,B_DIFF,"5",                        369,88,29,20,&G.scene->r.osa,2.0,5.0, 0, 0, "Sets oversample level to 5");
 
1084
        uiDefButS(block, ROW,B_DIFF,"8",                        400,88,29,20,&G.scene->r.osa,2.0,8.0, 0, 0, "Sets oversample level to 8 (Recommended)");
 
1085
        uiDefButS(block, ROW,B_DIFF,"11",                       431,88,29,20,&G.scene->r.osa,2.0,11.0, 0, 0, "Sets oversample level to 11");
 
1086
        uiDefButS(block, ROW,B_DIFF,"16",                       462,88,29,20,&G.scene->r.osa,2.0,16.0, 0, 0, "Sets oversample level to 16");
 
1087
        uiBlockEndAlign(block);
 
1088
 
 
1089
        uiBlockBeginAlign(block);
 
1090
        uiDefButI(block, TOG|BIT|14, 0, "MBLUR",        496,109,64,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Motion Blur calculation");
 
1091
        uiDefButF(block, NUM,B_DIFF,"Bf:",                      496,88,64,20,&G.scene->r.blurfac, 0.01, 5.0, 10, 2, "Sets motion blur factor");
 
1092
        uiBlockEndAlign(block);
 
1093
 
 
1094
        uiBlockBeginAlign(block);
 
1095
        uiDefButS(block, NUM,B_DIFF,"Xparts:",          369,46,95,29,&G.scene->r.xparts,1.0, 64.0, 0, 0, "Sets the number of horizontal parts to render image in (For panorama sets number of camera slices)");
 
1096
        uiDefButS(block, NUM,B_DIFF,"Yparts:",          465,46,95,29,&G.scene->r.yparts,1.0, 64.0, 0, 0, "Sets the number of vertical parts to render image in");
 
1097
        uiBlockEndAlign(block);
 
1098
 
 
1099
        uiBlockBeginAlign(block);
 
1100
        uiDefButS(block, ROW,800,"Sky",         369,13,35,20,&G.scene->r.alphamode,3.0,0.0, 0, 0, "Fill background with sky");
 
1101
        uiDefButS(block, ROW,800,"Premul",      405,13,50,20,&G.scene->r.alphamode,3.0,1.0, 0, 0, "Multiply alpha in advance");
 
1102
        uiDefButS(block, ROW,800,"Key",         456,13,35,20,&G.scene->r.alphamode,3.0,2.0, 0, 0, "Alpha and colour values remain unchanged");
 
1103
        uiBlockEndAlign(block);
 
1104
 
1051
1105
        if(G.scene->r.mode & R_RAYTRACE)
1052
 
                uiDefButS(block, MENU, B_DIFF,"Octree resolution %t|64 %x64|128 %x128|256 %x256|512 %x512",     495,11,66,24,&G.scene->r.ocres,0.0,0.0, 0, 0, "Octree resolution for ray tracing");
1053
 
 
1054
 
        uiBlockBeginAlign(block);
1055
 
        uiDefButI(block, TOG|BIT|1,0,"Shadow",  565,171,61,30, &G.scene->r.mode, 0, 0, 0, 0, "Enable shadow calculation");
1056
 
        uiDefButI(block, TOG|BIT|4,0,"EnvMap",  626,171,61,30, &G.scene->r.mode, 0, 0, 0, 0, "Enable environment map rendering");
1057
 
        uiDefButI(block, TOG|BIT|10,0,"Pano",   565,142,41,28, &G.scene->r.mode, 0, 0, 0, 0, "Enable panorama rendering (output width is multiplied by Xparts)");
1058
 
        uiDefButI(block, TOG|BIT|16,B_REDR,"Ray",606,142,35,28, &G.scene->r.mode, 0, 0, 0, 0, "Enable ray tracing");
1059
 
        uiDefButI(block, TOG|BIT|8,0,"Radio",   641,142,46,28, &G.scene->r.mode, 0, 0, 0, 0, "Enable radiosity rendering");
1060
 
        
1061
 
        uiBlockBeginAlign(block);
1062
 
        uiDefButS(block, ROW,B_DIFF,"100%",                     565,110,121,20,&G.scene->r.size,1.0,100.0, 0, 0, "Set render size to defined size");
1063
 
        uiDefButS(block, ROW,B_DIFF,"75%",                      565,86,36,20,&G.scene->r.size,1.0,75.0, 0, 0, "Set render size to 3/4 of defined size");
1064
 
        uiDefButS(block, ROW,B_DIFF,"50%",                      604,86,40,20,&G.scene->r.size,1.0,50.0, 0, 0, "Set render size to 1/2 of defined size");
1065
 
        uiDefButS(block, ROW,B_DIFF,"25%",                      647,86,39,20,&G.scene->r.size,1.0,25.0, 0, 0, "Set render size to 1/4 of defined size");
1066
 
 
1067
 
        uiBlockBeginAlign(block);
1068
 
        uiDefButI(block, TOG|BIT|6,0,"Fields",  564,50,60,23,&G.scene->r.mode, 0, 0, 0, 0, "Enables field rendering");
1069
 
        uiDefButI(block, TOG|BIT|13,0,"Odd",    624,50,40,23,&G.scene->r.mode, 0, 0, 0, 0, "Enables Odd field first rendering (Default: Even field)");
1070
 
        uiDefButI(block, TOG|BIT|7,0,"x",               665,50,20,23,&G.scene->r.mode, 0, 0, 0, 0, "Disables time difference in field calculations");
1071
 
 
1072
 
        uiDefButI(block, TOG|BIT|17,0,"Gauss",  564,30,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Gaussian sampling filter for antialiasing");
1073
 
        uiDefButF(block, NUM,B_DIFF,"",                 624,30,60,20,&G.scene->r.gauss,0.5, 1.5, 100, 2, "Sets the Gaussian filter size");
1074
 
        
1075
 
        uiDefButI(block, TOG|BIT|9,REDRAWVIEWCAM, "Border",     564,10,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Render a small cut-out of the image");
1076
 
        uiDefButI(block, TOG|BIT|2,0, "Gamma",  624,10,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable gamma correction");
1077
 
 
 
1106
                uiDefButS(block, MENU, B_DIFF,"Octree resolution %t|64 %x64|128 %x128|256 %x256|512 %x512",     496,13,64,20,&G.scene->r.ocres,0.0,0.0, 0, 0, "Octree resolution for ray tracing");
 
1107
 
 
1108
        uiBlockBeginAlign(block);
 
1109
        uiDefButI(block, TOG|BIT|1,0,"Shadow",  565,172,60,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable shadow calculation");
 
1110
        uiDefButI(block, TOG|BIT|4,0,"EnvMap",  627,172,60,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable environment map rendering");
 
1111
        uiDefButI(block, TOG|BIT|10,0,"Pano",   565,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable panorama rendering (output width is multiplied by Xparts)");
 
1112
        uiDefButI(block, TOG|BIT|16,B_REDR,"Ray",606,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable ray tracing");
 
1113
        uiDefButI(block, TOG|BIT|8,0,"Radio",   647,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable radiosity rendering");
 
1114
        uiBlockEndAlign(block);
 
1115
        
 
1116
        uiBlockBeginAlign(block);
 
1117
        uiDefButS(block, ROW,B_DIFF,"100%",                     565,109,122,20,&G.scene->r.size,1.0,100.0, 0, 0, "Set render size to defined size");
 
1118
        uiDefButS(block, ROW,B_DIFF,"75%",                      565,88,40,20,&G.scene->r.size,1.0,75.0, 0, 0, "Set render size to 3/4 of defined size");
 
1119
        uiDefButS(block, ROW,B_DIFF,"50%",                      606,88,40,20,&G.scene->r.size,1.0,50.0, 0, 0, "Set render size to 1/2 of defined size");
 
1120
        uiDefButS(block, ROW,B_DIFF,"25%",                      647,88,40,20,&G.scene->r.size,1.0,25.0, 0, 0, "Set render size to 1/4 of defined size");
 
1121
        uiBlockEndAlign(block);
 
1122
 
 
1123
        uiBlockBeginAlign(block);
 
1124
        uiDefButI(block, TOG|BIT|6,0,"Fields",  565,55,60,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables field rendering");
 
1125
        uiDefButI(block, TOG|BIT|13,0,"Odd",    627,55,39,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Odd field first rendering (Default: Even field)");
 
1126
        uiDefButI(block, TOG|BIT|7,0,"X",               668,55,19,20,&G.scene->r.mode, 0, 0, 0, 0, "Disables time difference in field calculations");
 
1127
        
 
1128
        uiDefButI(block, TOG|BIT|17,0,"Gauss",  565,34,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Gaussian sampling filter for antialiasing");
 
1129
        uiDefButF(block, NUM,B_DIFF,"",                 627,34,60,20,&G.scene->r.gauss,0.5, 1.5, 100, 2, "Sets the Gaussian filter size");
 
1130
        
 
1131
        uiDefButI(block, TOG|BIT|9,REDRAWVIEWCAM, "Border",     565,13,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Render a small cut-out of the image");
 
1132
        uiDefButI(block, TOG|BIT|2, B_REDR, "Gamma",    627,13,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Enable gamma correction");
 
1133
        uiBlockEndAlign(block);
1078
1134
 
1079
1135
}
1080
1136
 
1088
1144
 
1089
1145
 
1090
1146
        uiDefBut(block, BUT,B_DOANIM,"ANIM",            692,142,192,47, 0, 0, 0, 0, 0, "Start rendering a sequence");
1091
 
        
 
1147
 
1092
1148
        uiBlockSetCol(block, TH_BUT_SETTING1);
1093
1149
        uiBlockBeginAlign(block);
1094
 
        uiDefButS(block, TOG|BIT|0, 0, "Do Sequence",   692,114,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Enables sequence output rendering (Default: 3D rendering)");
1095
 
        uiDefButS(block, TOG|BIT|1, 0, "Render Daemon", 692,90,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Let external network render current scene");
 
1150
        uiDefButS(block, TOG|BIT|0, 0, "Do Sequence",692,114,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Enables sequence output rendering (Default: 3D rendering)");
 
1151
        uiDefButS(block, TOG|BIT|1, 0, "Render Daemon",692,90,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Let external network render current scene");
1096
1152
        uiBlockEndAlign(block);
1097
 
        
 
1153
 
1098
1154
        uiBlockSetCol(block, TH_AUTO);
1099
 
        uiDefBut(block, BUT,B_PLAYANIM, "PLAY", 692,40,94,33, 0, 0, 0, 0, 0, "Play animation of rendered images/avi (searches Pics: field)");
1100
 
        uiDefButS(block, NUM, B_RTCHANGED, "rt:",       790,40,95,33, &G.rt, -1000.0, 1000.0, 0, 0, "General testing/debug button");
1101
 
        
 
1155
        uiDefBut(block, BUT,B_PLAYANIM, "PLAY",692,40,94,33, 0, 0, 0, 0, 0, "Play animation of rendered images/avi (searches Pics: field)");
 
1156
        uiDefButS(block, NUM, B_RTCHANGED, "rt:",789,40,95,33, &G.rt, -1000.0, 1000.0, 0, 0, "General testing/debug button");
 
1157
 
1102
1158
        uiBlockBeginAlign(block);
1103
 
        uiDefButS(block, NUM,REDRAWSEQ,"Sta:",  692,10,94,24, &G.scene->r.sfra,1.0,18000.0, 0, 0, "The start frame of the animation");
1104
 
        uiDefButS(block, NUM,REDRAWSEQ,"End:",  790,10,95,24, &G.scene->r.efra,1.0,18000.0, 0, 0, "The end  frame of the animation");
 
1159
        uiDefButS(block, NUM,REDRAWSEQ,"Sta:",692,10,94,24, &G.scene->r.sfra,1.0,MAXFRAMEF, 0, 0, "The start frame of the animation");
 
1160
        uiDefButS(block, NUM,REDRAWSEQ,"End:",789,10,95,24, &G.scene->r.efra,1.0,MAXFRAMEF, 0, 0, "The end  frame of the animation");
1105
1161
        uiBlockEndAlign(block);
1106
1162
}
1107
1163
 
1113
1169
 
1114
1170
        block= uiNewBlock(&curarea->uiblocks, "render_panel_format", UI_EMBOSS, UI_HELV, curarea->win);
1115
1171
        if(uiNewPanel(curarea, block, "Format", "Render", 960, 0, 318, 204)==0) return;
1116
 
 
1117
 
        uiDefBlockBut(block, framing_render_menu, NULL, "Game framing settings |>> ", 892, 169, 227, 20, "Display game framing settings");
 
1172
        uiDefBlockBut(block, framing_render_menu, NULL, 
 
1173
                                  "Game framing settings", 
 
1174
                                  892, 169, 227, 20, "Display game framing settings");
 
1175
        /* uiDefIconTextBlockBut(block, framing_render_menu, NULL, 
 
1176
                                                   ICON_BLOCKBUT_CORNER, 
 
1177
                                                   "Game framing settings", 
 
1178
                                                   892, 169, 227, 20, 
 
1179
                                                   "Display game framing settings"); */
1118
1180
 
1119
1181
        uiBlockBeginAlign(block);
1120
1182
        uiDefButS(block, NUM,REDRAWVIEWCAM,"SizeX:",    892 ,136,112,27, &G.scene->r.xsch, 4.0, 10000.0, 0, 0, "The image width in pixels");
1132
1194
#endif
1133
1195
 
1134
1196
        uiDefButS(block, MENU,B_FILETYPEMENU,imagetype_pup(),   892,yofs,174,20, &G.scene->r.imtype, 0, 0, 0, 0, "Images are saved in this file format");
1135
 
        uiDefButI(block, TOG|BIT|11,0, "Crop",          1068,yofs,51,20, &G.scene->r.mode, 0, 0, 0, 0, "Exclude border rendering from total image");
 
1197
        uiDefButI(block, TOG|BIT|11,B_DIFF, "Crop",          1068,yofs,51,20, &G.scene->r.mode, 0, 0, 0, 0, "Exclude border rendering from total image");
1136
1198
 
1137
1199
        yofs -= 22;
1138
1200
 
1153
1215
                        else
1154
1216
                                uiDefBut(block, LABEL, 0, G.scene->r.qtcodecdata->qtcodecname,  892,yofs+44,225,20, 0, 0, 0, 0, 0, "");
1155
1217
                        uiDefBut(block, BUT,B_SELECTCODEC, "Set codec",  892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for Quicktime");
1156
 
#else /* libquicktime */
1157
 
                        if (!G.scene->r.qtcodecdata) G.scene->r.qtcodecdata = MEM_callocN(sizeof(QtCodecData), "QtCodecData");
1158
 
                        uiDefButI(block, MENU, B_SELECTCODEC, qtcodecs_pup(), 892,yofs, 112, 20, &qtcodec_idx, 0, 0, 0, 0, "Codec");
1159
 
                        /* make sure the codec stored in G.scene->r.qtcodecdata matches the selected
1160
 
                         * one, especially if it's not set.. */
1161
 
                        if (!G.scene->r.qtcodecdata->fourcc) {
1162
 
                                G.scene->r.qtcodecdata->fourcc = qtcodecidx_to_fcc(qtcodec_idx-1);
1163
 
                                qt_init_codecdata(G.scene->r.qtcodecdata);      
1164
 
                        }
1165
 
 
1166
 
                        yofs -= 22;
1167
 
                        uiDefBlockBut(block, qtcodec_menu, NULL, "Codec Settings |>> ", 892,yofs, 227, 20, "Edit Codec settings for QuickTime");
1168
 
                        yofs +=22;
1169
 
 
1170
 
#endif /* libquicktime */
 
1218
#endif
1171
1219
#endif /* WITH_QUICKTIME */
1172
1220
                } else {
1173
1221
#ifdef _WIN32
1181
1229
                        uiDefBut(block, BUT,B_SELECTCODEC, "Set codec",  892,yofs,112,20, 0, 0, 0, 0, 0, "Set codec settings for AVI");
1182
1230
                }
1183
1231
        } else {
1184
 
                uiDefButS(block, NUM,0, "Quality:",           892,yofs,112,20, &G.scene->r.quality, 10.0, 100.0, 0, 0, "Quality setting for JPEG images, AVI Jpeg and SGI movies");
 
1232
                uiDefButS(block, NUM,B_DIFF, "Quality:",           892,yofs,112,20, &G.scene->r.quality, 10.0, 100.0, 0, 0, "Quality setting for JPEG images, AVI Jpeg and SGI movies");
1185
1233
        }
1186
 
        uiDefButS(block, NUM,REDRAWALL,"Frs/sec:",   1006,yofs,113,20, &G.scene->r.frs_sec, 1.0, 120.0, 100.0, 0, "Frames per second");
 
1234
        uiDefButS(block, NUM,B_FRAMEMAP,"Frs/sec:",   1006,yofs,113,20, &G.scene->r.frs_sec, 1.0, 120.0, 100.0, 0, "Frames per second");
1187
1235
 
1188
1236
 
1189
1237
        uiBlockBeginAlign(block);
1218
1266
        uiDefBut(block, LABEL, 0, " ", 305,180,10,10, 0, 0, 0, 0, 0, "");
1219
1267
 
1220
1268
        uiDefBut(block, LABEL, 0, "Method", 5,175,70,20, 0, 1.0, 0, 0, 0, "");
1221
 
        uiDefButS(block, MENU, B_REDR, "GiMethod %t|None %x0|SkyDome %x1|Full %x2 |", 70,175,89,20, &G.scene->r.GImethod, 0, 0, 0, 0, "Global Illumination Method");
 
1269
        uiDefButS(block, MENU, B_REDR, "GiMethod %t|None %x0|SkyDome %x1|Full %x2", 70,175,89,20, &G.scene->r.GImethod, 0, 0, 0, 0, "Global Illumination Method");
 
1270
 
1222
1271
        uiDefBut(block, LABEL, 0, "Quality", 5,150,70,20, 0, 1.0, 0, 0, 0, "");
1223
 
        uiDefButS(block, MENU, B_REDR, "GiQuality %t|None %x0|Low %x1|Medium %x2 |High %x3|Higher %x4|Best %x5|", 
1224
 
                        70,150,89,20, &G.scene->r.GIquality, 0, 0, 0, 0, "Global Illumination Quality");
 
1272
        uiDefButS(block, MENU, B_REDR, "GiQuality %t|None %x0|Low %x1|Medium %x2 |High %x3|Higher %x4|Best %x5|Use Blender AO settings %x6", 70,150,89,20, &G.scene->r.GIquality, 0, 0, 0, 0, "Global Illumination Quality");
1225
1273
 
1226
1274
        if (G.scene->r.GImethod>0) {
1227
 
                if (G.scene->r.GIpower==0) G.scene->r.GIpower=1;
1228
 
                uiDefButF(block, NUM, 0, "Power:", 5,10,154,20, &G.scene->r.GIpower, 0.01, 100.0, 10, 0, "GI lighting intensity scale, 1 is normal");
 
1275
                uiDefButF(block, NUM, B_DIFF, "EmitPwr:", 5,35,154,20, &G.scene->r.GIpower, 0.01, 100.0, 10, 0, "arealight, material emit and background intensity scaling, 1 is normal");
 
1276
                if (G.scene->r.GImethod==2) uiDefButF(block, NUM, B_DIFF, "GI Pwr:", 5,10,154,20, &G.scene->r.GIindirpower, 0.01, 100.0, 10, 0, "GI indirect lighting intensity scaling, 1 is normal");
1229
1277
        }
1230
 
        
1231
1278
 
1232
 
        if (G.scene->r.GImethod==2) 
 
1279
        if (G.scene->r.GImethod>0)
1233
1280
        {
1234
1281
                if (G.scene->r.GIdepth==0) G.scene->r.GIdepth=2;
1235
 
                uiDefButI(block, NUM, 0, "Depth:", 180,175,110,20, &G.scene->r.GIdepth, 1.0, 8.0, 10, 10, "Number of bounces of the indirect light");
1236
 
                uiDefButI(block, NUM, 0, "CDepth:", 180,150,110,20, &G.scene->r.GIcausdepth, 1.0, 8.0, 10, 10, "Number of bounces inside objects (for caustics)");
1237
 
                uiDefButS(block,TOG|BIT|0, B_REDR, "Cache",70,125,89,20, &G.scene->r.GIcache, 0, 0, 0, 0, "Cache irradiance samples (faster)");
1238
 
                uiDefButS(block,TOG|BIT|0, B_REDR, "Photons",180,125,89,20, &G.scene->r.GIphotons, 0, 0, 0, 0, "Use global photons to help in GI");
 
1282
 
 
1283
                if (G.scene->r.GImethod==2) {
 
1284
                        uiDefButI(block, NUM, B_DIFF, "Depth:", 180,175,110,20, &G.scene->r.GIdepth, 1.0, 100.0, 10, 10, "Number of bounces of the indirect light");
 
1285
                        uiDefButI(block, NUM, B_DIFF, "CDepth:", 180,150,110,20, &G.scene->r.GIcausdepth, 1.0, 100.0, 10, 10, "Number of bounces inside objects (for caustics)");
 
1286
                        uiDefButS(block,TOG|BIT|0, B_REDR, "Photons",210,125,100,20, &G.scene->r.GIphotons, 0, 0, 0, 0, "Use global photons to help in GI");
 
1287
                }
 
1288
 
 
1289
                uiDefButS(block,TOG|BIT|0, B_REDR, "Cache",6,125,95,20, &G.scene->r.GIcache, 0, 0, 0, 0, "Cache occlusion/irradiance samples (faster)");
1239
1290
                if (G.scene->r.GIcache) 
1240
1291
                {
 
1292
                        uiDefButS(block,TOG|BIT|0, B_REDR, "NoBump",108,125,95,20, &G.scene->r.YF_nobump, 0, 0, 0, 0, "Don't use bumpnormals for cache (faster, but no bumpmapping in total indirectly lit areas)");
1241
1293
                        uiDefBut(block, LABEL, 0, "Cache parameters:", 5,105,130,20, 0, 1.0, 0, 0, 0, "");
1242
1294
                        if (G.scene->r.GIshadowquality==0.0) G.scene->r.GIshadowquality=0.9;
1243
 
                        uiDefButF(block, NUM, 0,"ShadQu:", 5,85,154,20, &(G.scene->r.GIshadowquality), 0.01, 1.0 ,1,0, "Sets the shadow quality, keep it under 0.95 :-) ");
 
1295
                        uiDefButF(block, NUM, B_DIFF,"ShadQu:", 5,85,154,20,    &(G.scene->r.GIshadowquality), 0.01, 1.0 ,1,0, "Sets the shadow quality, keep it under 0.95 :-) ");
1244
1296
                        if (G.scene->r.GIpixelspersample==0) G.scene->r.GIpixelspersample=10;
1245
 
                        uiDefButI(block, NUM, 0, "Prec:",       5,60,75,20, &G.scene->r.GIpixelspersample, 1, 50, 10, 10, "Maximum number of pixels without samples, the lower the better and slower");
1246
 
                        uiDefButS(block,TOG|BIT|0, 0, "Gradient", 84,60,75,20, &G.scene->r.GIgradient, 0, 0, 0, 0, "Try to smooth lighting using a gradient");
 
1297
                        uiDefButI(block, NUM, B_DIFF, "Prec:",  5,60,75,20, &G.scene->r.GIpixelspersample, 1, 50, 10, 10, "Maximum number of pixels without samples, the lower the better and slower");
1247
1298
                        if (G.scene->r.GIrefinement==0) G.scene->r.GIrefinement=1.0;
1248
 
                        uiDefButF(block, NUM, 0, "Refinement:", 5,35,154,20, &G.scene->r.GIrefinement, 0.001, 1.0, 1, 0, "Threshold to refine shadows EXPERIMENTAL. 1 = no refinement");
1249
 
                }
1250
 
                if (G.scene->r.GIphotons) 
1251
 
                {
1252
 
                        uiDefBut(block, LABEL, 0, "Photon parameters:", 170,105,130,20, 0, 1.0, 0, 0, 0, "");
1253
 
                        if(G.scene->r.GIphotoncount==0) G.scene->r.GIphotoncount=100000;
1254
 
                        uiDefButI(block, NUM, 0, "Count:", 170,85,140,20, &G.scene->r.GIphotoncount, 
1255
 
                                        0, 10000000, 10, 10, "Number of photons to shoot");
1256
 
                        if(G.scene->r.GIphotonradius==0.0) G.scene->r.GIphotonradius=1.0;
1257
 
                        uiDefButF(block, NUMSLI, 0,"Radius:", 170,60,140,20,    &(G.scene->r.GIphotonradius), 
1258
 
                                        0.00001, 100.0 ,0,0, "Radius to search for photons to mix (blur)");
1259
 
                        if(G.scene->r.GImixphotons==0) G.scene->r.GImixphotons=100;
1260
 
                        uiDefButI(block, NUM, 0, "MixCount:", 170,35,140,20, &G.scene->r.GImixphotons, 
1261
 
                                        0, 1000, 10, 10, "Number of photons to shoot");
1262
 
                        uiDefButS(block,TOG|BIT|0, B_REDR, "Tune Photons",170,10,140,20, &G.scene->r.GIdirect, 
1263
 
                                        0, 0, 0, 0, "Show the photonmap directly in the render for tuning");
1264
 
                }
 
1299
                        uiDefButF(block, NUM, B_DIFF, "Ref:", 84,60,75,20, &G.scene->r.GIrefinement, 0.001, 1.0, 1, 0, "Threshold to refine shadows EXPERIMENTAL. 1 = no refinement");
 
1300
                }
 
1301
 
 
1302
                if (G.scene->r.GImethod==2) {
 
1303
                        if (G.scene->r.GIphotons)
 
1304
                        {
 
1305
                                uiDefBut(block, LABEL, 0, "Photon parameters:", 170,105,130,20, 0, 1.0, 0, 0, 0, "");
 
1306
                                if(G.scene->r.GIphotoncount==0) G.scene->r.GIphotoncount=100000;
 
1307
                                uiDefButI(block, NUM, B_DIFF, "Count:", 170,85,140,20, &G.scene->r.GIphotoncount, 
 
1308
                                                0, 10000000, 10, 10, "Number of photons to shoot");
 
1309
                                if(G.scene->r.GIphotonradius==0.0) G.scene->r.GIphotonradius=1.0;
 
1310
                                uiDefButF(block, NUMSLI, B_DIFF,"Radius:", 170,60,140,20,       &(G.scene->r.GIphotonradius), 
 
1311
                                                0.00001, 100.0 ,0,0, "Radius to search for photons to mix (blur)");
 
1312
                                if(G.scene->r.GImixphotons==0) G.scene->r.GImixphotons=100;
 
1313
                                uiDefButI(block, NUM, B_DIFF, "MixCount:", 170,35,140,20, &G.scene->r.GImixphotons, 
 
1314
                                                0, 1000, 10, 10, "Number of photons to mix");
 
1315
                                uiDefButS(block,TOG|BIT|0, B_REDR, "Tune Photons",170,10,140,20, &G.scene->r.GIdirect, 
 
1316
                                                0, 0, 0, 0, "Show the photonmap directly in the render for tuning");
 
1317
                        }
 
1318
                }
 
1319
 
1265
1320
        }
1266
1321
}
1267
1322
 
1277
1332
        // label to force a boundbox for buttons not to be centered
1278
1333
        uiDefBut(block, LABEL, 0, " ", 305,180,10,10, 0, 0, 0, 0, 0, "");
1279
1334
 
1280
 
        uiDefButF(block, NUMSLI, 0,"Bi ", 5,35,150,20,  &(G.scene->r.YF_raybias), 
 
1335
        uiDefButS(block,TOGN|BIT|0, B_REDR, "xml", 5,180,75,20, &G.scene->r.YFexportxml,
 
1336
                                        0, 0, 0, 0, "Export to an xml file and call yafray instead of plugin");
 
1337
 
 
1338
        uiDefButF(block, NUMSLI, B_DIFF,"Bi ", 5,35,150,20,     &(G.scene->r.YF_raybias), 
1281
1339
                                0.0, 10.0 ,0,0, "Shadow ray bias to avoid self shadowing");
1282
 
  uiDefButI(block, NUM, 0, "Raydepth ", 5,60,150,20,
 
1340
        uiDefButI(block, NUM, B_DIFF, "Raydepth ", 5,60,150,20,
1283
1341
                                &G.scene->r.YF_raydepth, 1.0, 80.0, 10, 10, "Maximum render ray depth from the camera");
1284
 
        uiDefButF(block, NUMSLI, 0, "Gam ", 5,10,150,20, &G.scene->r.YF_gamma, 0.001, 5.0, 0, 0, "Gamma correction, 1 is off");
1285
 
        uiDefButF(block, NUMSLI, 0, "Exp ", 160,10,150,20,&G.scene->r.YF_exposure, 0.0, 10.0, 0, 0, "Exposure adjustment, 0 is off");
 
1342
        uiDefButF(block, NUMSLI, B_DIFF, "Gam ", 5,10,150,20, &G.scene->r.YF_gamma, 0.001, 5.0, 0, 0, "Gamma correction, 1 is off");
 
1343
        uiDefButF(block, NUMSLI, B_DIFF, "Exp ", 160,10,150,20,&G.scene->r.YF_exposure, 0.0, 10.0, 0, 0, "Exposure adjustment, 0 is off");
1286
1344
        
1287
 
  uiDefButI(block, NUM, 0, "Processors:", 160,35,150,20,
1288
 
                                &G.scene->r.YF_numprocs, 1.0, 8.0, 10, 10, "Number of processors to use");
 
1345
        uiDefButI(block, NUM, B_DIFF, "Processors:", 160,60,150,20, &G.scene->r.YF_numprocs, 1.0, 8.0, 10, 10, "Number of processors to use");
1289
1346
 
1290
1347
        /*AA Settings*/
1291
 
        uiDefButS(block,TOGN|BIT|0, B_REDR, "Auto AA",5,110,150,20, &G.scene->r.YF_AA, 
 
1348
        uiDefButS(block,TOGN|BIT|0, B_REDR, "Auto AA", 5,140,150,20, &G.scene->r.YF_AA, 
1292
1349
                                        0, 0, 0, 0, "Set AA using OSA and GI quality, disable for manual control");
 
1350
        uiDefButS(block, TOGN|BIT|0, B_DIFF, "Clamp RGB", 160,140,150,20, &G.scene->r.YF_clamprgb, 1.0, 8.0, 10, 10, "For AA on fast high contrast changes. Not advisable for Bokeh! Dulls lens shape detail.");
1293
1351
        if(G.scene->r.YF_AA){
1294
 
                uiDefButI(block, NUM, 0, "AA Passes ", 5,85,150,20,
1295
 
                                &G.scene->r.YF_AApasses, 0, 64, 10, 10, "AA Passes");
1296
 
            uiDefButI(block, NUM, 0, "AA Samples ", 160,85,150,20,
1297
 
                                &G.scene->r.YF_AAsamples, 0, 2048, 10, 10, "AA Samples");
 
1352
                uiDefButI(block, NUM, B_DIFF, "AA Passes ", 5,115,150,20, &G.scene->r.YF_AApasses, 0, 64, 10, 10, "Number of AA passes (0 is no AA)");
 
1353
                uiDefButI(block, NUM, B_DIFF, "AA Samples ", 160,115,150,20, &G.scene->r.YF_AAsamples, 0, 2048, 10, 10, "Number of samples per pass");
 
1354
                uiDefButF(block, NUMSLI, B_DIFF, "Psz ", 5,90,150,20, &G.scene->r.YF_AApixelsize, 1.0, 2.0, 0, 0, "AA pixel filter size");
 
1355
                uiDefButF(block, NUMSLI, B_DIFF, "Thr ", 160,90,150,20, &G.scene->r.YF_AAthreshold, 0.000001, 1.0, 0, 0, "AA threshold");
1298
1356
        }
1299
1357
}
1300
1358
 
 
1359
#if 0
 
1360
static void render_panel_sfx(void)
 
1361
{
 
1362
        uiBlock *block;
 
1363
        
 
1364
        block= uiNewBlock(&curarea->uiblocks, "editing_panel_camera_dof", UI_EMBOSS, UI_HELV, curarea->win);
 
1365
        uiNewPanelTabbed("Output", "Render");
 
1366
        if(uiNewPanel(curarea, block, "Post Effects", "Render", 320, 0, 318, 204)==0) return;
 
1367
        
 
1368
        uiBlockBeginAlign(block);
 
1369
        uiDefButI(block, TOG|BIT|20,B_SET_ZBLUR,"Zblur",        10,180,140,20,&G.scene->r.mode,0,0, 0, 0, "Apply blur based on depth values in z-buffer");
 
1370
        uiDefButF(block, NUM,B_DIFF, "ZMin:",           10,160,140,20, &G.scene->r.zmin, 0.0, 1.0, 0, 0, "Specify the start distance with maximum blur");                               
 
1371
        uiDefButF(block, NUM,B_DIFF, "Focus:",          10,140,140,20, &G.scene->r.focus, 0.0, 1.0, 0, 0, "Specify the focus distance (not blurred)");
 
1372
        uiDefButF(block, NUM,B_DIFF, "Blur:",           10,120,140,20, &G.scene->r.zblur, 1.0, 100.0, 0, 0, "Specify the maximum blur radius"); 
 
1373
        uiDefButF(block, NUM,B_DIFF, "Gamma:",          10,100,140,20, &G.scene->r.zgamma, 0.05, 2.0, 0, 0, "Use Gamma corrected addition of colors");
 
1374
        uiDefButF(block, NUM,B_DIFF, "Sigma:",          10,80,140,20, &G.scene->r.zsigma, 1.0, 20.0, 0, 0, "Filter type control, higher value is stronger gaussian");
 
1375
        
 
1376
        /* Toon shading buttons */
 
1377
        uiBlockBeginAlign(block);
 
1378
        uiDefButI(block, TOG|BIT|5, B_SET_EDGE, "Edge", 160, 180, 150, 20, &G.scene->r.mode, 0, 0, 0, 0, "Enable Toon edge shading");
 
1379
        uiDefBlockBut(block, edge_render_menu, NULL, "Edge Settings", 160, 160, 150, 20, "Display edge settings");
 
1380
        
 
1381
        /* postprocess render buttons */
 
1382
        uiBlockBeginAlign(block);
 
1383
        if(R.rectftot)
 
1384
                uiDefIconTextButI(block, TOG|BIT|18, B_NOP, ICON_IMAGE_DEHLT," Fbuf", 160, 130, 150, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render; buffer available");
 
1385
        else
 
1386
                uiDefButI(block, TOG|BIT|18, 0,"Fbuf",          160, 130, 150, 20, &G.scene->r.mode, 0, 0, 0, 0, "Keep RGBA float buffer after render, no buffer available now");
 
1387
        uiDefBlockBut(block, post_render_menu, NULL, "Post process", 160, 110, 150, 20, "Applies on RGBA floats while render or with Fbuf available");
 
1388
        uiBlockEndAlign(block);
 
1389
        
 
1390
        /* Dither control */
 
1391
        uiDefButF(block, NUM,B_DIFF, "Dither:",                 160,80,150,20, &G.scene->r.dither_intensity, 0.0, 2.0, 0, 0, "The amount of dithering noise present in the output image (0.0 = no dithering)");
 
1392
        
 
1393
}
 
1394
#endif
 
1395
 
1301
1396
 
1302
1397
void render_panels()
1303
1398
{
1304
1399
 
1305
1400
        render_panel_output();
 
1401
//      render_panel_sfx();
1306
1402
        render_panel_render();
1307
1403
        render_panel_anim();
1308
1404
        render_panel_format();
1311
1407
                if (G.scene->r.YF_gamma==0.0) G.scene->r.YF_gamma=1.0;
1312
1408
                if (G.scene->r.YF_raybias==0.0) G.scene->r.YF_raybias=0.001;
1313
1409
                if (G.scene->r.YF_raydepth==0) G.scene->r.YF_raydepth=5;
 
1410
                if (G.scene->r.YF_AApixelsize==0.0) G.scene->r.YF_AApixelsize=1.5;
 
1411
                if (G.scene->r.YF_AAthreshold==0.0) G.scene->r.YF_AAthreshold=0.05;
 
1412
                if (G.scene->r.GIpower==0.0) G.scene->r.GIpower=1.0;
 
1413
                if (G.scene->r.GIindirpower==0.0) G.scene->r.GIindirpower=1.0;
1314
1414
                render_panel_yafrayGlobal();
1315
1415
                render_panel_yafrayGI();
1316
1416
        }
1326
1426
        block= uiNewBlock(&curarea->uiblocks, "anim_panel", UI_EMBOSS, UI_HELV, curarea->win);
1327
1427
        if(uiNewPanel(curarea, block, "Anim", "Anim", 0, 0, 318, 204)==0) return;
1328
1428
 
1329
 
        uiDefButS(block, NUM,REDRAWSEQ,"Sta:",  320,17,93,27,&G.scene->r.sfra,1.0,18000.0, 0, 0, "Specify the start frame of the animation");
1330
 
        uiDefButS(block, NUM,REDRAWSEQ,"End:",  416,17,95,27,&G.scene->r.efra,1.0,18000.0, 0, 0, "Specify the end frame of the animation");
1331
 
 
1332
 
        uiDefButS(block, NUM,B_FRAMEMAP,"Map Old:",     320,69,93,22,&G.scene->r.framapto,1.0,900.0, 0, 0, "Specify old map value in frames");
1333
 
        uiDefButS(block, NUM,B_FRAMEMAP,"Map New:",     416,69,95,22,&G.scene->r.images,1.0,900.0, 0, 0, "Specify new map value in frames");
1334
 
 
1335
 
        uiDefButS(block, NUM,REDRAWSEQ,"Frs/sec:",   320,47,93,19, &G.scene->r.frs_sec, 1.0, 120.0, 100.0, 0, "Frames per second");
1336
 
 
1337
 
        uiDefButS(block, TOG|BIT|1, B_SOUND_CHANGED, "Sync",    416,47,95,19, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
 
1429
        uiBlockBeginAlign(block);
 
1430
        uiDefButS(block, NUM,B_FRAMEMAP,"Map Old:",     10,160,150,20,&G.scene->r.framapto,1.0,900.0, 0, 0, "Specify old mapping value in frames");
 
1431
        uiDefButS(block, NUM,B_FRAMEMAP,"Map New:",     160,160,150,20,&G.scene->r.images,1.0,900.0, 0, 0, "Specify how many frames the Map Old will last");
 
1432
 
 
1433
        uiBlockBeginAlign(block);
 
1434
        uiDefButS(block, NUM,B_FRAMEMAP,"Frs/sec:",  10,130,150,20, &G.scene->r.frs_sec, 1.0, 120.0, 100.0, 0, "Frames per second");
 
1435
        uiDefButS(block, TOG|BIT|1, B_SOUND_CHANGED, "Sync",160,130,150,20, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
 
1436
        
 
1437
        uiBlockBeginAlign(block);
 
1438
        uiDefButS(block, NUM,REDRAWSEQ,"Sta:",  10,100,150,20,&G.scene->r.sfra,1.0,MAXFRAMEF, 0, 0, "Specify the start frame of the animation");
 
1439
        uiDefButS(block, NUM,REDRAWSEQ,"End:",  160,100,150,20,&G.scene->r.efra,1.0,MAXFRAMEF, 0, 0, "Specify the end frame of the animation");
 
1440
 
1338
1441
 
1339
1442
 
1340
1443
}
1346
1449
        bSound *sound;
1347
1450
 
1348
1451
        sound = G.buts->lockpoin;
1349
 
        if ((sound) && (sound->flags & SOUND_FLAGS_SEQUENCE)) sound = NULL;
1350
1452
 
1351
1453
        sound_panel_sound(sound);
1352
1454
        sound_panel_listener();