[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38492] branches/soc-2011-tomato/source/ blender: Camera tracking integration

Sergey Sharybin g.ulairi at gmail.com
Mon Jul 18 21:39:03 CEST 2011


Revision: 38492
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38492
Author:   nazgul
Date:     2011-07-18 19:39:02 +0000 (Mon, 18 Jul 2011)
Log Message:
-----------
Camera tracking integration
===========================

- Sliding from preview could now be undone.
- Fixed memory leak caused by NULL-ing used scopes on
  layout restore.
- Fixed possible crash after splitting space clip.

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/editors/include/UI_interface.h
    branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c

Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c	2011-07-18 19:33:11 UTC (rev 38491)
+++ branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c	2011-07-18 19:39:02 UTC (rev 38492)
@@ -5248,7 +5248,6 @@
 
 					sclip->clip= restore_pointer_by_name(newmain, (ID *)sclip->clip, 1);
 
-					sclip->scopes.track_preview = NULL;
 					sclip->scopes.ok = 0;
 				}
 			}

Modified: branches/soc-2011-tomato/source/blender/editors/include/UI_interface.h
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/include/UI_interface.h	2011-07-18 19:33:11 UTC (rev 38491)
+++ branches/soc-2011-tomato/source/blender/editors/include/UI_interface.h	2011-07-18 19:39:02 UTC (rev 38492)
@@ -220,19 +220,19 @@
 #define TOGBUT		(37<<9)
 #define OPTION		(38<<9)
 #define OPTIONN		(39<<9)
+#define TRACKPREVIEW	(40<<9)
 		/* buttons with value >= SEARCH_MENU don't get undo pushes */
-#define SEARCH_MENU	(40<<9)
-#define BUT_EXTRA	(41<<9)
-#define HSVCIRCLE	(42<<9)
-#define LISTBOX		(43<<9)
-#define LISTROW		(44<<9)
-#define HOTKEYEVT	(45<<9)
-#define BUT_IMAGE	(46<<9)
-#define HISTOGRAM	(47<<9)
-#define WAVEFORM	(48<<9)
-#define VECTORSCOPE	(49<<9)
-#define PROGRESSBAR	(50<<9)
-#define TRACKPREVIEW	(51<<9)
+#define SEARCH_MENU	(41<<9)
+#define BUT_EXTRA	(42<<9)
+#define HSVCIRCLE	(43<<9)
+#define LISTBOX		(44<<9)
+#define LISTROW		(45<<9)
+#define HOTKEYEVT	(46<<9)
+#define BUT_IMAGE	(47<<9)
+#define HISTOGRAM	(48<<9)
+#define WAVEFORM	(49<<9)
+#define VECTORSCOPE	(50<<9)
+#define PROGRESSBAR	(51<<9)
 
 #define BUTTYPE		(63<<9)
 

Modified: branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c	2011-07-18 19:33:11 UTC (rev 38491)
+++ branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c	2011-07-18 19:39:02 UTC (rev 38492)
@@ -917,7 +917,14 @@
 	data->applied= 1;
 }
 
+static void ui_apply_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonData *data)
+{
+	ui_apply_but_func(C, but);
+	data->retval= but->retval;
+	data->applied= 1;
+}
 
+
 static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, int interactive)
 {
 	char *editstr;
@@ -1046,6 +1053,9 @@
 		case WAVEFORM:
 			ui_apply_but_WAVEFORM(C, but, data);
 			break;
+		case TRACKPREVIEW:
+			ui_apply_but_TRACKPREVIEW(C, but, data);
+			break;
 		default:
 			break;
 	}

Modified: branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c	2011-07-18 19:33:11 UTC (rev 38491)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c	2011-07-18 19:39:02 UTC (rev 38492)
@@ -146,11 +146,13 @@
 
 static SpaceLink *clip_duplicate(SpaceLink *sl)
 {
-	SpaceClip *sclipn= MEM_dupallocN(sl);
+	SpaceClip *scn= MEM_dupallocN(sl);
 
 	/* clear or remove stuff from old */
+	scn->scopes.track_preview= NULL;
+	scn->scopes.ok= 0;
 
-	return (SpaceLink *)sclipn;
+	return (SpaceLink *)scn;
 }
 
 static void clip_listener(ScrArea *sa, wmNotifier *wmn)




More information about the Bf-blender-cvs mailing list