[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38420] branches/soc-2011-salad: Merging r38366 through r38419 from trunk into soc-2011-salad
Sergey Sharybin
g.ulairi at gmail.com
Fri Jul 15 22:42:16 CEST 2011
Revision: 38420
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38420
Author: nazgul
Date: 2011-07-15 20:42:15 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Merging r38366 through r38419 from trunk into soc-2011-salad
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38366
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38419
Modified Paths:
--------------
branches/soc-2011-salad/CMakeLists.txt
branches/soc-2011-salad/doc/python_api/rst/bgl.rst
branches/soc-2011-salad/intern/CMakeLists.txt
branches/soc-2011-salad/intern/smoke/CMakeLists.txt
branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_texture.py
branches/soc-2011-salad/source/blender/blenkernel/CMakeLists.txt
branches/soc-2011-salad/source/blender/blenkernel/SConscript
branches/soc-2011-salad/source/blender/blenkernel/intern/pointcache.c
branches/soc-2011-salad/source/blender/blenkernel/intern/smoke.c
branches/soc-2011-salad/source/blender/blenkernel/intern/sound.c
branches/soc-2011-salad/source/blender/blenloader/intern/readfile.c
branches/soc-2011-salad/source/blender/blenloader/intern/writefile.c
branches/soc-2011-salad/source/blender/editors/datafiles/CMakeLists.txt
branches/soc-2011-salad/source/blender/editors/datafiles/preview.blend.c
branches/soc-2011-salad/source/blender/editors/physics/physics_fluid.c
branches/soc-2011-salad/source/blender/editors/render/CMakeLists.txt
branches/soc-2011-salad/source/blender/editors/render/render_preview.c
branches/soc-2011-salad/source/blender/editors/space_buttons/buttons_context.c
branches/soc-2011-salad/source/blender/gpu/CMakeLists.txt
branches/soc-2011-salad/source/blender/gpu/SConscript
branches/soc-2011-salad/source/blender/gpu/intern/gpu_draw.c
branches/soc-2011-salad/source/blender/makesdna/DNA_particle_types.h
branches/soc-2011-salad/source/blender/makesrna/intern/rna_constraint.c
branches/soc-2011-salad/source/blender/python/CMakeLists.txt
branches/soc-2011-salad/source/blender/python/SConscript
branches/soc-2011-salad/source/blender/python/generic/CMakeLists.txt
branches/soc-2011-salad/source/blender/python/generic/bgl.c
branches/soc-2011-salad/source/blender/python/intern/bpy.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/CMakeLists.txt
branches/soc-2011-salad/source/blender/render/SConscript
branches/soc-2011-salad/source/blender/render/intern/source/voxeldata.c
branches/soc-2011-salad/source/blender/windowmanager/intern/wm_files.c
branches/soc-2011-salad/source/blenderplayer/CMakeLists.txt
branches/soc-2011-salad/source/creator/CMakeLists.txt
branches/soc-2011-salad/source/gameengine/Expressions/PyObjectPlus.h
branches/soc-2011-salad/source/gameengine/Ketsji/CMakeLists.txt
branches/soc-2011-salad/source/gameengine/Ketsji/KX_PyMath.h
branches/soc-2011-salad/source/gameengine/Ketsji/KX_PythonInit.cpp
branches/soc-2011-salad/source/gameengine/Ketsji/SConscript
Added Paths:
-----------
branches/soc-2011-salad/source/blender/python/mathutils/
branches/soc-2011-salad/source/blender/python/mathutils/CMakeLists.txt
branches/soc-2011-salad/source/blender/python/mathutils/mathutils.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Color.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Color.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Euler.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Euler.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Matrix.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Matrix.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Quaternion.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Quaternion.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Vector.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Vector.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_geometry.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_geometry.h
Removed Paths:
-------------
branches/soc-2011-salad/source/blender/python/generic/mathutils.c
branches/soc-2011-salad/source/blender/python/generic/mathutils.h
branches/soc-2011-salad/source/blender/python/generic/mathutils_Color.c
branches/soc-2011-salad/source/blender/python/generic/mathutils_Color.h
branches/soc-2011-salad/source/blender/python/generic/mathutils_Euler.c
branches/soc-2011-salad/source/blender/python/generic/mathutils_Euler.h
branches/soc-2011-salad/source/blender/python/generic/mathutils_Matrix.c
branches/soc-2011-salad/source/blender/python/generic/mathutils_Matrix.h
branches/soc-2011-salad/source/blender/python/generic/mathutils_Quaternion.c
branches/soc-2011-salad/source/blender/python/generic/mathutils_Quaternion.h
branches/soc-2011-salad/source/blender/python/generic/mathutils_Vector.c
branches/soc-2011-salad/source/blender/python/generic/mathutils_Vector.h
branches/soc-2011-salad/source/blender/python/generic/mathutils_geometry.c
branches/soc-2011-salad/source/blender/python/generic/mathutils_geometry.h
branches/soc-2011-salad/source/blender/python/mathutils/CMakeLists.txt
branches/soc-2011-salad/source/blender/python/mathutils/mathutils.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Color.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Color.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Euler.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Euler.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Matrix.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Matrix.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Quaternion.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Quaternion.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Vector.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Vector.h
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_geometry.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_geometry.h
Property Changed:
----------------
branches/soc-2011-salad/
branches/soc-2011-salad/doc/python_api/rst/bge.constraints.rst
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-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38366
/trunk/blender:36834-38365
+ /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-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38366
/trunk/blender:36834-38419
Modified: branches/soc-2011-salad/CMakeLists.txt
===================================================================
--- branches/soc-2011-salad/CMakeLists.txt 2011-07-15 20:22:01 UTC (rev 38419)
+++ branches/soc-2011-salad/CMakeLists.txt 2011-07-15 20:42:15 UTC (rev 38420)
@@ -141,6 +141,7 @@
# Modifiers
option(WITH_MOD_FLUID "Enable Elbeem Modifier (Fluid Simulation)" ON)
+option(WITH_MOD_SMOKE "Enable Smoke Modifier (Smoke Simulation)" ON)
option(WITH_MOD_DECIMATE "Enable Decimate Modifier" ON)
option(WITH_MOD_BOOLEAN "Enable Boolean Modifier" ON)
option(WITH_MOD_CLOTH_ELTOPO "Enable Experemental cloth solver" OFF)
Property changes on: branches/soc-2011-salad/doc/python_api/rst/bge.constraints.rst
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: branches/soc-2011-salad/doc/python_api/rst/bgl.rst
===================================================================
--- branches/soc-2011-salad/doc/python_api/rst/bgl.rst 2011-07-15 20:22:01 UTC (rev 38419)
+++ branches/soc-2011-salad/doc/python_api/rst/bgl.rst 2011-07-15 20:42:15 UTC (rev 38420)
@@ -1379,16 +1379,17 @@
.. code-block:: python
- import Blender
- from Blender.BGL import *
+ import bgl
xval, yval= 100, 40
# Get the scale of the view matrix
- viewMatrix = Buffer(GL_FLOAT, 16)
- glGetFloatv(GL_MODELVIEW_MATRIX, viewMatrix)
- f = 1/viewMatrix[0]
- glRasterPos2f(xval*f, yval*f) # Instead of the usual glRasterPos2i(xval, yval)
+ view_matrix = bgl.Buffer(bgl.GL_FLOAT, 16)
+ bgl.glGetFloatv(bgl.GL_MODELVIEW_MATRIX, view_matrix)
+ f = 1.0 / view_matrix[0]
+ # Instead of the usual glRasterPos2i(xval, yval)
+ bgl.glRasterPos2f(xval * f, yval * f)
+
.. function:: glReadBuffer(mode):
Select a color buffer source for pixels.
@@ -1839,32 +1840,32 @@
The Buffer object is simply a block of memory that is delineated and initialized by the
user. Many OpenGL functions return data to a C-style pointer, however, because this
is not possible in python the Buffer object can be used to this end. Wherever pointer
- notation is used in the OpenGL functions the Buffer object can be used in it's BGL
+ notation is used in the OpenGL functions the Buffer object can be used in it's bgl
wrapper. In some instances the Buffer object will need to be initialized with the template
parameter, while in other instances the user will want to create just a blank buffer
which will be zeroed by default.
- Example with Buffer::
- import Blender
- from Blender import BGL
- myByteBuffer = BGL.Buffer(BGL.GL_BYTE, [32,32])
- BGL.glGetPolygonStipple(myByteBuffer)
- print myByteBuffer.dimensions
- print myByteBuffer.list
+ .. code-block:: python
+
+ import bgl
+ myByteBuffer = bgl.Buffer(bgl.GL_BYTE, [32, 32])
+ bgl.glGetPolygonStipple(myByteBuffer)
+ print(myByteBuffer.dimensions)
+ print(myByteBuffer.to_list())
sliceBuffer = myByteBuffer[0:16]
- print sliceBuffer
+ print(sliceBuffer)
- .. attribute:: list
+ .. attribute:: dimensions
- The contents of the Buffer.
+ The number of dimensions of the Buffer.
- .. attribute:: dimensions
+ .. method:: to_list()
- The size of the Buffer.
+ The contents of the Buffer as a python list.
.. method:: __init__(type, dimensions, template = None):
- This will create a new Buffer object for use with other BGL OpenGL commands.
+ This will create a new Buffer object for use with other bgl OpenGL commands.
Only the type of argument to store in the buffer and the dimensions of the buffer
are necessary. Buffers are zeroed by default unless a template is supplied, in
which case the buffer is initialized to the template.
Modified: branches/soc-2011-salad/intern/CMakeLists.txt
===================================================================
--- branches/soc-2011-salad/intern/CMakeLists.txt 2011-07-15 20:22:01 UTC (rev 38419)
+++ branches/soc-2011-salad/intern/CMakeLists.txt 2011-07-15 20:42:15 UTC (rev 38420)
@@ -31,7 +31,6 @@
add_subdirectory(memutil)
add_subdirectory(iksolver)
add_subdirectory(opennl)
-add_subdirectory(smoke)
add_subdirectory(mikktspace)
if(WITH_AUDASPACE)
@@ -42,6 +41,10 @@
add_subdirectory(elbeem)
endif()
+if(WITH_MOD_SMOKE)
+ add_subdirectory(smoke)
+endif()
+
if(WITH_MOD_DECIMATE)
add_subdirectory(container)
add_subdirectory(decimation)
Modified: branches/soc-2011-salad/intern/smoke/CMakeLists.txt
===================================================================
--- branches/soc-2011-salad/intern/smoke/CMakeLists.txt 2011-07-15 20:22:01 UTC (rev 38419)
+++ branches/soc-2011-salad/intern/smoke/CMakeLists.txt 2011-07-15 20:42:15 UTC (rev 38420)
@@ -84,7 +84,7 @@
)
if(WITH_OPENMP)
- add_definitions(-DPARALLEL=1)
+ add_definitions(-DPARALLEL=1)
endif()
if(WITH_FFTW3)
Modified: branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_texture.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_texture.py 2011-07-15 20:22:01 UTC (rev 38419)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_texture.py 2011-07-15 20:42:15 UTC (rev 38420)
@@ -88,15 +88,15 @@
@classmethod
def poll(cls, context):
engine = context.scene.render.engine
- if not hasattr(context, "texture_slot"):
+ if not (hasattr(context, "texture_slot") or hasattr(context, "texture_node")):
return False
return ((context.material or context.world or context.lamp or context.brush or context.texture or context.particle_system or isinstance(context.space_data.pin_id, bpy.types.ParticleSettings))
and (engine in cls.COMPAT_ENGINES))
def draw(self, context):
layout = self.layout
- slot = context.texture_slot
- node = context.texture_node
+ slot = getattr(context, "texture_slot", None)
+ node = getattr(context, "texture_node", None)
space = context.space_data
tex = context.texture
idblock = context_tex_datablock(context)
@@ -395,7 +395,7 @@
idblock = context_tex_datablock(context)
tex = context.texture
- slot = context.texture_slot
+ slot = getattr(context, "texture_slot", None)
split = layout.split()
@@ -410,7 +410,7 @@
col = split.column()
#Only for Material based textures, not for Lamp/World...
- if isinstance(idblock, bpy.types.Material):
+ if slot and isinstance(idblock, bpy.types.Material):
col.prop(tex, "use_normal_map")
row = col.row()
row.active = tex.use_normal_map
Modified: branches/soc-2011-salad/source/blender/blenkernel/CMakeLists.txt
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/CMakeLists.txt 2011-07-15 20:22:01 UTC (rev 38419)
+++ branches/soc-2011-salad/source/blender/blenkernel/CMakeLists.txt 2011-07-15 20:42:15 UTC (rev 38420)
@@ -313,6 +313,10 @@
add_definitions(-DDISABLE_ELBEEM)
endif()
+if(WITH_MOD_SMOKE)
+ add_definitions(-DWITH_SMOKE)
+endif()
+
if(WITH_JACK)
add_definitions(-DWITH_JACK)
endif()
Modified: branches/soc-2011-salad/source/blender/blenkernel/SConscript
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/SConscript 2011-07-15 20:22:01 UTC (rev 38419)
+++ branches/soc-2011-salad/source/blender/blenkernel/SConscript 2011-07-15 20:42:15 UTC (rev 38420)
@@ -21,6 +21,8 @@
defs = [ 'GLEW_STATIC' ]
+defs.append('WITH_SMOKE') # TODO, make optional
+
if env['WITH_BF_PYTHON']:
incs += ' ../python'
incs += ' ' + env['BF_PYTHON_INC']
Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/pointcache.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/pointcache.c 2011-07-15 20:22:01 UTC (rev 38419)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/pointcache.c 2011-07-15 20:42:15 UTC (rev 38420)
@@ -518,6 +518,7 @@
return clmd->clothObject ? clmd->clothObject->numverts : 0;
}
+#ifdef WITH_SMOKE
/* Smoke functions */
static int ptcache_smoke_totpoint(void *smoke_v, int UNUSED(cfra))
{
@@ -656,6 +657,11 @@
return 1;
}
+#else // WITH_SMOKE
+static int ptcache_smoke_totpoint(void *UNUSED(smoke_v), int UNUSED(cfra)) { return 0; };
+static void ptcache_smoke_read(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) {}
+static int ptcache_smoke_write(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) { return 0; }
+#endif // WITH_SMOKE
static int ptcache_dynamicpaint_totpoint(void *sd, int cfra)
{
Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/smoke.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/smoke.c 2011-07-15 20:22:01 UTC (rev 38419)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/smoke.c 2011-07-15 20:42:15 UTC (rev 38420)
@@ -140,6 +140,19 @@
#define TRI_UVOFFSET (1./4.)
+/* Stubs to use when smoke is disabled */
+#ifndef WITH_SMOKE
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list