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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2007-05-17 11:47:59 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517114759-yp4ybrnhp2u7pk66
Tags: 2.44-1
* New upstream release.
* Drop debian/patches/01_64bits_stupidity, not needed anymore: as of this
  version blender is 64 bits safe again. Adjust README.Debian accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: drawnla.c,v 1.42 2007/02/11 04:02:17 aligorith Exp $
 
2
 * $Id: drawnla.c,v 1.46 2007/05/05 10:07:05 aligorith Exp $
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
85
85
#include "butspace.h"
86
86
#include "mydevice.h"
87
87
 
88
 
#define TESTBASE_SAFE(base)     ((base)->flag & SELECT)
 
88
#define TESTBASE_SAFE(base)     ((base)->flag & SELECT && ((base)->object->restrictflag & OB_RESTRICT_VIEW)==0)
89
89
 
90
90
 
91
91
/* the left hand side with channels only */
579
579
        }
580
580
        
581
581
        uiBlockBeginAlign(block);
582
 
        uiDefButF(block, NUM, B_NLA_PANEL, "Blendin:",                          10,100,145,19, &strip->blendin, 0.0, strip->end-strip->start, 100, 0, "Number of frames of ease-in");
583
 
        uiDefButF(block, NUM, B_NLA_PANEL, "Blendout:",                         10,80,145,19, &strip->blendout, 0.0, strip->end-strip->start, 100, 0, "Number of frames of ease-out");
 
582
        uiDefButBitS(block, TOG, ACTSTRIP_AUTO_BLENDS, B_NLA_LOCK, "Auto-Blending", 10,100,145,19, &(strip->flag), 0, 0, 0, 0, "Toggles automatic calculation of blendin/out values");
 
583
        if (strip->flag & ACTSTRIP_AUTO_BLENDS) {
 
584
                char str[32];
 
585
                sprintf(str, "In: %.2f", strip->blendin);
 
586
                uiDefBut(block, LABEL, B_NOP, str,                      10,80,77,19, NULL, 0.0, 0.0, 0, 0, "Number of frames of ease-in");
 
587
                sprintf(str, "Out: %.2f", strip->blendout);
 
588
                uiDefBut(block, LABEL, B_NOP, str,                      77,80,78,19, NULL, 0.0, 0.0, 0, 0, "Number of frames of ease-out");
 
589
        }
 
590
        else {
 
591
                uiDefButF(block, NUM, B_NLA_PANEL, "In:",       10,80,77,19, &strip->blendin, 0.0, strip->end-strip->start, 100, 0, "Number of frames of ease-in");
 
592
                uiDefButF(block, NUM, B_NLA_PANEL, "Out:",      77,80,78,19, &strip->blendout, 0.0, strip->end-strip->start, 100, 0, "Number of frames of ease-out");
 
593
        }
584
594
        uiDefButBitS(block, TOG, ACTSTRIP_MUTE, B_NLA_PANEL, "Mute", 10,60,145,19, &strip->flag, 0, 0, 0, 0, "Toggles whether the strip contributes to the NLA solution");
585
595
        
586
596
        uiBlockBeginAlign(block);
640
650
                                uiDefButS(block, MENU, B_REDR, "All%x0|XY%x3|XZ%x2|YZ%x1",      140,-20,40,19, &amod->no_rot_axis, 0, 0, 0, 0, "Enable rotation axes (local for curve)");
641
651
                                uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_NLA_MOD_DEPS, "Ob:",    180,-20, 130, 19, &amod->ob, "Curve Object"); 
642
652
                        }
 
653
#if 0   /* this is not really ready for the primetime yet, but is here for testing */
 
654
                        else if(amod->type==ACTSTRIP_MOD_NOISE) {
 
655
                                but= uiDefBut(block, TEX, B_NLA_PANEL, "Chan:",                         10, -20, 130, 19, amod->channel, 1, 31, 0, 0, "Name of channel used for modifier");
 
656
                                uiButSetCompleteFunc(but, autocomplete_bone, (void *)ob);
 
657
                                uiDefButBitS(block, TOG, 1, B_NLA_PANEL, "L", 140, -20, 20, 19, &amod->channels, 0, 24, 0, 0, "Apply noise to Location of channel");
 
658
                                uiDefButBitS(block, TOG, 2, B_NLA_PANEL, "R", 160, -20, 20, 19, &amod->channels, 0, 24, 0, 0, "Apply noise to Rotation of channel");
 
659
                                uiDefButBitS(block, TOG, 4, B_NLA_PANEL, "S", 180, -20, 20, 19, &amod->channels, 0, 24, 0, 0, "Apply noise to Scaling of channel");
 
660
                                uiDefButF(block, NUM, B_NLA_PANEL, "NSize:",                    200,-20,55,19, &amod->noisesize, 0.0001, 2.0, 10, 0, "Sets scaling for noise input");
 
661
                                uiDefButF(block, NUM, B_NLA_PANEL, "Turb:",                     255,-20,55,19, &amod->turbul, 0.0, 200.0, 10, 0, "Sets the depth of the noise");
 
662
                        }
 
663
#endif
643
664
                        else
644
665
                                uiDefBut(block, LABEL, B_NOP, "Ack! Not implemented.",  10, -20, 150, 19, NULL, 0, 0, 0, 0, "");
645
666
                                
711
732
        /* the right hand side, with strips and keys */
712
733
        draw_nla_strips_keys(G.snla);
713
734
 
714
 
        /* Draw current frame */
 
735
        
715
736
        glViewport(ofsx+G.v2d->mask.xmin,  ofsy+G.v2d->mask.ymin, ( ofsx+G.v2d->mask.xmax-1)-(ofsx+G.v2d->mask.xmin)+1, ( ofsy+G.v2d->mask.ymax-1)-( ofsy+G.v2d->mask.ymin)+1); 
716
737
        glScissor(ofsx+G.v2d->mask.xmin,  ofsy+G.v2d->mask.ymin, ( ofsx+G.v2d->mask.xmax-1)-(ofsx+G.v2d->mask.xmin)+1, ( ofsy+G.v2d->mask.ymax-1)-( ofsy+G.v2d->mask.ymin)+1);
717
738
        myortho2 (G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax);
 
739
        
 
740
        /* Draw current frame */
718
741
        draw_cfra_action();
719
742
        
720
743
        /* draw markers */
721
744
        draw_markers_timespace();
 
745
        
 
746
        /* Draw preview 'curtains' */
 
747
        draw_anim_preview_timespace();
722
748
 
723
749
        /* Draw scroll */
724
750
        mywinset(curarea->win); // reset scissor too