~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to source/blender/editors/gpencil/gpencil_undo.c

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-04-28 12:11:12 UTC
  • mto: (14.1.6 experimental) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: package-import@ubuntu.com-20120428121112-2zi0vp8b6vejda8i
Tags: upstream-2.63
ImportĀ upstreamĀ versionĀ 2.63

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
 
70
70
        gpd_ptr= gpencil_data_get_pointers(C, NULL);
71
71
 
72
 
        if(step==1) {   /* undo */
 
72
        if (step==1) {  /* undo */
73
73
                //printf("\t\tGP - undo step\n");
74
 
                if(cur_node->prev) {
75
 
                        if(!name || strcmp(cur_node->name, name) == 0) {
 
74
                if (cur_node->prev) {
 
75
                        if (!name || strcmp(cur_node->name, name) == 0) {
76
76
                                cur_node= cur_node->prev;
77
77
                                new_gpd= cur_node->gpd;
78
78
                        }
80
80
        }
81
81
        else if (step==-1) {
82
82
                //printf("\t\tGP - redo step\n");
83
 
                if(cur_node->next) {
84
 
                        if(!name || strcmp(cur_node->name, name) == 0) {
 
83
                if (cur_node->next) {
 
84
                        if (!name || strcmp(cur_node->name, name) == 0) {
85
85
                                cur_node= cur_node->next;
86
86
                                new_gpd= cur_node->gpd;
87
87
                        }
88
88
                }
89
89
        }
90
90
 
91
 
        if(new_gpd) {
92
 
                if(gpd_ptr) {
93
 
                        if(*gpd_ptr) {
 
91
        if (new_gpd) {
 
92
                if (gpd_ptr) {
 
93
                        if (*gpd_ptr) {
94
94
                                bGPdata *gpd= *gpd_ptr;
95
95
                                bGPDlayer *gpl, *gpld;
96
96
 
124
124
 
125
125
        //printf("\t\tGP - undo push\n");
126
126
 
127
 
        if(cur_node) {
 
127
        if (cur_node) {
128
128
                /* remove all un-done nodes from stack */
129
129
                undo_node= cur_node->next;
130
130
 
131
 
                while(undo_node) {
 
131
                while (undo_node) {
132
132
                        bGPundonode *next_node= undo_node->next;
133
133
 
134
134
                        free_gpencil_data(undo_node->gpd);
153
153
{
154
154
        bGPundonode *undo_node= undo_nodes.first;
155
155
 
156
 
        while(undo_node) {
 
156
        while (undo_node) {
157
157
                free_gpencil_data(undo_node->gpd);
158
158
                MEM_freeN(undo_node->gpd);
159
159