[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39776] branches/soc-2011-pepper: * Reverting Titlecard commit r37537

Joerg Mueller nexyon at gmail.com
Mon Aug 29 17:01:55 CEST 2011


Revision: 39776
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39776
Author:   nexyon
Date:     2011-08-29 15:01:55 +0000 (Mon, 29 Aug 2011)
Log Message:
-----------
* Reverting Titlecard commit r37537
* Reverting update recent files commit r37155
* Turning reference counts into unsigned ints
* Minor things

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37537
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37155

Modified Paths:
--------------
    branches/soc-2011-pepper/intern/audaspace/intern/AUD_Reference.h
    branches/soc-2011-pepper/intern/audaspace/intern/AUD_ReferenceHandler.cpp
    branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_sequencer.py
    branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_userpref.py
    branches/soc-2011-pepper/source/blender/blenfont/BLF_api.h
    branches/soc-2011-pepper/source/blender/blenfont/intern/blf.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/seqeffects.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/sound.c
    branches/soc-2011-pepper/source/blender/blenloader/intern/writefile.c
    branches/soc-2011-pepper/source/blender/editors/interface/interface_style.c
    branches/soc-2011-pepper/source/blender/editors/space_sequencer/sequencer_draw.c
    branches/soc-2011-pepper/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/soc-2011-pepper/source/blender/makesdna/DNA_sequence_types.h
    branches/soc-2011-pepper/source/blender/makesdna/DNA_userdef_types.h
    branches/soc-2011-pepper/source/blender/makesrna/RNA_access.h
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_sequencer.c
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_sound.c
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2011-pepper/source/blender/windowmanager/intern/wm_files.c

Modified: branches/soc-2011-pepper/intern/audaspace/intern/AUD_Reference.h
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/intern/AUD_Reference.h	2011-08-29 14:13:14 UTC (rev 39775)
+++ branches/soc-2011-pepper/intern/audaspace/intern/AUD_Reference.h	2011-08-29 15:01:55 UTC (rev 39776)
@@ -49,7 +49,7 @@
 	/**
 	 * Saves the reference counts.
 	 */
-	static std::map<void*, int> m_references;
+	static std::map<void*, unsigned int> m_references;
 
 public:
 	/**
@@ -61,7 +61,7 @@
 		if(!reference)
 			return;
 
-		std::map<void*, int>::iterator result = m_references.find(reference);
+		std::map<void*, unsigned int>::iterator result = m_references.find(reference);
 		if(result != m_references.end())
 		{
 			m_references[reference]++;

Modified: branches/soc-2011-pepper/intern/audaspace/intern/AUD_ReferenceHandler.cpp
===================================================================
--- branches/soc-2011-pepper/intern/audaspace/intern/AUD_ReferenceHandler.cpp	2011-08-29 14:13:14 UTC (rev 39775)
+++ branches/soc-2011-pepper/intern/audaspace/intern/AUD_ReferenceHandler.cpp	2011-08-29 15:01:55 UTC (rev 39776)
@@ -30,4 +30,4 @@
 
 #include "AUD_Reference.h"
 
-std::map<void*, int> AUD_ReferenceHandler::m_references;
+std::map<void*, unsigned int> AUD_ReferenceHandler::m_references;

Modified: branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_sequencer.py	2011-08-29 14:13:14 UTC (rev 39775)
+++ branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_sequencer.py	2011-08-29 15:01:55 UTC (rev 39776)
@@ -225,7 +225,6 @@
         layout.operator("sequencer.effect_strip_add", text="Speed Control").type = 'SPEED'
         layout.operator("sequencer.effect_strip_add", text="Multicam Selector").type = 'MULTICAM'
         layout.operator("sequencer.effect_strip_add", text="Adjustment Layer").type = 'ADJUSTMENT'
-        layout.operator("sequencer.effect_strip_add", text="Title Card").type = 'TITLE_CARD'
 
 
 class SEQUENCER_MT_strip(Menu):
@@ -407,7 +406,7 @@
                               'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
                               'PLUGIN',
                               'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
-                              'MULTICAM', 'ADJUSTMENT', 'TITLE_CARD'}
+                              'MULTICAM', 'ADJUSTMENT'}
 
     def draw(self, context):
         layout = self.layout
@@ -475,11 +474,6 @@
             row.label("Cut To")
             for i in range(1, strip.channel):
                 row.operator("sequencer.cut_multicam", text=str(i)).camera = i
-        elif strip.type == "TITLE_CARD":
-            layout.prop(strip, "title")
-            layout.prop(strip, "subtitle")
-            layout.prop(strip, "color_foreground")
-            layout.prop(strip, "color_background")
 
         col = layout.column(align=True)
         if strip.type == 'SPEED':
@@ -551,8 +545,7 @@
                               'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
                               'PLUGIN',
                               'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
-                              'MULTICAM', 'SPEED', 'ADJUSTMENT',
-                              'TITLE_CARD'}
+                              'MULTICAM', 'SPEED', 'ADJUSTMENT'}
 
     def draw(self, context):
         layout = self.layout
@@ -713,8 +706,7 @@
                               'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
                               'PLUGIN',
                               'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
-                              'MULTICAM', 'SPEED', 'ADJUSTMENT',
-                              'TITLE_CARD'}
+                              'MULTICAM', 'SPEED', 'ADJUSTMENT'}
 
     def draw(self, context):
         layout = self.layout

Modified: branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_userpref.py	2011-08-29 14:13:14 UTC (rev 39775)
+++ branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_userpref.py	2011-08-29 15:01:55 UTC (rev 39776)
@@ -746,7 +746,6 @@
 
         col.prop(paths, "save_version")
         col.prop(paths, "recent_files")
-        col.prop(paths, "use_update_recent_files_on_load")
         col.prop(paths, "use_save_preview_images")
         col.label(text="Auto Save:")
         col.prop(paths, "use_auto_save_temporary_files")

Modified: branches/soc-2011-pepper/source/blender/blenfont/BLF_api.h
===================================================================
--- branches/soc-2011-pepper/source/blender/blenfont/BLF_api.h	2011-08-29 14:13:14 UTC (rev 39775)
+++ branches/soc-2011-pepper/source/blender/blenfont/BLF_api.h	2011-08-29 15:01:55 UTC (rev 39776)
@@ -215,6 +215,5 @@
 // XXX, bad design
 extern int blf_mono_font;
 extern int blf_mono_font_render; // dont mess drawing with render threads.
-extern int blf_default_font_render; // dont mess drawing with render threads.
 
 #endif /* BLF_API_H */

