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:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-02 20:30:50 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-02 20:30:50 +0300
commit5709b9951eed094f6bcfb00ba22b4807dd81873b (patch)
tree4a15613b3ff953e572c5a1624cf6e19f0a921fd6 /source/blender
parent1d930382e67e4779b3c87ccdd311a043b89ca107 (diff)
parent00808eb39ac04c484fcabac6b18666cb2a0191e7 (diff)
Merge branch 'master' into gooseberry
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_global.h1
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c100
-rw-r--r--source/blender/blenkernel/intern/sequencer.c1
-rw-r--r--source/blender/blenloader/intern/writefile.c3
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c3
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c5
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c1
-rw-r--r--source/blender/gpu/GPU_debug.h12
-rw-r--r--source/blender/gpu/intern/gpu_debug.c16
-rw-r--r--source/blender/gpu/intern/gpu_init_exit.c9
-rw-r--r--source/blender/gpu/intern/gpu_private.h13
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h15
-rw-r--r--source/blender/makesrna/RNA_access.h1
-rw-r--r--source/blender/makesrna/intern/rna_camera.c4
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c41
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c1
-rw-r--r--source/blender/windowmanager/intern/wm_window.c4
17 files changed, 193 insertions, 37 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 7585dc23342..8a3ffc66e35 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -128,6 +128,7 @@ enum {
G_DEBUG_SIMDATA = (1 << 9), /* sim debug data display */
G_DEBUG_GPU_MEM = (1 << 10), /* gpu memory in status bar */
G_DEBUG_DEPSGRAPH_NO_THREADS = (1 << 11), /* sinle threaded depsgraph */
+ G_DEBUG_GPU = (1 << 12), /* gpu debug */
};
#define G_DEBUG_ALL (G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM | G_DEBUG_JOBS | \
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index f8608ce9406..2d1ea536b27 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -38,6 +38,7 @@
#include "BLI_math.h" /* windows needs for M_PI */
#include "BLI_utildefines.h"
+#include "BLI_string.h"
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
@@ -54,6 +55,8 @@
#include "RE_pipeline.h"
+#include "BLF_api.h"
+
static void slice_get_byte_buffers(const SeqRenderData *context, const ImBuf *ibuf1, const ImBuf *ibuf2,
const ImBuf *ibuf3, const ImBuf *out, int start_line, unsigned char **rect1,
unsigned char **rect2, unsigned char **rect3, unsigned char **rect_out)
@@ -2876,6 +2879,82 @@ static void do_gaussian_blur_effect(const SeqRenderData *context,
}
}
+/*********************** text *************************/
+static void init_text_effect(Sequence *seq)
+{
+ TextVars *data;
+
+ if (seq->effectdata)
+ MEM_freeN(seq->effectdata);
+
+ data = seq->effectdata = MEM_callocN(sizeof(TextVars), "textvars");
+ data->text_size = U.pixelsize * 30;
+ BLI_strncpy(data->text, "Text", sizeof(data->text));
+}
+
+static int num_inputs_text(void)
+{
+ return 0;
+}
+
+static int early_out_text(Sequence *seq, float UNUSED(facf0), float UNUSED(facf1))
+{
+ TextVars *data = seq->effectdata;
+ if (data->text[0] == 0 || data->text_size < 1) {
+ return EARLY_USE_INPUT_1;
+ }
+ return EARLY_NO_INPUT;
+}
+
+static ImBuf *do_text_effect(const SeqRenderData *context, Sequence *seq, float UNUSED(cfra), float UNUSED(facf0), float UNUSED(facf1),
+ ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *ibuf3)
+{
+ ImBuf *out = prepare_effect_imbufs(context, ibuf1, ibuf2, ibuf3);
+ TextVars *data = seq->effectdata;
+ int width = out->x;
+ int height = out->y;
+ struct ColorManagedDisplay *display;
+ const char *display_device;
+ const int mono = blf_mono_font_render; // XXX
+ int y_ofs, x, y, w;
+
+ display_device = context->scene->display_settings.display_device;
+ display = IMB_colormanagement_display_get_named(display_device);
+
+ /* set before return */
+ BLF_size(mono, (context->scene->r.size / 100.0f) * data->text_size, 72);
+
+ BLF_buffer(mono, out->rect_float, (unsigned char *)out->rect, width, height, out->channels, display);
+
+ y_ofs = -BLF_descender(mono);
+
+ w = BLF_width(mono, data->text, sizeof(data->text));
+
+ if (data->flags & TEXT_SEQ_AUTO_CENTER)
+ x = width / 2 - w / 2;
+ else
+ x = (context->scene->r.size / 100.0f) * data->xpos;
+
+ y = y_ofs + (context->scene->r.size / 100.0f) * data->ypos;
+
+ /* BLF_SHADOW won't work with buffers, instead use cheap shadow trick */
+ if (data->flags & TEXT_SEQ_SHADOW) {
+ int fontx, fonty;
+ fontx = BLF_width_max(mono);
+ fonty = BLF_height_max(mono);
+ BLF_position(mono, x + max_ii(fontx / 25, 1), y + max_ii(fonty / 25, 1), 0.0);
+ BLF_buffer_col(mono, 0.0f, 0.0f, 0.0f, 1.0);
+ BLF_draw_buffer(mono, data->text);
+ }
+ BLF_position(mono, x, y, 0.0);
+ BLF_buffer_col(mono, 1.0f, 1.0f, 1.0f, 1.0);
+ BLF_draw_buffer(mono, data->text);
+
+ BLF_buffer(mono, NULL, NULL, 0, 0, 0, NULL);
+
+ return out;
+}
+
/*********************** sequence effect factory *************************/
static void init_noop(Sequence *UNUSED(seq))
@@ -2898,6 +2977,19 @@ static int num_inputs_default(void)
return 2;
}
+static void copy_effect_default(Sequence *dst, Sequence *src)
+{
+ dst->effectdata = MEM_dupallocN(src->effectdata);
+}
+
+static void free_effect_default(Sequence *seq)
+{
+ if (seq->effectdata)
+ MEM_freeN(seq->effectdata);
+
+ seq->effectdata = NULL;
+}
+
static int early_out_noop(Sequence *UNUSED(seq), float UNUSED(facf0), float UNUSED(facf1))
{
return EARLY_DO_EFFECT;
@@ -3073,6 +3165,14 @@ static struct SeqEffectHandle get_sequence_effect_impl(int seq_type)
rval.early_out = early_out_gaussian_blur;
rval.execute_slice = do_gaussian_blur_effect;
break;
+ case SEQ_TYPE_TEXT:
+ rval.num_inputs = num_inputs_text;
+ rval.init = init_text_effect;
+ rval.free = free_effect_default;
+ rval.copy = copy_effect_default;
+ rval.early_out = early_out_text;
+ rval.execute = do_text_effect;
+ break;
}
return rval;
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index f2d5c853ef7..5b1bc3426ce 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -1115,6 +1115,7 @@ static const char *give_seqname_by_type(int type)
case SEQ_TYPE_ADJUSTMENT: return "Adjustment";
case SEQ_TYPE_SPEED: return "Speed";
case SEQ_TYPE_GAUSSIAN_BLUR: return "Gaussian Blur";
+ case SEQ_TYPE_TEXT: return "Text";
default:
return NULL;
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 0d7d40666f0..88757e497c3 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2505,6 +2505,9 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
case SEQ_TYPE_GAUSSIAN_BLUR:
writestruct(wd, DATA, "GaussianBlurVars", 1, seq->effectdata);
break;
+ case SEQ_TYPE_TEXT:
+ writestruct(wd, DATA, "TextVars", 1, seq->effectdata);
+ break;
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 5b95a418dc2..4faaec28d1b 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -1041,6 +1041,9 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
else if (seq->type == SEQ_TYPE_ADJUSTMENT) {
seq->blend_mode = SEQ_TYPE_CROSS;
}
+ else if (seq->type == SEQ_TYPE_TEXT) {
+ seq->blend_mode = SEQ_TYPE_ALPHAOVER;
+ }
/* an unset channel is a special case where we automatically go above
* the other strips. */
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 69ef20584d0..c9ed0b2eddd 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -516,6 +516,11 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
str_len = BLI_snprintf(str, sizeof(str), "%s: %s%s | %d",
name, seq->strip->dir, seq->strip->stripdata->name, seq->len);
}
+ else if (seq->type == SEQ_TYPE_TEXT) {
+ TextVars *textdata = seq->effectdata;
+ str_len = BLI_snprintf(str, sizeof(str), "%s | %d",
+ textdata->text, seq->startdisp);
+ }
else if (seq->type & SEQ_TYPE_EFFECT) {
str_len = BLI_snprintf(str, sizeof(str), "%s | %d",
name, seq->len);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 74ba107c895..5154830f118 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -91,6 +91,7 @@ EnumPropertyItem sequencer_prop_effect_types[] = {
{SEQ_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
{SEQ_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
{SEQ_TYPE_GAUSSIAN_BLUR, "GAUSSIAN_BLUR", 0, "Gaussian Blur", ""},
+ {SEQ_TYPE_TEXT, "TEXT", 0, "Text", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/gpu/GPU_debug.h b/source/blender/gpu/GPU_debug.h
index f89df2b54aa..2c1728bfff1 100644
--- a/source/blender/gpu/GPU_debug.h
+++ b/source/blender/gpu/GPU_debug.h
@@ -49,9 +49,9 @@ const char *gpuErrorString(GLenum err);
/* prints current OpenGL state */
void GPU_state_print(void);
-void gpu_assert_no_gl_errors(const char *file, int line, const char *str);
+void GPU_assert_no_gl_errors(const char *file, int line, const char *str);
-# define GPU_ASSERT_NO_GL_ERRORS(str) gpu_assert_no_gl_errors(__FILE__, __LINE__, (str))
+# define GPU_ASSERT_NO_GL_ERRORS(str) GPU_assert_no_gl_errors(__FILE__, __LINE__, (str))
# define GPU_CHECK_ERRORS_AROUND(glProcCall) \
( \
@@ -61,14 +61,8 @@ void gpu_assert_no_gl_errors(const char *file, int line, const char *str);
)
-#ifdef WITH_GPU_DEBUG
/* inserts a debug marker message for the debug context messaging system */
-void gpu_string_marker(size_t size, const char *str);
-
-# define GPU_STRING_MARKER(size, str) gpu_string_marker((size), (str))
-#else /* WITH_GPU_DEBUG */
-# define GPU_STRING_MARKER(len, str) ((void)(size),(void)(str))
-#endif /* WITH_GPU_DEBUG */
+void GPU_string_marker(size_t size, const char *str);
#ifdef __cplusplus
}
diff --git a/source/blender/gpu/intern/gpu_debug.c b/source/blender/gpu/intern/gpu_debug.c
index 21d7eb4370b..3066467517a 100644
--- a/source/blender/gpu/intern/gpu_debug.c
+++ b/source/blender/gpu/intern/gpu_debug.c
@@ -153,8 +153,6 @@ const char* gpuErrorString(GLenum err)
}
-#ifdef WITH_GPU_DEBUG
-
/* Debug callbacks need the same calling convention as OpenGL functions.
*/
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
@@ -194,7 +192,7 @@ void gpu_debug_init(void)
glEnable(GL_DEBUG_OUTPUT);
glDebugMessageCallback(gpu_debug_proc, mxGetCurrentContext());
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
- GPU_STRING_MARKER(sizeof(success), success);
+ GPU_string_marker(sizeof(success), success);
return;
}
#endif
@@ -203,7 +201,7 @@ void gpu_debug_init(void)
#ifndef GLEW_ES_ONLY
glDebugMessageCallback(gpu_debug_proc, mxGetCurrentContext());
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
- GPU_STRING_MARKER(sizeof(success), success);
+ GPU_string_marker(sizeof(success), success);
#endif
return;
}
@@ -212,7 +210,7 @@ void gpu_debug_init(void)
if (GLEW_ARB_debug_output) {
glDebugMessageCallbackARB(gpu_debug_proc, mxGetCurrentContext());
glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
- GPU_STRING_MARKER(sizeof(success), success);
+ GPU_string_marker(sizeof(success), success);
return;
}
@@ -220,7 +218,7 @@ void gpu_debug_init(void)
if (GLEW_AMD_debug_output) {
glDebugMessageCallbackAMD(gpu_debug_proc_amd, mxGetCurrentContext());
glDebugMessageEnableAMD(GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_TRUE);
- GPU_STRING_MARKER(sizeof(success), success);
+ GPU_string_marker(sizeof(success), success);
return;
}
@@ -268,7 +266,7 @@ void gpu_debug_exit(void)
return;
}
-void gpu_string_marker(size_t length, const char *buf)
+void GPU_string_marker(size_t length, const char *buf)
{
#ifndef WITH_GLEW_ES
#ifndef GLEW_ES_ONLY
@@ -310,8 +308,6 @@ void gpu_string_marker(size_t length, const char *buf)
return;
}
-#endif /* WITH_GPU_DEBUG */
-
void GPU_print_error_debug(const char *str)
{
if (G.debug & G_DEBUG)
@@ -319,7 +315,7 @@ void GPU_print_error_debug(const char *str)
}
-void gpu_assert_no_gl_errors(const char* file, int line, const char* str)
+void GPU_assert_no_gl_errors(const char* file, int line, const char* str)
{
if (G.debug) {
GLboolean gl_ok = gpu_report_gl_errors(file, line, str);
diff --git a/source/blender/gpu/intern/gpu_init_exit.c b/source/blender/gpu/intern/gpu_init_exit.c
index a93c1a21130..aefddc774be 100644
--- a/source/blender/gpu/intern/gpu_init_exit.c
+++ b/source/blender/gpu/intern/gpu_init_exit.c
@@ -32,6 +32,8 @@
#include "BLI_sys_types.h"
#include "GPU_init_exit.h" /* interface */
+#include "BKE_global.h"
+
#include "intern/gpu_codegen.h"
#include "intern/gpu_private.h"
@@ -54,14 +56,17 @@ void GPU_init(void)
gpu_codegen_init();
- GPU_DEBUG_INIT();
+ if (G.debug & G_DEBUG_GPU)
+ gpu_debug_init();
+
}
void GPU_exit(void)
{
- GPU_DEBUG_EXIT();
+ if (G.debug & G_DEBUG_GPU)
+ gpu_debug_exit();
gpu_codegen_exit();
gpu_extensions_exit(); /* must come last */
diff --git a/source/blender/gpu/intern/gpu_private.h b/source/blender/gpu/intern/gpu_private.h
index 188a2d16abc..72627e3563e 100644
--- a/source/blender/gpu/intern/gpu_private.h
+++ b/source/blender/gpu/intern/gpu_private.h
@@ -29,21 +29,8 @@
void gpu_extensions_init(void);
void gpu_extensions_exit(void);
-
/* gpu_debug.c */
-#ifdef WITH_GPU_DEBUG
-
void gpu_debug_init(void);
void gpu_debug_exit(void);
-# define GPU_DEBUG_INIT() gpu_debug_init()
-# define GPU_DEBUG_EXIT() gpu_debug_exit()
-
-#else
-
-# define GPU_DEBUG_INIT() ((void)0)
-# define GPU_DEBUG_EXIT() ((void)0)
-
-#endif
-
#endif /* __GPU_PRIVATE_H__ */
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 7b342d30ca1..dfb9aa0c417 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -277,6 +277,17 @@ typedef struct GaussianBlurVars {
float size_y;
} GaussianBlurVars;
+typedef struct TextVars {
+ char text[512];
+ int text_size;
+ int xpos, ypos;
+ int flags;
+} TextVars;
+
+enum {
+ TEXT_SEQ_SHADOW = (1 << 0),
+ TEXT_SEQ_AUTO_CENTER = (1 << 1),
+};
/* ***************** Sequence modifiers ****************** */
typedef struct SequenceModifierData {
@@ -471,7 +482,9 @@ enum {
SEQ_TYPE_MULTICAM = 30,
SEQ_TYPE_ADJUSTMENT = 31,
SEQ_TYPE_GAUSSIAN_BLUR = 40,
- SEQ_TYPE_MAX = 40
+ SEQ_TYPE_TEXT = 41,
+
+ SEQ_TYPE_MAX = 41
};
#define SEQ_MOVIECLIP_RENDER_UNDISTORTED (1 << 0)
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index acbaae167db..f769e0de2ac 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -632,6 +632,7 @@ extern StructRNA RNA_ThemeNodeEditor;
extern StructRNA RNA_ThemeOutliner;
extern StructRNA RNA_ThemeProperties;
extern StructRNA RNA_ThemeSequenceEditor;
+extern StructRNA RNA_TextSequence;
extern StructRNA RNA_ThemeSpaceGeneric;
extern StructRNA RNA_ThemeSpaceGradient;
extern StructRNA RNA_ThemeSpaceListGeneric;
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 9aec0ea43cc..b82f3c88c56 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -281,14 +281,14 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "shiftx");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_range(prop, -2.0, 2.0, 1, 3);
- RNA_def_property_ui_text(prop, "Shift X", "Perspective Camera horizontal shift");
+ RNA_def_property_ui_text(prop, "Shift X", "Camera horizontal shift");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update");
prop = RNA_def_property(srna, "shift_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shifty");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_range(prop, -2.0, 2.0, 1, 3);
- RNA_def_property_ui_text(prop, "Shift Y", "Perspective Camera vertical shift");
+ RNA_def_property_ui_text(prop, "Shift Y", "Camera vertical shift");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_update");
prop = RNA_def_property(srna, "dof_distance", PROP_FLOAT, PROP_DISTANCE);
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 1cb728c7b9e..02360ebf85e 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -546,6 +546,8 @@ static StructRNA *rna_Sequence_refine(struct PointerRNA *ptr)
return &RNA_SpeedControlSequence;
case SEQ_TYPE_GAUSSIAN_BLUR:
return &RNA_GaussianBlurSequence;
+ case SEQ_TYPE_TEXT:
+ return &RNA_TextSequence;
default:
return &RNA_Sequence;
}
@@ -1407,6 +1409,7 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
{SEQ_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
{SEQ_TYPE_GAUSSIAN_BLUR, "GAUSSIAN_BLUR", 0, "Gaussian Blur", ""},
+ {SEQ_TYPE_TEXT, "TEXT", 0, "Text", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -2307,6 +2310,42 @@ static void rna_def_gaussian_blur(StructRNA *srna)
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
}
+static void rna_def_text(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ RNA_def_struct_sdna_from(srna, "TextVars", "effectdata");
+
+ prop = RNA_def_property(srna, "text_size", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_ui_text(prop, "Size", "Size of the text");
+ RNA_def_property_ui_range(prop, 0.0f, 1000, 1, -1);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "xpos", PROP_INT, PROP_NONE);
+ RNA_def_property_ui_text(prop, "X Position", "X position of the text");
+ RNA_def_property_ui_range(prop, -1000, 1000, 1, -1);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "ypos", PROP_INT, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Y Position", "Y position of the text");
+ RNA_def_property_ui_range(prop, -1000, 1000, 1, -1);
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Text", "Text that will be displayed");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", TEXT_SEQ_SHADOW);
+ RNA_def_property_ui_text(prop, "Shadow", "draw text with shadow");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
+ prop = RNA_def_property(srna, "use_autocenter", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", TEXT_SEQ_AUTO_CENTER);
+ RNA_def_property_ui_text(prop, "Auto-Center", "draw text centered in x axis");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+}
+
static EffectInfo def_effects[] = {
{"AddSequence", "Add Sequence", "Add Sequence", NULL, 2},
{"AdjustmentSequence", "Adjustment Layer Sequence",
@@ -2331,6 +2370,8 @@ static EffectInfo def_effects[] = {
rna_def_wipe, 1},
{"GaussianBlurSequence", "Gaussian Blur Sequence", "Sequence strip creating a gaussian blur",
rna_def_gaussian_blur, 1},
+ {"TextSequence", "Text Sequence", "Sequence strip creating text",
+ rna_def_text, 0},
{"", "", "", NULL, 0}
};
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 5e9866fa73e..13fda02c7c8 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -474,6 +474,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
{SEQ_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
{SEQ_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
{SEQ_TYPE_GAUSSIAN_BLUR, "GAUSSIAN_BLUR", 0, "Gaussian Blur", ""},
+ {SEQ_TYPE_TEXT, "TEXT", 0, "Text", ""},
{0, NULL, 0, NULL, NULL}
};
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index d11d88db147..5f4869d3386 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -400,6 +400,10 @@ static void wm_window_add_ghostwindow(wmWindowManager *wm, const char *title, wm
if (win->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP)
glSettings.flags |= GHOST_glStereoVisual;
+ if (G.debug & G_DEBUG_GPU) {
+ glSettings.flags |= GHOST_glDebugContext;
+ }
+
if (!(U.uiflag2 & USER_OPENGL_NO_WARN_SUPPORT))
glSettings.flags |= GHOST_glWarnSupport;