[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49808] branches/soc-2011-tomato: Merging r49775 through r49807 from trunk into soc-2011-tomato
Sergey Sharybin
sergey.vfx at gmail.com
Sat Aug 11 16:39:10 CEST 2012
Revision: 49808
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49808
Author: nazgul
Date: 2012-08-11 14:39:09 +0000 (Sat, 11 Aug 2012)
Log Message:
-----------
Merging r49775 through r49807 from trunk into soc-2011-tomato
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49775
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49807
Modified Paths:
--------------
branches/soc-2011-tomato/SConstruct
branches/soc-2011-tomato/build_files/cmake/Modules/FindOpenCOLLADA.cmake
branches/soc-2011-tomato/build_files/cmake/macros.cmake
branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h
branches/soc-2011-tomato/intern/guardedalloc/intern/mallocn.c
branches/soc-2011-tomato/release/datafiles/preview.blend
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py
branches/soc-2011-tomato/source/blender/avi/intern/avi.c
branches/soc-2011-tomato/source/blender/blenkernel/BKE_sequencer.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/seqeffects.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt
branches/soc-2011-tomato/source/blender/editors/datafiles/CMakeLists.txt
branches/soc-2011-tomato/source/blender/editors/datafiles/SConscript
branches/soc-2011-tomato/source/blender/editors/include/ED_screen_types.h
branches/soc-2011-tomato/source/blender/editors/screen/area.c
branches/soc-2011-tomato/source/blender/gpu/CMakeLists.txt
branches/soc-2011-tomato/source/blender/gpu/SConscript
branches/soc-2011-tomato/source/blender/makesdna/DNA_sequence_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sequencer.c
branches/soc-2011-tomato/source/blender/windowmanager/WM_types.h
Added Paths:
-----------
branches/soc-2011-tomato/release/datafiles/startup.blend
Removed Paths:
-------------
branches/soc-2011-tomato/source/blender/editors/datafiles/preview.blend.c
branches/soc-2011-tomato/source/blender/editors/datafiles/startup.blend.c
branches/soc-2011-tomato/source/blender/gpu/shaders/gpu_shader_material.glsl.c
branches/soc-2011-tomato/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl.c
branches/soc-2011-tomato/source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl.c
branches/soc-2011-tomato/source/blender/gpu/shaders/gpu_shader_vertex.glsl.c
branches/soc-2011-tomato/source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl.c
branches/soc-2011-tomato/source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl.c
Property Changed:
----------------
branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49774
+ /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49807
Modified: branches/soc-2011-tomato/SConstruct
===================================================================
--- branches/soc-2011-tomato/SConstruct 2012-08-11 14:38:02 UTC (rev 49807)
+++ branches/soc-2011-tomato/SConstruct 2012-08-11 14:39:09 UTC (rev 49808)
@@ -450,8 +450,11 @@
###################################
if not os.path.isdir ( B.root_build_dir + 'data_headers'):
os.makedirs ( B.root_build_dir + 'data_headers' )
+if not os.path.isdir ( B.root_build_dir + 'data_sources'):
+ os.makedirs ( B.root_build_dir + 'data_sources' )
# use for includes
env['DATA_HEADERS'] = os.path.join(os.path.abspath(env['BF_BUILDDIR']), "data_headers")
+env['DATA_SOURCES'] = os.path.join(os.path.abspath(env['BF_BUILDDIR']), "data_sources")
def ensure_data(FILE_FROM, FILE_TO, VAR_NAME):
if os.sep == "\\":
FILE_FROM = FILE_FROM.replace("/", "\\")
@@ -487,6 +490,39 @@
B.root_build_dir + "data_headers/COM_OpenCLKernels.cl.h",
"clkernelstoh_COM_OpenCLKernels_cl")
+ensure_data("./release/datafiles/startup.blend",
+ B.root_build_dir + "data_sources/startup.blend.c",
+ "datatoc_startup_blend")
+
+ensure_data("./release/datafiles/preview.blend",
+ B.root_build_dir + "data_sources/preview.blend.c",
+ "datatoc_preview_blend")
+
+# --- glsl ---
+ensure_data("source/blender/gpu/shaders/gpu_shader_material.glsl",
+ B.root_build_dir + "data_sources/gpu_shader_material.glsl.c",
+ "datatoc_gpu_shader_material_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_vertex.glsl",
+ B.root_build_dir + "data_sources/gpu_shader_vertex.glsl.c",
+ "datatoc_gpu_shader_vertex_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl",
+ B.root_build_dir + "data_sources/gpu_shader_sep_gaussian_blur_frag.glsl.c",
+ "datatoc_gpu_shader_sep_gaussian_blur_frag_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl",
+ B.root_build_dir + "data_sources/gpu_shader_sep_gaussian_blur_vert.glsl.c",
+ "datatoc_gpu_shader_sep_gaussian_blur_vert_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_material.glsl",
+ B.root_build_dir + "data_sources/gpu_shader_material.glsl.c",
+ "datatoc_gpu_shader_material_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl",
+ B.root_build_dir + "data_sources/gpu_shader_vsm_store_frag.glsl.c",
+ "datatoc_gpu_shader_vsm_store_frag_glsl")
+ensure_data("source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl",
+ B.root_build_dir + "data_sources/gpu_shader_vsm_store_vert.glsl.c",
+ "datatoc_gpu_shader_vsm_store_vert_glsl")
+
+
+
##### END DATAFILES ##########
Help(opts.GenerateHelpText(env))
Modified: branches/soc-2011-tomato/build_files/cmake/Modules/FindOpenCOLLADA.cmake
===================================================================
--- branches/soc-2011-tomato/build_files/cmake/Modules/FindOpenCOLLADA.cmake 2012-08-11 14:38:02 UTC (rev 49807)
+++ branches/soc-2011-tomato/build_files/cmake/Modules/FindOpenCOLLADA.cmake 2012-08-11 14:39:09 UTC (rev 49808)
@@ -81,6 +81,7 @@
# Alternative would be to suffix all members of search path
# but this is less trouble, just looks strange.
include/opencollada/${COMPONENT}
+ include/${COMPONENT}/include
HINTS
${_opencollada_SEARCH_DIRS}
)
Modified: branches/soc-2011-tomato/build_files/cmake/macros.cmake
===================================================================
--- branches/soc-2011-tomato/build_files/cmake/macros.cmake 2012-08-11 14:38:02 UTC (rev 49807)
+++ branches/soc-2011-tomato/build_files/cmake/macros.cmake 2012-08-11 14:39:09 UTC (rev 49808)
@@ -644,7 +644,7 @@
# --------------
# MINGW HACK END
if (_reset_standard_libraries)
- # Must come after project(...)
+ # Must come after projecINCt(...)
#
# MINGW workaround for -ladvapi32 being included which surprisingly causes
# string formatting of floats, eg: printf("%.*f", 3, value). to crash blender
@@ -733,29 +733,48 @@
endmacro()
-# not highly optimal, may replace with generated C program like makesdna
-function(data_to_c
- file_from file_to var_name)
+# TODO, create a C binary and call it instead!, doing this in cmake its slow
+macro(data_to_c
+ file_from file_to var_name
+ list_to_add)
- file(READ ${file_from} file_from_string HEX)
- string(LENGTH ${file_from_string} _max_index)
- math(EXPR size_on_disk ${_max_index}/2)
+ list(APPEND ${list_to_add} ${file_to})
- file(REMOVE ${file_to})
+ add_custom_command(
+ OUTPUT ${file_to}
+ COMMAND ${CMAKE_COMMAND}
+ -DFILE_FROM=${file_from}
+ -DFILE_TO=${file_to}
+ -DVAR_NAME=${var_name}
+ -P ${CMAKE_SOURCE_DIR}/build_files/cmake/data_to_c.cmake
+ DEPENDS ${file_from})
+endmacro()
- file(APPEND ${file_to} "int ${var_name}_size = ${size_on_disk};\n")
- file(APPEND ${file_to} "char ${var_name}[] = {")
+# same as above but generates the var name and output automatic.
+macro(data_to_c_simple
+ file_from
+ list_to_add)
- set(_index 0)
+ # get var name automatic from name
+ get_filename_component(_file_from_only ${file_from} NAME)
+ string(REPLACE "." "_" _file_from_only ${_file_from_only})
+ set(_var_name "datatoc_${_file_from_only}")
- while(NOT _index EQUAL _max_index)
- string(SUBSTRING "${file_from_string}" ${_index} 2 _pair)
- file(APPEND ${file_to} "0x${_pair},")
- math(EXPR _index ${_index}+2)
- endwhile()
- file(APPEND ${file_to} "};\n")
-endfunction()
+ # only to avoid confusion
+ set(_file_to ${file_from}.c)
-# eg
-# data_to_c("/home/guest/test.txt" "/home/guest/test.txt.h" "this_is_data")
+ list(APPEND ${list_to_add} ${CMAKE_CURRENT_BINARY_DIR}/${_file_to})
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file_to}
+ COMMAND ${CMAKE_COMMAND}
+ -DFILE_FROM=${CMAKE_CURRENT_SOURCE_DIR}/${file_from}
+ -DFILE_TO=${CMAKE_CURRENT_BINARY_DIR}/${_file_to}
+ -DVAR_NAME=${_var_name}
+ -P ${CMAKE_SOURCE_DIR}/build_files/cmake/data_to_c.cmake
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file_from})
+
+ unset(_file_from_only)
+ unset(_var_name)
+ unset(_file_to)
+endmacro()
Modified: branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h
===================================================================
--- branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h 2012-08-11 14:38:02 UTC (rev 49807)
+++ branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h 2012-08-11 14:39:09 UTC (rev 49808)
@@ -111,6 +111,16 @@
;
/**
+ * A variant of realloc which zeros new bytes
+ */
+ void *MEM_recallocN(void *vmemh, size_t len)
+#if MEM_GNU_ATTRIBUTES
+ __attribute__((warn_unused_result))
+ __attribute__((alloc_size(2)))
+#endif
+ ;
+
+ /**
* Allocate a block of memory of size len, with tag name str. The
* memory is cleared. The name must be static, because only a
* pointer to it is stored ! */
Modified: branches/soc-2011-tomato/intern/guardedalloc/intern/mallocn.c
===================================================================
--- branches/soc-2011-tomato/intern/guardedalloc/intern/mallocn.c 2012-08-11 14:38:02 UTC (rev 49807)
+++ branches/soc-2011-tomato/intern/guardedalloc/intern/mallocn.c 2012-08-11 14:39:09 UTC (rev 49808)
@@ -302,10 +302,14 @@
newp = MEM_mallocN(len, memh->name);
if (newp) {
- if (len < memh->len)
+ if (len < memh->len) {
+ /* shrink */
memcpy(newp, vmemh, len);
- else
+ }
+ else {
+ /* grow (or remain same size) */
memcpy(newp, vmemh, memh->len);
+ }
}
MEM_freeN(vmemh);
@@ -314,6 +318,37 @@
return newp;
}
+void *MEM_recallocN(void *vmemh, size_t len)
+{
+ void *newp = NULL;
+
+ if (vmemh) {
+ MemHead *memh = vmemh;
+ memh--;
+
+ newp = MEM_mallocN(len, memh->name);
+ if (newp) {
+ if (len < memh->len) {
+ /* shrink */
+ memcpy(newp, vmemh, len);
+ }
+ else {
+ memcpy(newp, vmemh, memh->len);
+
+ if (len > memh->len) {
+ /* grow */
+ /* zero new bytes */
+ memset(((char *)newp) + memh->len, 0, len - memh->len);
+ }
+ }
+ }
+
+ MEM_freeN(vmemh);
+ }
+
+ return newp;
+}
+
static void make_memhead_header(MemHead *memh, size_t len, const char *str)
{
MemTail *memt;
Modified: branches/soc-2011-tomato/release/datafiles/preview.blend
===================================================================
(Binary files differ)
Copied: branches/soc-2011-tomato/release/datafiles/startup.blend (from rev 49807, trunk/blender/release/datafiles/startup.blend)
===================================================================
(Binary files differ)
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py 2012-08-11 14:38:02 UTC (rev 49807)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py 2012-08-11 14:39:09 UTC (rev 49808)
@@ -428,13 +428,19 @@
def draw(self, context):
layout = self.layout
+ sequencer = context.scene.sequence_editor
strip = act_strip(context)
+
if strip.input_count > 0:
col = layout.column()
col.prop(strip, "input_1")
if strip.input_count > 1:
col.prop(strip, "input_2")
+ if strip.is_supports_mask:
+ col = layout.column()
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list