[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38308] branches/soc-2011-salad: merge with trunk 38307
Antony Riakiotakis
kalast at gmail.com
Mon Jul 11 16:27:45 CEST 2011
Revision: 38308
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38308
Author: psy-fi
Date: 2011-07-11 14:27:44 +0000 (Mon, 11 Jul 2011)
Log Message:
-----------
merge with trunk 38307
Modified Paths:
--------------
branches/soc-2011-salad/CMakeLists.txt
branches/soc-2011-salad/intern/ghost/test/CMakeLists.txt
branches/soc-2011-salad/intern/ghost/test/multitest/MultiTest.c
branches/soc-2011-salad/release/scripts/modules/addon_utils.py
branches/soc-2011-salad/release/scripts/modules/bpy/ops.py
branches/soc-2011-salad/release/scripts/modules/bpy_extras/image_utils.py
branches/soc-2011-salad/release/scripts/modules/bpy_extras/io_utils.py
branches/soc-2011-salad/release/scripts/modules/bpy_extras/mesh_utils.py
branches/soc-2011-salad/release/scripts/modules/bpy_extras/view3d_utils.py
branches/soc-2011-salad/release/scripts/modules/bpy_types.py
branches/soc-2011-salad/release/scripts/modules/bpyml_ui.py
branches/soc-2011-salad/release/scripts/modules/rna_prop_ui.py
branches/soc-2011-salad/release/scripts/startup/bl_operators/image.py
branches/soc-2011-salad/release/scripts/startup/bl_operators/mesh.py
branches/soc-2011-salad/release/scripts/startup/bl_operators/object_align.py
branches/soc-2011-salad/release/scripts/startup/bl_operators/presets.py
branches/soc-2011-salad/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
branches/soc-2011-salad/release/scripts/startup/bl_operators/uvcalc_follow_active.py
branches/soc-2011-salad/release/scripts/startup/bl_operators/uvcalc_lightmap.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_animviz.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_data_armature.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_data_curve.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_object.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_texture.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_image.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_userpref.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_userpref_keymap.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_view3d.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2011-salad/release/scripts/startup/keyingsets_builtins.py
branches/soc-2011-salad/source/blender/avi/AVI_avi.h
branches/soc-2011-salad/source/blender/blenkernel/intern/boids.c
branches/soc-2011-salad/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2011-salad/source/blender/blenkernel/intern/curve.c
branches/soc-2011-salad/source/blender/blenkernel/intern/depsgraph.c
branches/soc-2011-salad/source/blender/blenkernel/intern/material.c
branches/soc-2011-salad/source/blender/blenkernel/intern/node.c
branches/soc-2011-salad/source/blender/blenkernel/intern/particle.c
branches/soc-2011-salad/source/blender/blenkernel/intern/particle_system.c
branches/soc-2011-salad/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2011-salad/source/blender/blenkernel/intern/texture.c
branches/soc-2011-salad/source/blender/blenlib/intern/pbvh.c
branches/soc-2011-salad/source/blender/editors/armature/poseUtils.c
branches/soc-2011-salad/source/blender/editors/object/object_relations.c
branches/soc-2011-salad/source/blender/editors/transform/transform_conversions.c
branches/soc-2011-salad/source/blender/gpu/GPU_buffers.h
branches/soc-2011-salad/source/blender/gpu/intern/gpu_buffers.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_cast.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_displace.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_hook.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_meshdeform.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_simpledeform.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_smooth.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_solidify.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_util.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_util.h
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_warp.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_wave.c
branches/soc-2011-salad/source/blender/nodes/intern/SHD_nodes/SHD_material.c
branches/soc-2011-salad/source/blender/python/generic/py_capi_utils.c
branches/soc-2011-salad/source/blender/python/generic/py_capi_utils.h
branches/soc-2011-salad/source/blender/python/intern/bpy_driver.c
branches/soc-2011-salad/source/blender/python/intern/bpy_interface.c
branches/soc-2011-salad/source/blender/python/intern/bpy_rna.c
branches/soc-2011-salad/source/blender/render/intern/source/convertblender.c
branches/soc-2011-salad/source/blender/windowmanager/intern/wm_init_exit.c
branches/soc-2011-salad/source/creator/creator.c
branches/soc-2011-salad/source/gameengine/Expressions/PyObjectPlus.cpp
branches/soc-2011-salad/source/gameengine/Ketsji/KX_Camera.cpp
branches/soc-2011-salad/source/gameengine/Ketsji/KX_GameObject.cpp
Property Changed:
----------------
branches/soc-2011-salad/
Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-37529
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38239
/trunk/blender:36834-38238
+ /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-37529
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38239
/trunk/blender:36834-38307
Modified: branches/soc-2011-salad/CMakeLists.txt
===================================================================
--- branches/soc-2011-salad/CMakeLists.txt 2011-07-11 14:17:21 UTC (rev 38307)
+++ branches/soc-2011-salad/CMakeLists.txt 2011-07-11 14:27:44 UTC (rev 38308)
@@ -793,11 +793,8 @@
if(WITH_IMAGE_OPENEXR)
set(OPENEXR ${LIBDIR}/gcc/openexr)
set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
- set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread)
+ set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
-
- # TODO, gives linking errors, force off
- set(WITH_IMAGE_OPENEXR OFF)
endif()
if(WITH_IMAGE_TIFF)
Modified: branches/soc-2011-salad/intern/ghost/test/CMakeLists.txt
===================================================================
--- branches/soc-2011-salad/intern/ghost/test/CMakeLists.txt 2011-07-11 14:17:21 UTC (rev 38307)
+++ branches/soc-2011-salad/intern/ghost/test/CMakeLists.txt 2011-07-11 14:27:44 UTC (rev 38308)
@@ -58,11 +58,39 @@
include_directories(${INC_NEW})
add_library(guardedalloc_lib ${SRC_NEW})
+# blenfont
+include(${CMAKE_SOURCE_DIR}/../../../source/blender/blenfont/CMakeLists.txt)
+suffix_relpaths(INC_NEW "${INC}" "../../../source/blender/blenfont/")
+suffix_relpaths(SRC_NEW "${SRC}" "../../../source/blender/blenfont/")
+include_directories(${INC_NEW})
+add_library(blenfont_lib ${SRC_NEW})
+# grr, blenfont needs BLI
+include_directories(
+ "../../../source/blender/blenlib"
+ "../../../source/blender/blenloader"
+ )
+add_library(bli_lib
+ "../../../source/blender/blenlib/intern/fileops.c"
+ "../../../source/blender/blenlib/intern/rct.c"
+ "../../../source/blender/blenlib/intern/string.c"
+ "../../../source/blender/blenlib/intern/listbase.c"
+ "../../../source/blender/blenlib/intern/storage.c"
+ "../../../source/blender/blenlib/intern/path_util.c"
+ "../../../source/blender/blenlib/intern/BLI_dynstr.c"
+ "../../../source/blender/blenlib/intern/BLI_linklist.c"
+ "../../../source/blender/blenlib/intern/BLI_memarena.c"
+ )
+
+
find_package(OpenGL REQUIRED)
+find_package(Freetype REQUIRED)
+
include_directories(${CMAKE_SOURCE_DIR}/../)
include_directories(${OPENGL_INCLUDE_DIR})
+include_directories(${FREETYPE_INCLUDE_DIRS})
+include_directories(${CMAKE_SOURCE_DIR}/../../../source/blender/blenfont)
if(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
@@ -105,6 +133,7 @@
# MultiTest (C)
add_executable(multitest_c
+ ${CMAKE_SOURCE_DIR}/../../../source/blender/editors/datafiles/bfont.ttf.c
${CMAKE_SOURCE_DIR}/multitest/Basic.c
${CMAKE_SOURCE_DIR}/multitest/EventToBuf.c
${CMAKE_SOURCE_DIR}/multitest/MultiTest.c
@@ -114,10 +143,13 @@
)
target_link_libraries(multitest_c
+ blenfont_lib
+ bli_lib
ghost_lib
string_lib
guardedalloc_lib
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
+ ${FREETYPE_LIBRARY}
${PLATFORM_LINKLIBS}
)
Modified: branches/soc-2011-salad/intern/ghost/test/multitest/MultiTest.c
===================================================================
--- branches/soc-2011-salad/intern/ghost/test/multitest/MultiTest.c 2011-07-11 14:17:21 UTC (rev 38307)
+++ branches/soc-2011-salad/intern/ghost/test/multitest/MultiTest.c 2011-07-11 14:27:44 UTC (rev 38308)
@@ -42,8 +42,19 @@
#include "MEM_guardedalloc.h"
#include "GHOST_C-api.h"
-#include "BMF_Api.h"
+#ifdef USE_BMF
+# include "BMF_Api.h"
+#else
+# include "BLF_api.h"
+ extern int datatoc_bfont_ttf_size;
+ extern char datatoc_bfont_ttf[];
+
+ // XXX, bad, but BLI uses these
+ char bprogname[160]= "";
+char U[1024]= {0};
+#endif
+
#include "Util.h"
#include "Basic.h"
#include "ScrollBar.h"
@@ -291,7 +302,7 @@
win= GHOST_CreateWindow(sys, "MultiTest:Main", 40, 40, 400, 400,
GHOST_kWindowStateNormal, GHOST_kDrawingContextTypeOpenGL,
- FALSE);
+ FALSE, FALSE);
if (win) {
MainWindow *mw= MEM_callocN(sizeof(*mw), "mainwindow_new");
@@ -324,8 +335,12 @@
MultiTestApp *app;
GHOST_WindowHandle win;
-
+
+#ifdef USE_BMF
BMF_Font *font;
+#else
+ int font;
+#endif
int fonttexid;
int fontheight;
@@ -429,18 +444,26 @@
char *line= lw->loglines[(lw->nloglines-1)-(i+startline)];
int x_pos= lw->textarea[0][0] + 4;
int y_pos= lw->textarea[0][1] + 4 + i*lw->fontheight;
-
+
+#ifdef USE_BMF
if (lw->fonttexid==-1) {
glRasterPos2i(x_pos, y_pos);
BMF_DrawString(lw->font, line);
} else {
BMF_DrawStringTexture(lw->font, line, x_pos, y_pos, 0.0);
}
+#else
+ BLF_position(lw->font, x_pos, y_pos, 0.0);
+ BLF_draw(lw->font, line, 256); // XXX
+#endif
}
+
+#ifdef USE_BMF
if (lw->fonttexid!=-1) {
glDisable(GL_TEXTURE_2D);
glDisable(GL_BLEND);
}
+#endif
GHOST_SwapWindowBuffers(lw->win);
}
@@ -531,19 +554,25 @@
GHOST_GetMainDisplayDimensions(sys, &screensize[0], &screensize[1]);
win= GHOST_CreateWindow(sys, "MultiTest:Logger", 40, screensize[1]-432,
800, 300, GHOST_kWindowStateNormal,
- GHOST_kDrawingContextTypeOpenGL, FALSE);
+ GHOST_kDrawingContextTypeOpenGL, FALSE, FALSE);
if (win) {
LoggerWindow *lw= MEM_callocN(sizeof(*lw), "loggerwindow_new");
int bbox[2][2];
lw->app= app;
lw->win= win;
-
+
+#ifdef USE_BMF
lw->font= BMF_GetFont(BMF_kScreen12);
lw->fonttexid= BMF_GetFontTexture(lw->font);
BMF_GetBoundingBox(lw->font, &bbox[0][0], &bbox[0][1], &bbox[1][0], &bbox[1][1]);
lw->fontheight= rect_height(bbox);
+#else
+ lw->font= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
+ BLF_size(lw->font, 11, 72);
+ lw->fontheight= BLF_height(lw->font, "A_");
+#endif
lw->nloglines= lw->logsize= 0;
lw->loglines= MEM_mallocN(sizeof(*lw->loglines)*lw->nloglines, "loglines");
@@ -711,7 +740,7 @@
win= GHOST_CreateWindow(sys, "MultiTest:Extra", 500, 40, 400, 400,
GHOST_kWindowStateNormal, GHOST_kDrawingContextTypeOpenGL,
- FALSE);
+ FALSE, FALSE);
if (win) {
ExtraWindow *ew= MEM_callocN(sizeof(*ew), "mainwindow_new");
@@ -786,7 +815,7 @@
MultiTestApp *multitestapp_new(void) {
MultiTestApp *app= MEM_mallocN(sizeof(*app), "multitestapp_new");
GHOST_EventConsumerHandle consumer= GHOST_CreateEventConsumer(multitest_event_handler, app);
-
+
app->sys= GHOST_CreateSystem();
if (!app->sys)
fatal("Unable to create ghost system");
@@ -850,6 +879,10 @@
/***/
int main(int argc, char **argv) {
+#ifndef USE_BMF
+ BLF_init(11, 72);
+#endif
+
MultiTestApp *app= multitestapp_new();
multitestapp_run(app);
Modified: branches/soc-2011-salad/release/scripts/modules/addon_utils.py
===================================================================
--- branches/soc-2011-salad/release/scripts/modules/addon_utils.py 2011-07-11 14:17:21 UTC (rev 38307)
+++ branches/soc-2011-salad/release/scripts/modules/addon_utils.py 2011-07-11 14:27:44 UTC (rev 38308)
@@ -48,8 +48,6 @@
def modules(module_cache):
import os
- import sys
- import time
path_list = paths()
@@ -173,11 +171,9 @@
:return: the loaded module or None on failier.
:rtype: module
"""
- # note, this still gets added to _bpy_types.TypeMap
import os
import sys
- import bpy_types as _bpy_types
import imp
def handle_error():
@@ -246,8 +242,6 @@
:type module_name: string
"""
import sys
- import bpy_types as _bpy_types
-
mod = sys.modules.get(module_name)
# possible this addon is from a previous session and didnt load a module this time.
Modified: branches/soc-2011-salad/release/scripts/modules/bpy/ops.py
===================================================================
--- branches/soc-2011-salad/release/scripts/modules/bpy/ops.py 2011-07-11 14:17:21 UTC (rev 38307)
+++ branches/soc-2011-salad/release/scripts/modules/bpy/ops.py 2011-07-11 14:27:44 UTC (rev 38308)
@@ -29,7 +29,7 @@
op_get_rna = ops_module.get_rna
-class bpy_ops(object):
+class BPyOps(object):
'''
Fake module like class.
@@ -42,7 +42,7 @@
'''
if module.startswith('__'):
raise AttributeError(module)
- return bpy_ops_submodule(module)
+ return BPyOpsSubMod(module)
def __dir__(self):
@@ -67,7 +67,7 @@
return "<module like class 'bpy.ops'>"
-class bpy_ops_submodule(object):
+class BPyOpsSubMod(object):
'''
Utility class to fake submodules.
@@ -84,7 +84,7 @@
'''
if func.startswith('__'):
raise AttributeError(func)
- return bpy_ops_submodule_op(self.module, func)
+ return BPyOpsSubModOp(self.module, func)
def __dir__(self):
@@ -103,7 +103,7 @@
return "<module like class 'bpy.ops.%s'>" % self.module
-class bpy_ops_submodule_op(object):
+class BPyOpsSubModOp(object):
'''
Utility class to fake submodule operators.
@@ -151,7 +151,7 @@
self.func = func
def poll(self, *args):
- C_dict, C_exec = __class__._parse_args(args)
+ C_dict, C_exec = BPyOpsSubModOp._parse_args(args)
return op_poll(self.idname_py(), C_dict, C_exec)
def idname(self):
@@ -170,16 +170,16 @@
wm = context.window_manager
# run to account for any rna values the user changes.
- __class__._scene_update(context)
+ BPyOpsSubModOp._scene_update(context)
if args:
- C_dict, C_exec = __class__._parse_args(args)
+ C_dict, C_exec = BPyOpsSubModOp._parse_args(args)
ret = op_call(self.idname_py(), C_dict, kw, C_exec)
else:
ret = op_call(self.idname_py(), None, kw)
if 'FINISHED' in ret and context.window_manager == wm:
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list