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>2008-09-22 08:30:21 +0400
committerJoshua Leung <aligorith@gmail.com>2008-09-22 08:30:21 +0400
commitc57f32733a7c46020254ff3d15567615dbe40adf (patch)
tree500d08041b282d58bc072138b0fe7a72b60752e7
parent8fcac6820af048a5c03f41e8f5f40cecf6a67684 (diff)
Bugfix - Long Keyframes:
In a A___B|---|B situation created by duplicating the B keyframe, the long keyframe between the 'B' keyframes was not showing up until the A keyframe was already duplicated. Reverting the 'optimisation' applied there (i.e. searching from last block, as that's where most blocks would be added) Also removed some unused lines from gpencil.c
-rw-r--r--source/blender/src/drawaction.c23
-rw-r--r--source/blender/src/gpencil.c2
2 files changed, 14 insertions, 11 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index f36719a1c9c..dfbe17179a4 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -1455,8 +1455,11 @@ static void add_bezt_to_keyblockslist(ListBase *blocks, IpoCurve *icu, int index
if (IS_EQ(beztn->vec[1][1], beztn->vec[0][1])==0) return;
if (IS_EQ(prev->vec[1][1], prev->vec[2][1])==0) return;
- /* try to find a keyblock that starts on the previous beztriple */
- for (ab= blocks->last; ab; ab= ab->prev) {
+ /* try to find a keyblock that starts on the previous beztriple
+ * Note: we can't search from end to try to optimise this as it causes errors there's
+ * an A ___ B |---| B situation
+ */
+ for (ab= blocks->first; ab; ab= ab->next) {
/* check if alter existing block or add new block */
if (ab->start == prev->vec[1][0]) {
/* set selection status and 'touched' status */
@@ -1470,7 +1473,7 @@ static void add_bezt_to_keyblockslist(ListBase *blocks, IpoCurve *icu, int index
/* add new block */
abn= MEM_callocN(sizeof(ActKeyBlock), "ActKeyBlock");
- if (ab) BLI_insertlinkafter(blocks, ab, abn);
+ if (ab) BLI_insertlinkbefore(blocks, ab, abn);
else BLI_addtail(blocks, abn);
abn->start= prev->vec[1][0];
@@ -1768,13 +1771,14 @@ void icu_to_keylist(IpoCurve *icu, ListBase *keys, ListBase *blocks, ActKeysInc
ak->modified = 0;
ak->totcurve += 1;
}
+
+ if (ak == ak2)
+ break;
+
if (ak2->modified) {
ak2->modified = 0;
ak2->totcurve += 1;
}
-
- if (ak == ak2)
- break;
}
}
if (blocks) {
@@ -1783,13 +1787,14 @@ void icu_to_keylist(IpoCurve *icu, ListBase *keys, ListBase *blocks, ActKeysInc
ab->modified = 0;
ab->totcurve += 1;
}
+
+ if (ab == ab2)
+ break;
+
if (ab2->modified) {
ab2->modified = 0;
ab2->totcurve += 1;
}
-
- if (ab == ab2)
- break;
}
}
}
diff --git a/source/blender/src/gpencil.c b/source/blender/src/gpencil.c
index e51636b6748..9245d2f95f3 100644
--- a/source/blender/src/gpencil.c
+++ b/source/blender/src/gpencil.c
@@ -993,10 +993,8 @@ void gpencil_convert_menu (void)
/* Hardcoded sensitivity thresholds... */
/* minimum number of pixels mouse should move before new point created */
-//#define MIN_MANHATTEN_PX 3
#define MIN_MANHATTEN_PX U.gp_manhattendist
/* minimum length of new segment before new point can be added */
-//#define MIN_EUCLIDEAN_PX 20
#define MIN_EUCLIDEAN_PX U.gp_euclideandist
/* ------ */