if(id) {
if(GS(id->name)==ID_SCE)
strcpy(text, "SCE: ");
- else if(GS(id->name)==ID_SCE)
+ else if(GS(id->name)==ID_SCR)
strcpy(text, "SCR: ");
else if(GS(id->name)==ID_MA && ((Material*)id)->use_nodes)
strcpy(text, "NT: ");
camera= scene->camera;
}
- if(scene && have_seq==FALSE && camera==NULL) {
+ if(have_seq==FALSE && camera==NULL) {
scene->r.cfra= oldcfra;
return NULL;
}
}
} else if (bhead->code==ENDB) {
break;
- } else if (bhead->code==DATA) {
- /* DATA blocks between IDBlock and Preview */
} else {
looking = 0;
new_prv = NULL;
}
else if(act->type==ACT_OBJECT) {
bObjectActuator *oa= act->data;
- oa->reference= newlibadr(fd, ob->id.lib, oa->reference);
+ if(oa==NULL) {
+ init_actuator(act);
+ }
+ else {
+ oa->reference= newlibadr(fd, ob->id.lib, oa->reference);
+ }
}
else if(act->type==ACT_EDIT_OBJECT) {
bEditObjectActuator *eoa= act->data;
eoa->me= newlibadr(fd, ob->id.lib, eoa->me);
}
}
- else if(act->type==ACT_OBJECT) {
- bObjectActuator *oa= act->data;
- if(oa==NULL) {
- init_actuator(act);
- }
- else {
- oa->reference= newlibadr(fd, ob->id.lib, oa->reference);
- }
- }
else if(act->type==ACT_SCENE) {
bSceneActuator *sa= act->data;
sa->camera= newlibadr(fd, ob->id.lib, sa->camera);
ima->gen_x= 256; ima->gen_y= 256;
ima->gen_type= 1;
- if(0==strncmp(ima->id.name+2, "Viewer Node", sizeof(ima->id.name+2))) {
+ if(0==strncmp(ima->id.name+2, "Viewer Node", sizeof(ima->id.name)-2)) {
ima->source= IMA_SRC_VIEWER;
ima->type= IMA_TYPE_COMPOSITE;
}
- if(0==strncmp(ima->id.name+2, "Render Result", sizeof(ima->id.name+2))) {
+ if(0==strncmp(ima->id.name+2, "Render Result", sizeof(ima->id.name)-2)) {
ima->source= IMA_SRC_VIEWER;
ima->type= IMA_TYPE_R_RESULT;
}
}
-void ui_dropshadow(rctf *rct, float radius, float aspect, int select)
+void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select))
{
int i;
float rad;
rad= radius;
i= 12;
- if(select) a= i*aspect; else a= i*aspect;
+#if 0
+ if(select) {
+ a= i*aspect; /* same as below */
+ }
+ else
+#endif
+ {
+ a= i*aspect;
+
+ }
+
for(; i--; a-=aspect) {
/* alpha ranges from 2 to 20 or so */
glColor4ub(0, 0, 0, alpha);
tempf= data->value;
temp= (int)data->value;
-
- /* XXX useles "if", same result for f, uh??? */
- if(but->type==SLI) f= (float)(mx-but->x1)/(but->x2-but->x1);
- else f= (float)(mx- but->x1)/(but->x2-but->x1);
+
+#if 0
+ if(but->type==SLI) {
+ f= (float)(mx-but->x1)/(but->x2-but->x1); /* same as below */
+ }
+ else
+#endif
+ {
+ f= (float)(mx- but->x1)/(but->x2-but->x1);
+ }
f= softmin + f*softrange;
bDopeSheet ads= {NULL};
DLRBT_Tree keys;
ActKeyColumn *ak;
- float cfra= (scene)? (float)(CFRA) : 0.0f;
+ float cfra;
short next= RNA_boolean_get(op->ptr, "next");
short done = 0;
/* sanity checks */
if (scene == NULL)
return OPERATOR_CANCELLED;
-
+
+ cfra= (float)(CFRA);
+
/* init binarytree-list for getting keyframes */
BLI_dlrbTree_init(&keys);
/* populate tree with keyframe nodes */
- if (scene)
- scene_to_keylist(&ads, scene, &keys, NULL);
+ scene_to_keylist(&ads, scene, &keys, NULL);
+
if (ob)
ob_to_keylist(&ads, ob, &keys, NULL);
sound_seek_scene(C);
- WM_event_add_notifier(C, NC_SCENE|ND_FRAME, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
return OPERATOR_FINISHED;
}
return ICON_FILE_MOVIE;
else if (file->flags & PYSCRIPTFILE)
return ICON_FILE_SCRIPT;
- else if (file->flags & PYSCRIPTFILE)
- return ICON_FILE_SCRIPT;
else if (file->flags & SOUNDFILE)
return ICON_FILE_SOUND;
else if (file->flags & FTFONTFILE)
return ICON_FILE_MOVIE;
else if (type == PYSCRIPTFILE)
return ICON_FILE_SCRIPT;
- else if (type == PYSCRIPTFILE)
- return ICON_FILE_SCRIPT;
else if (type == SOUNDFILE)
return ICON_FILE_SOUND;
else if (type == FTFONTFILE)
UI_view2d_to_region_no_clip(t->view, v[0], v[1], adr, adr+1);
}
else if(t->spacetype == SPACE_ACTION) {
- SpaceAction *sact = t->sa->spacedata.first;
int out[2] = {0, 0};
+#if 0
+ SpaceAction *sact = t->sa->spacedata.first;
if (sact->flag & SACTION_DRAWTIME) {
//vec[0] = vec[0]/((t->scene->r.frs_sec / t->scene->r.frs_sec_base));
-
+ /* same as below */
UI_view2d_to_region_no_clip((View2D *)t->view, vec[0], vec[1], out, out+1);
}
- else {
+ else
+#endif
+ {
UI_view2d_to_region_no_clip((View2D *)t->view, vec[0], vec[1], out, out+1);
}
*/
if ((saction->flag & SACTION_MARKERS_MOVE) && (cancelled == 0)) {
if (t->mode == TFM_TIME_TRANSLATE) {
- if (ELEM(t->frame_side, 'L', 'R')) /* TFM_TIME_EXTEND */
+#if 0
+ if (ELEM(t->frame_side, 'L', 'R')) { /* TFM_TIME_EXTEND */
+ /* same as below */
ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->vec[0], t->frame_side);
+ }
else /* TFM_TIME_TRANSLATE */
+#endif
+ {
ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->vec[0], t->frame_side);
+ }
}
else if (t->mode == TFM_TIME_SCALE) {
ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->vec[0], t->frame_side);
/* use doubles here, to make sure a "1.0" (no rotation) doesnt become 9.999999e-01, which gives 0.02 for acos */
double deler = ((dx1*dx1+dy1*dy1)+(dx2*dx2+dy2*dy2)-(dx3*dx3+dy3*dy3))
- / (2.0 * (A*B?A*B:1.0));
- /* (A*B?A*B:1.0f) this takes care of potential divide by zero errors */
+ / (2.0 * ((A*B)?(A*B):1.0));
+ /* ((A*B)?(A*B):1.0) this takes care of potential divide by zero errors */
float dphi;
}
else { /* add or sub */
if(mtex->blendtype==MTEX_SUB) factt= -factt;
- else factt= factt;
shi->displace[0]+= factt*shi->vn[0];
shi->displace[1]+= factt*shi->vn[1];
shi->displace[2]+= factt*shi->vn[2];