[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14429] trunk/blender/source/blender: Ipo View Option - Loc View Area - stops using each ipo' s view area when changing ipo's.

Campbell Barton ideasman42 at gmail.com
Tue Apr 15 16:15:56 CEST 2008


Revision: 14429
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14429
Author:   campbellbarton
Date:     2008-04-15 16:15:56 +0200 (Tue, 15 Apr 2008)

Log Message:
-----------
Ipo View Option - Loc View Area - stops using each ipo's view area when changing ipo's.

Modified Paths:
--------------
    trunk/blender/source/blender/makesdna/DNA_space_types.h
    trunk/blender/source/blender/python/api2_2x/doc/Object.py
    trunk/blender/source/blender/src/editipo.c
    trunk/blender/source/blender/src/header_ipo.c

Modified: trunk/blender/source/blender/makesdna/DNA_space_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_space_types.h	2008-04-15 13:07:56 UTC (rev 14428)
+++ trunk/blender/source/blender/makesdna/DNA_space_types.h	2008-04-15 14:15:56 UTC (rev 14429)
@@ -526,6 +526,9 @@
 #define SI_SMOOTH_UV	1<<20
 #define SI_DRAW_STRETCH	1<<21
 
+/* SpaceIpo->flag */
+#define SIPO_LOCK_VIEW	1<<0
+
 /* SpaceText flags (moved from DNA_text_types.h) */
 
 #define ST_SCROLL_SELECT        0x0001 // scrollable

Modified: trunk/blender/source/blender/python/api2_2x/doc/Object.py
===================================================================
--- trunk/blender/source/blender/python/api2_2x/doc/Object.py	2008-04-15 13:07:56 UTC (rev 14428)
+++ trunk/blender/source/blender/python/api2_2x/doc/Object.py	2008-04-15 14:15:56 UTC (rev 14429)
@@ -417,7 +417,7 @@
 				empty_ob.setMatrix(dupe_matrix)
 			Blender.Redraw()
 	@type DupObjects: list of tuples containing (object, matrix)
-	@ivar enableNLAOverride: Whether the object uses NLA or active Action for animation.
+	@ivar enableNLAOverride: Whether the object uses NLA or active Action for animation. When True the NLA is used.
 	@type enableNLAOverride: boolean
 	@ivar enableDupVerts: The DupliVerts status of the object.
 		Does not indicate that this object has any dupliVerts,

Modified: trunk/blender/source/blender/src/editipo.c
===================================================================
--- trunk/blender/source/blender/src/editipo.c	2008-04-15 13:07:56 UTC (rev 14428)
+++ trunk/blender/source/blender/src/editipo.c	2008-04-15 14:15:56 UTC (rev 14429)
@@ -984,8 +984,8 @@
 	
 	if(G.sipo->ipo) {
 
-		if (G.sipo->pin)
-			rf= &(G.sipo->v2d.cur);
+		if (G.sipo->flag & SIPO_LOCK_VIEW || G.sipo->pin)
+			 rf= &(G.sipo->v2d.cur);
 		else
 			rf= &(G.sipo->ipo->cur);
 		
@@ -1202,7 +1202,7 @@
 		if(G.sipo->ipo != ipo) {
 			G.sipo->ipo= ipo;
 			/* if lock we don't copy from ipo, this makes the UI jump around confusingly */
-			if(G.v2d->flag & V2D_VIEWLOCK);
+			if(G.v2d->flag & V2D_VIEWLOCK || G.sipo->flag & SIPO_LOCK_VIEW);
 			else if(ipo) G.v2d->cur= ipo->cur;
 			doit= 1;
 		}

Modified: trunk/blender/source/blender/src/header_ipo.c
===================================================================
--- trunk/blender/source/blender/src/header_ipo.c	2008-04-15 13:07:56 UTC (rev 14428)
+++ trunk/blender/source/blender/src/header_ipo.c	2008-04-15 14:15:56 UTC (rev 14429)
@@ -745,6 +745,9 @@
 	case 11:
 		do_ipo_buttons(B_IPOVIEWCENTER);
 		break;
+	case 12:	
+		G.sipo->flag ^= SIPO_LOCK_VIEW;
+		break;
 	}
 }
 
@@ -765,7 +768,7 @@
 		uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Show Keys|K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
 	else
 		uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Show Keys|K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
-
+	
 	uiDefBut(block, SEPR, 0, "",        0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
 
 	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom Out|NumPad -", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
@@ -784,6 +787,11 @@
 	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center on Current Frame|Shift C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 10, "");
 	uiDefIconTextBut(block, BUTM, 1, (G.v2d->flag & V2D_VIEWLOCK)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT, 
 					 "Lock Time to Other Windows|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, "");
+	
+	if (G.sipo->flag & SIPO_LOCK_VIEW)
+		uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Lock View Area", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 12, "");
+	else
+		uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Lock View Area", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 12, "");
 
 	if (ei != NULL && (ei->flag & IPO_EDIT)) {
 		uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Move Current Frame to Selected|C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");





More information about the Bf-blender-cvs mailing list