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>2010-11-11 13:07:33 +0300
committerJoshua Leung <aligorith@gmail.com>2010-11-11 13:07:33 +0300
commite3db157074cf8da508cde24b313acb6520194b93 (patch)
treeee4dfaf27f3f9bf9ba7f310dde92c85c6170485a /source/blender/blenkernel/intern/nla.c
parent7d80a4a067c34b176322b136171678e6886d3b57 (diff)
NLA Transform Bugfix:
Transforming strips into locked tracks meant that they were not unlocked properly (i.e. they stayed as temporary "meta" strips). This is now taken into account as part of the step which checks if there's any space for them in those tracks.
Diffstat (limited to 'source/blender/blenkernel/intern/nla.c')
-rw-r--r--source/blender/blenkernel/intern/nla.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 910de5c6763..5996bdc9f9a 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -916,9 +916,14 @@ void BKE_nlatrack_set_active (ListBase *tracks, NlaTrack *nlt_a)
/* Check if there is any space in the given track to add a strip of the given length */
short BKE_nlatrack_has_space (NlaTrack *nlt, float start, float end)
{
- /* sanity checks */
- if ((nlt == NULL) || IS_EQ(start, end))
+ /* sanity checks
+ * - track must exist
+ * - track must be editable
+ * - bounds cannot be equal (0-length is nasty)
+ */
+ if ((nlt == NULL) || (nlt->flag & NLATRACK_PROTECTED) || IS_EQ(start, end))
return 0;
+
if (start > end) {
puts("BKE_nlatrack_has_space() error... start and end arguments swapped");
SWAP(float, start, end);