[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54174] branches/soc-2008-mxcurioni: Merged changes in the trunk up to revision 54171.
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Tue Jan 29 04:42:25 CET 2013
Revision: 54174
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54174
Author: kjym3
Date: 2013-01-29 03:42:19 +0000 (Tue, 29 Jan 2013)
Log Message:
-----------
Merged changes in the trunk up to revision 54171.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54171
Modified Paths:
--------------
branches/soc-2008-mxcurioni/SConstruct
branches/soc-2008-mxcurioni/doc/python_api/rst/bge.events.rst
branches/soc-2008-mxcurioni/doc/python_api/rst/bge.types.rst
branches/soc-2008-mxcurioni/intern/cycles/blender/addon/__init__.py
branches/soc-2008-mxcurioni/intern/cycles/blender/addon/engine.py
branches/soc-2008-mxcurioni/intern/cycles/blender/addon/ui.py
branches/soc-2008-mxcurioni/intern/cycles/blender/blender_python.cpp
branches/soc-2008-mxcurioni/intern/cycles/blender/blender_session.cpp
branches/soc-2008-mxcurioni/intern/guardedalloc/intern/mallocn.c
branches/soc-2008-mxcurioni/release/scripts/modules/bl_i18n_utils/spell_check_utils.py
branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/object_align.py
branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/rigidbody.py
branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/wm.py
branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_game.py
branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/space_image.py
branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/space_info.py
branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/space_view3d.py
branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2008-mxcurioni/source/blender/avi/intern/avi.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_packedFile.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/anim.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/anim_sys.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/armature.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/key.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/object.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/packedFile.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2008-mxcurioni/source/blender/bmesh/intern/bmesh_log.c
branches/soc-2008-mxcurioni/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
branches/soc-2008-mxcurioni/source/blender/editors/animation/anim_markers.c
branches/soc-2008-mxcurioni/source/blender/editors/animation/keyframing.c
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/CMakeLists.txt
branches/soc-2008-mxcurioni/source/blender/editors/datafiles/SConscript
branches/soc-2008-mxcurioni/source/blender/editors/include/ED_datafiles.h
branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_icons.c
branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_panel.c
branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_templates.c
branches/soc-2008-mxcurioni/source/blender/editors/mask/mask_add.c
branches/soc-2008-mxcurioni/source/blender/editors/mesh/mesh_navmesh.c
branches/soc-2008-mxcurioni/source/blender/editors/object/object_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/object/object_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/object/object_relations.c
branches/soc-2008-mxcurioni/source/blender/editors/physics/rigidbody_object.c
branches/soc-2008-mxcurioni/source/blender/editors/render/render_preview.c
branches/soc-2008-mxcurioni/source/blender/editors/screen/screen_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/screen/screendump.c
branches/soc-2008-mxcurioni/source/blender/editors/sound/sound_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_clip/clip_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_info/info_intern.h
branches/soc-2008-mxcurioni/source/blender/editors/space_info/info_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_info/info_report.c
branches/soc-2008-mxcurioni/source/blender/editors/space_info/space_info.c
branches/soc-2008-mxcurioni/source/blender/editors/space_logic/logic_buttons.c
branches/soc-2008-mxcurioni/source/blender/editors/space_logic/logic_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_node/node_add.c
branches/soc-2008-mxcurioni/source/blender/editors/space_node/node_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/space_node/node_relationships.c
branches/soc-2008-mxcurioni/source/blender/editors/space_script/script_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/space_sequencer/sequencer_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/space_sequencer/sequencer_select.c
branches/soc-2008-mxcurioni/source/blender/editors/space_view3d/view3d_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/transform/transform.c
branches/soc-2008-mxcurioni/source/blender/gpu/intern/gpu_draw.c
branches/soc-2008-mxcurioni/source/blender/makesrna/RNA_types.h
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_rigidbody.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_rna.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene_api.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_ui.c
branches/soc-2008-mxcurioni/source/blender/python/intern/bpy_rna.c
branches/soc-2008-mxcurioni/source/blender/python/mathutils/mathutils_geometry.c
branches/soc-2008-mxcurioni/source/blender/quicktime/apple/quicktime_export.c
branches/soc-2008-mxcurioni/source/blender/render/intern/source/pipeline.c
branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_operators.c
branches/soc-2008-mxcurioni/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
branches/soc-2008-mxcurioni/source/gameengine/BlenderRoutines/KX_BlenderGL.h
branches/soc-2008-mxcurioni/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
branches/soc-2008-mxcurioni/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h
branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_BlenderDataConversion.cpp
branches/soc-2008-mxcurioni/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
branches/soc-2008-mxcurioni/source/gameengine/GamePlayer/common/GPC_RenderTools.h
branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
branches/soc-2008-mxcurioni/source/gameengine/Rasterizer/RAS_IRenderTools.h
Added Paths:
-----------
branches/soc-2008-mxcurioni/release/datafiles/preview_cycles.blend
Property Changed:
----------------
branches/soc-2008-mxcurioni/
branches/soc-2008-mxcurioni/release/scripts/startup/bl_ui/properties_game.py
Property changes on: branches/soc-2008-mxcurioni
___________________________________________________________________
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/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126
/trunk/blender:34011-39896,39898-40096,40098-44221,44223-44419,44421-47664,47667-51853,51855-54110
+ /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/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126
/trunk/blender:34011-39896,39898-40096,40098-44221,44223-44419,44421-47664,47667-51853,51855-54171
Modified: branches/soc-2008-mxcurioni/SConstruct
===================================================================
--- branches/soc-2008-mxcurioni/SConstruct 2013-01-29 03:25:47 UTC (rev 54173)
+++ branches/soc-2008-mxcurioni/SConstruct 2013-01-29 03:42:19 UTC (rev 54174)
@@ -524,6 +524,7 @@
data_to_c_simple("release/datafiles/startup.blend")
data_to_c_simple("release/datafiles/preview.blend")
+data_to_c_simple("release/datafiles/preview_cycles.blend")
# --- glsl ---
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
Modified: branches/soc-2008-mxcurioni/doc/python_api/rst/bge.events.rst
===================================================================
--- branches/soc-2008-mxcurioni/doc/python_api/rst/bge.events.rst 2013-01-29 03:25:47 UTC (rev 54173)
+++ branches/soc-2008-mxcurioni/doc/python_api/rst/bge.events.rst 2013-01-29 03:42:19 UTC (rev 54174)
@@ -69,7 +69,7 @@
Return the string name of a key event. Will raise a ValueError error if its invalid.
- :arg event: key event from bge.keys or the keyboard sensor.
+ :arg event: key event constant from :mod:`bge.events` or the keyboard sensor.
:type event: int
:rtype: string
@@ -78,7 +78,7 @@
Return the string name of a key event. Returns an empty string if the event cant be represented as a character.
:type event: int
- :arg event: key event from :mod:`bge.keys` or the keyboard sensor.
+ :arg event: key event constant from :mod:`bge.events` or the keyboard sensor.
:type shift: bool
:arg shift: set to true if shift is held.
:rtype: string
Modified: branches/soc-2008-mxcurioni/doc/python_api/rst/bge.types.rst
===================================================================
--- branches/soc-2008-mxcurioni/doc/python_api/rst/bge.types.rst 2013-01-29 03:25:47 UTC (rev 54173)
+++ branches/soc-2008-mxcurioni/doc/python_api/rst/bge.types.rst 2013-01-29 03:42:19 UTC (rev 54174)
@@ -4215,25 +4215,25 @@
A keyboard sensor detects player key presses.
- See module :mod:`bge.keys` for keycode values.
+ See module :mod:`bge.events` for keycode values.
.. attribute:: key
The key code this sensor is looking for.
- :type: keycode from :mod:`bge.keys` module
+ :type: keycode from :mod:`bge.events` module
.. attribute:: hold1
The key code for the first modifier this sensor is looking for.
- :type: keycode from :mod:`bge.keys` module
+ :type: keycode from :mod:`bge.events` module
.. attribute:: hold2
The key code for the second modifier this sensor is looking for.
- :type: keycode from :mod:`bge.keys` module
+ :type: keycode from :mod:`bge.events` module
.. attribute:: toggleProperty
Modified: branches/soc-2008-mxcurioni/intern/cycles/blender/addon/__init__.py
===================================================================
--- branches/soc-2008-mxcurioni/intern/cycles/blender/addon/__init__.py 2013-01-29 03:25:47 UTC (rev 54173)
+++ branches/soc-2008-mxcurioni/intern/cycles/blender/addon/__init__.py 2013-01-29 03:42:19 UTC (rev 54174)
@@ -39,6 +39,7 @@
bl_idname = 'CYCLES'
bl_label = "Cycles Render"
bl_use_shading_nodes = True
+ bl_use_preview = True
def __init__(self):
self.session = None
@@ -48,23 +49,23 @@
# final render
def update(self, data, scene):
- if not self.session:
- engine.create(self, data, scene)
+ if self.is_preview:
+ if not self.session:
+ use_osl = bpy.context.scene.cycles.shading_system
+
+ engine.create(self, data, scene,
+ None, None, None, use_osl)
else:
- engine.reset(self, data, scene)
+ if not self.session:
+ engine.create(self, data, scene)
+ else:
+ engine.reset(self, data, scene)
engine.update(self, data, scene)
def render(self, scene):
engine.render(self)
- # preview render
- # def preview_update(self, context, id):
- # pass
- #
- # def preview_render(self):
- # pass
-
# viewport render
def view_update(self, context):
if not self.session:
Modified: branches/soc-2008-mxcurioni/intern/cycles/blender/addon/engine.py
===================================================================
--- branches/soc-2008-mxcurioni/intern/cycles/blender/addon/engine.py 2013-01-29 03:25:47 UTC (rev 54173)
+++ branches/soc-2008-mxcurioni/intern/cycles/blender/addon/engine.py 2013-01-29 03:42:19 UTC (rev 54174)
@@ -30,7 +30,7 @@
_cycles.init(path, user_path)
-def create(engine, data, scene, region=0, v3d=0, rv3d=0):
+def create(engine, data, scene, region=0, v3d=0, rv3d=0, preview_osl=False):
import bpy
import _cycles
@@ -44,7 +44,7 @@
if rv3d:
rv3d = rv3d.as_pointer()
- engine.session = _cycles.create(engine.as_pointer(), userpref, data, scene, region, v3d, rv3d)
+ engine.session = _cycles.create(engine.as_pointer(), userpref, data, scene, region, v3d, rv3d, preview_osl)
def free(engine):
Modified: branches/soc-2008-mxcurioni/intern/cycles/blender/addon/ui.py
===================================================================
--- branches/soc-2008-mxcurioni/intern/cycles/blender/addon/ui.py 2013-01-29 03:25:47 UTC (rev 54173)
+++ branches/soc-2008-mxcurioni/intern/cycles/blender/addon/ui.py 2013-01-29 03:42:19 UTC (rev 54174)
@@ -1205,6 +1205,9 @@
types.PARTICLE_PT_force_fields,
types.PARTICLE_PT_vertexgroups,
types.PARTICLE_PT_custom_props,
+ types.MATERIAL_PT_preview,
+ types.DATA_PT_preview,
+ types.WORLD_PT_preview,
)
Modified: branches/soc-2008-mxcurioni/intern/cycles/blender/blender_python.cpp
===================================================================
--- branches/soc-2008-mxcurioni/intern/cycles/blender/blender_python.cpp 2013-01-29 03:25:47 UTC (rev 54173)
+++ branches/soc-2008-mxcurioni/intern/cycles/blender/blender_python.cpp 2013-01-29 03:42:19 UTC (rev 54174)
@@ -52,8 +52,9 @@
static PyObject *create_func(PyObject *self, PyObject *args)
{
PyObject *pyengine, *pyuserpref, *pydata, *pyscene, *pyregion, *pyv3d, *pyrv3d;
+ int preview_osl;
- if(!PyArg_ParseTuple(args, "OOOOOOO", &pyengine, &pyuserpref, &pydata, &pyscene, &pyregion, &pyv3d, &pyrv3d))
+ if(!PyArg_ParseTuple(args, "OOOOOOOp", &pyengine, &pyuserpref, &pydata, &pyscene, &pyregion, &pyv3d, &pyrv3d, &preview_osl))
return NULL;
/* RNA */
@@ -91,14 +92,22 @@
Py_BEGIN_ALLOW_THREADS
if(rv3d) {
- /* interactive session */
+ /* interactive viewport session */
int width = region.width();
int height = region.height();
session = new BlenderSession(engine, userpref, data, scene, v3d, rv3d, width, height);
}
else {
- /* offline session */
+ /* override some settings for preview */
+ if(engine.is_preview()) {
+ PointerRNA cscene = RNA_pointer_get(&sceneptr, "cycles");
+
+ RNA_boolean_set(&cscene, "shading_system", preview_osl);
+ RNA_boolean_set(&cscene, "use_progressive_refine", true);
+ }
+
+ /* offline session or preview render */
session = new BlenderSession(engine, userpref, data, scene);
}
Modified: branches/soc-2008-mxcurioni/intern/cycles/blender/blender_session.cpp
===================================================================
--- branches/soc-2008-mxcurioni/intern/cycles/blender/blender_session.cpp 2013-01-29 03:25:47 UTC (rev 54173)
+++ branches/soc-2008-mxcurioni/intern/cycles/blender/blender_session.cpp 2013-01-29 03:42:19 UTC (rev 54174)
@@ -288,7 +288,14 @@
void BlenderSession::update_render_tile(RenderTile& rtile)
{
- do_write_update_render_tile(rtile, true);
+ /* use final write for preview renders, otherwise render result wouldn't be
+ * be updated in blender side
+ * would need to be investigated a bit further, but for now shall be fine
+ */
+ if (!b_engine.is_preview())
+ do_write_update_render_tile(rtile, true);
+ else
+ do_write_update_render_tile(rtile, false);
}
void BlenderSession::render()
Modified: branches/soc-2008-mxcurioni/intern/guardedalloc/intern/mallocn.c
===================================================================
--- branches/soc-2008-mxcurioni/intern/guardedalloc/intern/mallocn.c 2013-01-29 03:25:47 UTC (rev 54173)
+++ branches/soc-2008-mxcurioni/intern/guardedalloc/intern/mallocn.c 2013-01-29 03:42:19 UTC (rev 54174)
@@ -52,6 +52,10 @@
# include <sys/mman.h>
#endif
+#if defined(_MSC_VER)
+# define __func__ __FUNCTION__
+#endif
+
#include "MEM_guardedalloc.h"
/* Only for debugging:
@@ -360,6 +364,9 @@
MEM_freeN(vmemh);
}
+ else {
+ newp = MEM_mallocN(len, __func__);
+ }
return newp;
}
@@ -391,6 +398,9 @@
MEM_freeN(vmemh);
}
+ else {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list