[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [10841] trunk/blender/source/blender: == NLA Editor ==

Joshua Leung aligorith at gmail.com
Fri Jun 1 12:38:17 CEST 2007


Revision: 10841
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10841
Author:   aligorith
Date:     2007-06-01 12:38:17 +0200 (Fri, 01 Jun 2007)

Log Message:
-----------
== NLA Editor ==

When adding a new Action Strip to an Object which didn't have any Action Strips previously, NLA-override mode is turned on by default for that object (the Action/NLA-icon beside the expand/collapse triangle).

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/nla.c
    trunk/blender/source/blender/src/editnla.c

Modified: trunk/blender/source/blender/blenkernel/intern/nla.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/nla.c	2007-06-01 09:20:46 UTC (rev 10840)
+++ trunk/blender/source/blender/blenkernel/intern/nla.c	2007-06-01 10:38:17 UTC (rev 10841)
@@ -141,7 +141,10 @@
 	//set_active_strip(ob, nstrip); /* is in editnla as does UI calls */
 			
 	nstrip->repeat = 1.0;
-							
+
+	if(ob->nlastrips.first == NULL)
+		ob->nlaflag |= OB_NLA_OVERRIDE;
+	
 	BLI_addtail(&ob->nlastrips, nstrip);
 	return nstrip; /* is created, malloced etc. here so is safe to just return the pointer?
 			  this is needed for setting this active in UI, and probably useful for API too */

Modified: trunk/blender/source/blender/src/editnla.c
===================================================================
--- trunk/blender/source/blender/src/editnla.c	2007-06-01 09:20:46 UTC (rev 10840)
+++ trunk/blender/source/blender/src/editnla.c	2007-06-01 10:38:17 UTC (rev 10841)
@@ -526,6 +526,9 @@
 	if(strip->object)
 		id_lib_extern(&strip->object->id);	/* checks lib data, sets correct flag for saving then */
 
+	if(ob->nlastrips.first == NULL)
+		ob->nlaflag |= OB_NLA_OVERRIDE;
+	
 	BLI_addtail(&ob->nlastrips, strip);
 
 	BIF_undo_push("Add NLA strip");
@@ -580,6 +583,9 @@
 	
 	act->id.us++;
 	
+	if(ob->nlastrips.first == NULL)
+		ob->nlaflag |= OB_NLA_OVERRIDE;
+		
 	BLI_addtail(&ob->nlastrips, strip);
 }
 





More information about the Bf-blender-cvs mailing list