Modified: branches/soc-2011-pepper/source/blender/blenfont/intern/blf.c
===================================================================
--- branches/soc-2011-pepper/source/blender/blenfont/intern/blf.c	2011-08-29 14:13:14 UTC (rev 39775)
+++ branches/soc-2011-pepper/source/blender/blenfont/intern/blf.c	2011-08-29 15:01:55 UTC (rev 39776)
@@ -74,7 +74,6 @@
 // XXX, should these be made into global_font_'s too?
 int blf_mono_font= -1;
 int blf_mono_font_render= -1;
-int blf_default_font_render= -1;
 
 static FontBLF *BLF_get(int fontid)
 {

Modified: branches/soc-2011-pepper/source/blender/blenkernel/intern/seqeffects.c
===================================================================
--- branches/soc-2011-pepper/source/blender/blenkernel/intern/seqeffects.c	2011-08-29 14:13:14 UTC (rev 39775)
+++ branches/soc-2011-pepper/source/blender/blenkernel/intern/seqeffects.c	2011-08-29 15:01:55 UTC (rev 39776)
@@ -40,11 +40,8 @@
 #include "BLI_dynlib.h"
 
 #include "BLI_math.h" /* windows needs for M_PI */
-#include "BLI_string.h"
 #include "BLI_utildefines.h"
 
-#include "BLF_api.h"
-
 #include "DNA_scene_types.h"
 #include "DNA_sequence_types.h"
 #include "DNA_anim_types.h"
@@ -2808,130 +2805,6 @@
 }
 
 /* **********************************************************************
-   TITLE CARD
-   ********************************************************************** */
-
-static void init_title_card(Sequence *seq)
-{
-	TitleCardVars *tv;
-	
-	if(seq->effectdata)MEM_freeN(seq->effectdata);
-	seq->effectdata = MEM_callocN(sizeof(struct TitleCardVars), "titlecard");
-	
-	tv = (TitleCardVars *)seq->effectdata;
-	
-	BLI_strncpy(tv->titlestr, "Title goes here", sizeof(tv->titlestr));
-	tv->fgcol[0] = tv->fgcol[1] = tv->fgcol[2] = 1.0f; /* white */
-}
-
-static int num_inputs_titlecard(void)
-{
-	return 0;
-}
-
-static void free_title_card(Sequence *seq)
-{
-	if(seq->effectdata)MEM_freeN(seq->effectdata);
-	seq->effectdata = NULL;
-}
-
-static void copy_title_card(Sequence *dst, Sequence *src)
-{
-	dst->effectdata = MEM_dupallocN(src->effectdata);
-}
-
-static int early_out_titlecard(struct Sequence *UNUSED(seq),
-			   float UNUSED(facf0), float UNUSED(facf1))
-{
-	return -1;
-}
-
-static struct ImBuf * do_title_card(
-	SeqRenderData context, Sequence *seq, float cfra,
-	float facf0, float facf1, 
-	struct ImBuf *ibuf1, struct ImBuf *ibuf2, 
-	struct ImBuf *ibuf3)
-{	
-	TitleCardVars *tv = (TitleCardVars *)seq->effectdata;
-	
-	SolidColorVars cv = {{0}};
-	struct ImBuf *out;
-	
-	int titleFontId = blf_default_font_render; // XXX: bad design!
-	
-	int width = context.rectx;
-	int height = context.recty;
-	float w, h;
-	int x, y;
-	
-	/* use fake solid-color vars to get backdrop (and an out buffer at the same time) */
-	VECCOPY(cv.col, tv->bgcol);
-	seq->effectdata = &cv;
-	
-	out = do_solid_color(context, seq, cfra,
-			facf0, facf1,
-			ibuf1, ibuf2, ibuf3);
-			
-	seq->effectdata = tv;
-	
-	/* draw text */
-	/* FIXME: imbuf out->rect is unsigned int NOT unsigned char, but without passing this pointer
-	 * this drawing code doesn't work. This cast really masks some potential bugs though...
-	 */
-	BLF_buffer(titleFontId, out->rect_float, (unsigned char *)out->rect, width, height, 4);
-	
-	if (tv->titlestr[0]) {
-		/* automatic scale - these formulae have been derived experimentally:
-		 *	- base size is based on 40pt at 960 width
-		 *	- each 26 characters, size jumps down one step, 
-		 *	  but this decrease needs to be exponential to fit everything
-		 */
-		float lfac = strlen(tv->titlestr) / 26.0f;
-		float size = (width * 0.06f) * (1.0f - 0.1f*lfac*lfac);
-		
-		BLF_size(titleFontId, size, 72);
-		BLF_buffer_col(titleFontId, tv->fgcol[0], tv->fgcol[1], tv->fgcol[2], 1.0);
-		
-		BLF_width_and_height(titleFontId, tv->titlestr, &w, &h);
-		x = width/2.0f - w/2.0f;
-		if (tv->subtitle[0])
-			y = height/2.0f + h;
-		else
-			y = height/2.0f;
-		
-		BLF_position(titleFontId, x, y, 0.0);
-		BLF_draw_buffer(titleFontId, tv->titlestr);
-	}
-	
-	if (tv->subtitle[0]) {
-		/* automatic scale - these formulae have been derived experimentally (as above):
-		 *	- base size is based on 20pt at 960 width
-		 *	- size steps aren't quite as refined here. Need a slower-growing curve!
-		 */
-		float lfac = strlen(tv->subtitle) / 36.0f;
-		float size = (width * 0.03f) * (1.0f - 0.1f*lfac*lfac*log(lfac));
-		
-		BLF_size(titleFontId, size, 72);
-		BLF_buffer_col(titleFontId, tv->fgcol[0], tv->fgcol[1], tv->fgcol[2], 1.0);
-		
-		BLF_width_and_height(titleFontId, tv->subtitle, &w, &h);
-		x = width/2.0f - w/2.0f;
-		if (tv->titlestr[0])
-			y = height/2.0f - h;
-		else
-			y = height/2.0f;
-		
-		BLF_position(titleFontId, x, y, 0.0);
-		BLF_draw_buffer(titleFontId, tv->subtitle);
-	}
-	
-	/* cleanup the buffer. */
-	BLF_buffer(UIFONT_DEFAULT, NULL, NULL, 0, 0, 0);
-	
-	return out;
-}
-
-/* **********************************************************************
    MULTICAM
    ********************************************************************** */
 
@@ -3470,14 +3343,6 @@
 		rval.early_out = early_out_adjustment;
 		rval.execute = do_adjustment;
 		break;
-	case SEQ_TITLECARD:
-		rval.init = init_title_card;
-		rval.num_inputs = num_inputs_titlecard;

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list