Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2011-11-06 09:46:45 +0400
committerJoshua Leung <aligorith@gmail.com>2011-11-06 09:46:45 +0400
commit440c1c2c1745b6d4acd13f405643100cb913fb3b (patch)
tree79a6621f6a76b887b3aa78645758d214b5654a04 /source/blender/editors
parent4c17f8e5de94f3abc65995e7a2964bb9e6ea7642 (diff)
As discussed on the mailing list, removing the non-functional,
incompatible, and unmaintainable Time Offset cruft. - Slow Parenting lives another day (just), although it now carries appropriate cautionary disclaimers. It's only really for the Game Engine nowadays, as that's the only place where it can possibly work with any reliability. - "Animation Hacks" panel is now "Relations Extras". I could've merged the two panels, though I figured these options weren't that frequently used to justify taking up screen-space by default along with the panel
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_draw.c22
-rw-r--r--source/blender/editors/animation/keyframing.c28
-rw-r--r--source/blender/editors/include/ED_anim_api.h4
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c82
5 files changed, 4 insertions, 134 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 2774bd2cda4..569125e1055 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -237,28 +237,6 @@ void ANIM_draw_cfra (const bContext *C, View2D *v2d, short flag)
glVertex2fv(vec);
glEnd();
- /* Draw dark green line if slow-parenting/time-offset is enabled */
- if (flag & DRAWCFRA_SHOW_TIMEOFS) {
- Object *ob= OBACT;
- if(ob) {
- float timeoffset= give_timeoffset(ob);
- // XXX ob->ipoflag is depreceated!
- if ((ob->ipoflag & OB_OFFS_OB) && (timeoffset != 0.0f)) {
- vec[0]-= timeoffset; /* could avoid calling twice */
-
- UI_ThemeColorShade(TH_CFRAME, -30);
-
- glBegin(GL_LINE_STRIP);
- /*vec[1]= v2d->cur.ymax;*/ // this is set already. this line is only included
- glVertex2fv(vec);
-
- vec[1]= v2d->cur.ymin;
- glVertex2fv(vec);
- glEnd();
- }
- }
- }
-
glLineWidth(1.0);
/* Draw current frame number in a little box */
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index fb34245d338..9f466ef52d3 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -911,20 +911,6 @@ short insert_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
/* apply NLA-mapping to frame to use (if applicable) */
cfra= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
}
-
-#if 0
- /* apply special time tweaking */
- // XXX check on this stuff...
- if (GS(id->name) == ID_OB) {
- //Object *ob= (Object *)id;
-
- /* ancient time-offset cruft */
- //if ( (ob->ipoflag & OB_OFFS_OB) && (give_timeoffset(ob)) ) {
- // /* actually frametofloat calc again! */
- // cfra-= give_timeoffset(ob)*scene->r.framelen;
- //}
- }
-#endif
/* key entire array convenience method */
if (array_index == -1) {
@@ -1018,20 +1004,6 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro
}
}
-#if 0
- /* apply special time tweaking */
- // XXX check on this stuff...
- if (GS(id->name) == ID_OB) {
- //Object *ob= (Object *)id;
-
- /* ancient time-offset cruft */
- //if ( (ob->ipoflag & OB_OFFS_OB) && (give_timeoffset(ob)) ) {
- // /* actually frametofloat calc again! */
- // cfra-= give_timeoffset(ob)*scene->r.framelen;
- //}
- }
-#endif
-
/* key entire array convenience method */
if (array_index == -1) {
array_index= 0;
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 0ac5a9e46ce..6b449f68e1d 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -462,10 +462,8 @@ enum {
DRAWCFRA_SHOW_NUMBOX = (1<<0),
/* time indication in seconds or frames */
DRAWCFRA_UNIT_SECONDS = (1<<1),
- /* show time-offset line */
- DRAWCFRA_SHOW_TIMEOFS = (1<<2),
/* draw indicator extra wide (for timeline) */
- DRAWCFRA_WIDE = (1<<3)
+ DRAWCFRA_WIDE = (1<<2)
} eAnimEditDraw_CurrentFrame;
/* main call to draw current-frame indicator in an Animation Editor */
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index e9575c85c5f..94e2f0aae00 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -655,7 +655,7 @@ static int parent_set_exec(bContext *C, wmOperator *op)
data = con->data;
data->tar = par;
- get_constraint_target_matrix(scene, con, 0, CONSTRAINT_OBTYPE_OBJECT, NULL, cmat, scene->r.cfra - give_timeoffset(ob));
+ get_constraint_target_matrix(scene, con, 0, CONSTRAINT_OBTYPE_OBJECT, NULL, cmat, scene->r.cfra);
sub_v3_v3v3(vec, ob->obmat[3], cmat[3]);
ob->loc[0] = vec[0];
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 987c3984b77..da33f48116d 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -5748,7 +5748,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
Object *ob;
Curve *cu;
RegionView3D *rv3d= ar->regiondata;
- //float cfraont;
float vec1[3], vec2[3];
unsigned int col=0;
int /*sel, drawtype,*/ colindex= 0;
@@ -5787,83 +5786,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
/* no return after this point, otherwise leaks */
view3d_cached_text_draw_begin();
-
- /* draw keys? */
-#if 0 // XXX old animation system
- if(base==(scene->basact) || (base->flag & (SELECT+BA_WAS_SEL))) {
- if(flag==0 && warning_recursive==0 && ob!=scene->obedit) {
- if(ob->ipo && ob->ipo->showkey && (ob->ipoflag & OB_DRAWKEY)) {
- ListBase elems;
- CfraElem *ce;
- float temp[7][3];
-
- warning_recursive= 1;
-
- elems.first= elems.last= 0;
- // warning: no longer checks for certain ob-keys only... (so does this need to use the proper ipokeys then?)
- make_cfra_list(ob->ipo, &elems);
-
- cfraont= (scene->r.cfra);
- drawtype= v3d->drawtype;
- if(drawtype>OB_WIRE) v3d->drawtype= OB_WIRE;
- sel= base->flag;
- memcpy(temp, &ob->loc, 7*3*sizeof(float));
-
- ipoflag= ob->ipoflag;
- ob->ipoflag &= ~OB_OFFS_OB;
-
- set_no_parent_ipo(1);
- disable_speed_curve(1);
-
- if ((ob->ipoflag & OB_DRAWKEYSEL)==0) {
- ce= elems.first;
- while(ce) {
- if(!ce->sel) {
- (scene->r.cfra)= ce->cfra/scene->r.framelen;
-
- base->flag= 0;
-
- where_is_object_time(scene, ob, (scene->r.cfra));
- draw_object(scene, ar, v3d, base, 0);
- }
- ce= ce->next;
- }
- }
-
- ce= elems.first;
- while(ce) {
- if(ce->sel) {
- (scene->r.cfra)= ce->cfra/scene->r.framelen;
-
- base->flag= SELECT;
-
- where_is_object_time(scene, ob, (scene->r.cfra));
- draw_object(scene, ar, v3d, base, 0);
- }
- ce= ce->next;
- }
-
- set_no_parent_ipo(0);
- disable_speed_curve(0);
-
- base->flag= sel;
- ob->ipoflag= ipoflag;
-
- /* restore icu->curval */
- (scene->r.cfra)= cfraont;
-
- memcpy(&ob->loc, temp, 7*3*sizeof(float));
- where_is_object(scene, ob);
- v3d->drawtype= drawtype;
-
- BLI_freelistN(&elems);
-
- warning_recursive= 0;
- }
- }
- }
-#endif // XXX old animation system
-
/* patch? children objects with a timeoffs change the parents. How to solve! */
/* if( ((int)ob->ctime) != F_(scene->r.cfra)) where_is_object(scene, ob); */
@@ -5921,7 +5843,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if(base->flag & (SELECT+BA_WAS_SEL)) {
/* uses darker active color for non-active + selected*/
theme_id= TH_GROUP_ACTIVE;
-
+
if(scene->basact != base) {
theme_shade= -16;
}
@@ -6510,7 +6432,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
for (ct= targets.first; ct; ct= ct->next) {
/* calculate target's matrix */
if (cti->get_target_matrix)
- cti->get_target_matrix(curcon, cob, ct, bsystem_time(scene, ob, (float)(scene->r.cfra), give_timeoffset(ob)));
+ cti->get_target_matrix(curcon, cob, ct, bsystem_time(scene, ob, (float)(scene->r.cfra), 0.0f));
else
unit_m4(ct->matrix);