[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43391] branches/bmesh/blender: svn merge ^/trunk/blender -r43345:43381

Campbell Barton ideasman42 at gmail.com
Sun Jan 15 10:16:46 CET 2012


Revision: 43391
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43391
Author:   campbellbarton
Date:     2012-01-15 09:16:39 +0000 (Sun, 15 Jan 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r43345:43381

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43345

Modified Paths:
--------------
    branches/bmesh/blender/doc/python_api/examples/bpy.types.Menu.1.py
    branches/bmesh/blender/doc/python_api/examples/bpy.types.Menu.py
    branches/bmesh/blender/doc/python_api/examples/bpy.types.Panel.1.py
    branches/bmesh/blender/doc/python_api/rst/bge.texture.rst
    branches/bmesh/blender/doc/python_api/rst/bge.types.rst
    branches/bmesh/blender/intern/cycles/blender/addon/__init__.py
    branches/bmesh/blender/release/scripts/modules/addon_utils.py
    branches/bmesh/blender/release/scripts/presets/ffmpeg/DV.py
    branches/bmesh/blender/release/scripts/presets/ffmpeg/DVD.py
    branches/bmesh/blender/release/scripts/presets/ffmpeg/SVCD.py
    branches/bmesh/blender/release/scripts/presets/ffmpeg/VCD.py
    branches/bmesh/blender/release/scripts/presets/ffmpeg/h264.py
    branches/bmesh/blender/release/scripts/presets/ffmpeg/theora.py
    branches/bmesh/blender/release/scripts/presets/ffmpeg/xvid.py
    branches/bmesh/blender/release/scripts/presets/keyconfig/maya.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/wm.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_modifier.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_render.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_scene.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_clip.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_dopesheet.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_graph.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_image.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_info.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_nla.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_sequencer.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_time.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_userpref.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/bmesh/blender/release/scripts/templates/addon_add_object.py
    branches/bmesh/blender/source/blender/blenkernel/BKE_brush.h
    branches/bmesh/blender/source/blender/blenkernel/BKE_writeavi.h
    branches/bmesh/blender/source/blender/blenkernel/BKE_writeffmpeg.h
    branches/bmesh/blender/source/blender/blenkernel/BKE_writeframeserver.h
    branches/bmesh/blender/source/blender/blenkernel/intern/brush.c
    branches/bmesh/blender/source/blender/blenkernel/intern/colortools.c
    branches/bmesh/blender/source/blender/blenkernel/intern/dynamicpaint.c
    branches/bmesh/blender/source/blender/blenkernel/intern/node.c
    branches/bmesh/blender/source/blender/blenkernel/intern/tracking.c
    branches/bmesh/blender/source/blender/blenkernel/intern/writeavi.c
    branches/bmesh/blender/source/blender/blenkernel/intern/writeffmpeg.c
    branches/bmesh/blender/source/blender/blenkernel/intern/writeframeserver.c
    branches/bmesh/blender/source/blender/blenlib/BLI_math_color.h
    branches/bmesh/blender/source/blender/blenlib/intern/math_color.c
    branches/bmesh/blender/source/blender/editors/animation/anim_ops.c
    branches/bmesh/blender/source/blender/editors/armature/armature_intern.h
    branches/bmesh/blender/source/blender/editors/armature/armature_ops.c
    branches/bmesh/blender/source/blender/editors/armature/editarmature.c
    branches/bmesh/blender/source/blender/editors/curve/curve_intern.h
    branches/bmesh/blender/source/blender/editors/curve/curve_ops.c
    branches/bmesh/blender/source/blender/editors/curve/editcurve.c
    branches/bmesh/blender/source/blender/editors/include/ED_view3d.h
    branches/bmesh/blender/source/blender/editors/interface/interface_intern.h
    branches/bmesh/blender/source/blender/editors/interface/interface_widgets.c
    branches/bmesh/blender/source/blender/editors/mesh/bmesh_select.c
    branches/bmesh/blender/source/blender/editors/mesh/mesh_intern.h
    branches/bmesh/blender/source/blender/editors/mesh/mesh_ops.c
    branches/bmesh/blender/source/blender/editors/metaball/mball_edit.c
    branches/bmesh/blender/source/blender/editors/metaball/mball_intern.h
    branches/bmesh/blender/source/blender/editors/metaball/mball_ops.c
    branches/bmesh/blender/source/blender/editors/object/object_add.c
    branches/bmesh/blender/source/blender/editors/object/object_intern.h
    branches/bmesh/blender/source/blender/editors/object/object_ops.c
    branches/bmesh/blender/source/blender/editors/object/object_select.c
    branches/bmesh/blender/source/blender/editors/physics/particle_edit.c
    branches/bmesh/blender/source/blender/editors/physics/physics_intern.h
    branches/bmesh/blender/source/blender/editors/physics/physics_ops.c
    branches/bmesh/blender/source/blender/editors/render/render_opengl.c
    branches/bmesh/blender/source/blender/editors/screen/screendump.c
    branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_image.c
    branches/bmesh/blender/source/blender/editors/space_graph/graph_ops.c
    branches/bmesh/blender/source/blender/editors/space_graph/graph_select.c
    branches/bmesh/blender/source/blender/editors/space_image/image_ops.c
    branches/bmesh/blender/source/blender/editors/space_sequencer/sequencer_intern.h
    branches/bmesh/blender/source/blender/editors/space_sequencer/sequencer_ops.c
    branches/bmesh/blender/source/blender/editors/space_sequencer/sequencer_scopes.c
    branches/bmesh/blender/source/blender/editors/space_sequencer/sequencer_select.c
    branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c
    branches/bmesh/blender/source/blender/editors/space_view3d/space_view3d.c
    branches/bmesh/blender/source/blender/editors/space_view3d/view3d_edit.c
    branches/bmesh/blender/source/blender/editors/space_view3d/view3d_view.c
    branches/bmesh/blender/source/blender/editors/transform/transform.c
    branches/bmesh/blender/source/blender/editors/transform/transform_conversions.c
    branches/bmesh/blender/source/blender/editors/uvedit/uvedit_ops.c
    branches/bmesh/blender/source/blender/makesdna/DNA_scene_types.h
    branches/bmesh/blender/source/blender/makesrna/RNA_access.h
    branches/bmesh/blender/source/blender/makesrna/intern/rna_scene.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_space.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_userdef.c
    branches/bmesh/blender/source/blender/nodes/NOD_composite.h
    branches/bmesh/blender/source/blender/nodes/composite/nodes/node_composite_doubleEdgeMask.c
    branches/bmesh/blender/source/blender/nodes/intern/node_common.c
    branches/bmesh/blender/source/blender/python/intern/bpy_rna.c
    branches/bmesh/blender/source/blender/render/intern/raytrace/rayobject.cpp
    branches/bmesh/blender/source/blender/render/intern/raytrace/rayobject_blibvh.cpp
    branches/bmesh/blender/source/blender/render/intern/raytrace/rayobject_empty.cpp
    branches/bmesh/blender/source/blender/render/intern/raytrace/rayobject_instance.cpp
    branches/bmesh/blender/source/blender/render/intern/raytrace/rayobject_octree.cpp
    branches/bmesh/blender/source/blender/render/intern/raytrace/rayobject_qbvh.cpp
    branches/bmesh/blender/source/blender/render/intern/raytrace/rayobject_svbvh.cpp
    branches/bmesh/blender/source/blender/render/intern/raytrace/rayobject_vbvh.cpp
    branches/bmesh/blender/source/blender/render/intern/raytrace/vbvh.h
    branches/bmesh/blender/source/blender/render/intern/source/pipeline.c
    branches/bmesh/blender/source/blender/render/intern/source/shadeoutput.c

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998
/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
/trunk/blender:39992-43345
   + /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998
/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
/trunk/blender:39992-43381

Modified: branches/bmesh/blender/doc/python_api/examples/bpy.types.Menu.1.py
===================================================================
--- branches/bmesh/blender/doc/python_api/examples/bpy.types.Menu.1.py	2012-01-15 07:46:59 UTC (rev 43390)
+++ branches/bmesh/blender/doc/python_api/examples/bpy.types.Menu.1.py	2012-01-15 09:16:39 UTC (rev 43391)
@@ -13,8 +13,8 @@
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("object.select_all", text="Select/Deselect All")
-        layout.operator("object.select_inverse", text="Inverse")
+        layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE'
+        layout.operator("object.select_all", text="Inverse").action = 'INVERT'
         layout.operator("object.select_random", text="Random")
 
         # access this operator as a submenu

Modified: branches/bmesh/blender/doc/python_api/examples/bpy.types.Menu.py
===================================================================
--- branches/bmesh/blender/doc/python_api/examples/bpy.types.Menu.py	2012-01-15 07:46:59 UTC (rev 43390)
+++ branches/bmesh/blender/doc/python_api/examples/bpy.types.Menu.py	2012-01-15 09:16:39 UTC (rev 43391)
@@ -27,8 +27,8 @@
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("object.select_all", text="Select/Deselect All")
-        layout.operator("object.select_inverse", text="Inverse")
+        layout.operator("object.select_all", text="Select/Deselect All").action = 'TOGGLE'
+        layout.operator("object.select_all", text="Inverse").action = 'INVERT'
         layout.operator("object.select_random", text="Random")
 
 

Modified: branches/bmesh/blender/doc/python_api/examples/bpy.types.Panel.1.py
===================================================================
--- branches/bmesh/blender/doc/python_api/examples/bpy.types.Panel.1.py	2012-01-15 07:46:59 UTC (rev 43390)
+++ branches/bmesh/blender/doc/python_api/examples/bpy.types.Panel.1.py	2012-01-15 09:16:39 UTC (rev 43391)
@@ -34,9 +34,9 @@
 
         box = layout.box()
         box.label("Selection Tools")
-        box.operator("object.select_all")
+        box.operator("object.select_all").action = 'TOGGLE'
         row = box.row()
-        row.operator("object.select_inverse")
+        row.operator("object.select_all").action = 'INVERT'
         row.operator("object.select_random")
 
 

Modified: branches/bmesh/blender/doc/python_api/rst/bge.texture.rst
===================================================================
--- branches/bmesh/blender/doc/python_api/rst/bge.texture.rst	2012-01-15 07:46:59 UTC (rev 43390)
+++ branches/bmesh/blender/doc/python_api/rst/bge.texture.rst	2012-01-15 09:16:39 UTC (rev 43391)
@@ -516,7 +516,7 @@
       line by line starting from the bottom of the image. The pixel size and format is determined by the mode
       parameter.
 
-.. function materialID(object,name)
+.. function:: materialID(object,name)
 
    Returns a numeric value that can be used in :class:`Texture` to create a dynamic texture.
 
@@ -538,7 +538,7 @@
    :type name: string
    :rtype: integer
 
-.. function setLogFile(filename)
+.. function:: setLogFile(filename)
 
    Sets the name of a text file in which runtime error messages will be written, in addition to the printing
    of the messages on the Python console. Only the runtime errors specific to the VideoTexture module

Modified: branches/bmesh/blender/doc/python_api/rst/bge.types.rst
===================================================================
--- branches/bmesh/blender/doc/python_api/rst/bge.types.rst	2012-01-15 07:46:59 UTC (rev 43390)
+++ branches/bmesh/blender/doc/python_api/rst/bge.types.rst	2012-01-15 09:16:39 UTC (rev 43391)
@@ -1765,33 +1765,29 @@
       #. Polygon shape (triangle/quad)
       #. Game Object
 
-   #. Verticies will be split by face if necessary.  Verticies can only be shared between faces if:
+   #. Vertices will be split by face if necessary.  Vertices can only be shared between faces if:
 
       #. They are at the same position
       #. UV coordinates are the same
       #. Their normals are the same (both polygons are "Set Smooth")
-      #. They are the same colour, for example: a cube has 24 verticies: 6 faces with 4 verticies per face.
+      #. They are the same colour, for example: a cube has 24 vertices: 6 faces with 4 vertices per face.
 
    The correct method of iterating over every :class:`KX_VertexProxy` in a game object
    
    .. code-block:: python
 
-      import GameLogic
+      from bge import logic
 
-      co = GameLogic.getCurrentController()
-      obj = co.owner
+      cont = logic.getCurrentController()
+      object = cont.owner
 
-      m_i = 0
-      mesh = obj.getMesh(m_i) # There can be more than one mesh...
-      while mesh != None:
-         for mat in range(mesh.getNumMaterials()):
+      for mesh in object.meshes:
+         for material in mesh.materials:
             for v_index in range(mesh.getVertexArrayLength(mat)):
                vertex = mesh.getVertex(mat, v_index)
                # Do something with vertex here...
                # ... eg: colour the vertex red.
                vertex.colour = [1.0, 0.0, 0.0, 1.0]
-         m_i += 1
-         mesh = obj.getMesh(m_i)
 
    .. attribute:: materials
 
@@ -2401,136 +2397,54 @@
 
       Some of the methods/variables are CObjects.  If you mix these up, you will crash blender.
 
-   This example requires `PyOpenGL <http://pyopengl.sourceforge.net>`_ and `GLEWPy <http://glewpy.sourceforge.net>`_
-
    .. code-block:: python
 
-      import GameLogic
-      import OpenGL
-      from OpenGL.GL import *
-      from OpenGL.GLU import *
-      import glew
-      from glew import *
+      from bge import logic
       
-      glewInit()
-      
       vertex_shader = """
       
       void main(void)
       {
+         // original vertex position, no changes
          gl_Position = ftransform();
+         // coordinate of the 1st texture channel
+         gl_TexCoord[0] = gl_MultiTexCoord0;
+         // coordinate of the 2nd texture channel
+         gl_TexCoord[1] = gl_MultiTexCoord1;
       }
       """
       
       fragment_shader ="""
-      
+
+      uniform sampler2D color_0;
+      uniform sampler2D color_1;
+      uniform float factor;
+
       void main(void)
       {
-         gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
+         vec4 color_0 = texture2D(color_0, gl_TexCoord[0].st);
+         vec4 color_1 = texture2D(color_1, gl_TexCoord[1].st);
+         gl_FragColor = mix(color_0, color_1, factor);
       }
       """
-      
-      class MyMaterial:
-         def __init__(self):
-            self.pass_no = 0
-            # Create a shader
-            self.m_program = glCreateProgramObjectARB()
-            # Compile the vertex shader
-            self.shader(GL_VERTEX_SHADER_ARB, (vertex_shader))
-            # Compile the fragment shader
-            self.shader(GL_FRAGMENT_SHADER_ARB, (fragment_shader))
-            # Link the shaders together
-            self.link()
-            
-         def PrintInfoLog(self, tag, object):
-            """
-            PrintInfoLog prints the GLSL compiler log
-            """
-            print "Tag:    def PrintGLError(self, tag = ""):
-            
-         def PrintGLError(self, tag = ""):
-            """
-            Prints the current GL error status
-            """
-            if len(tag):
-               print tag
-            err = glGetError()
-            if err != GL_NO_ERROR:
-               print "GL Error: %s\\n"%(gluErrorString(err))
-      
-         def shader(self, type, shaders):
-            """
-            shader compiles a GLSL shader and attaches it to the current
-            program.
-            
-            type should be either GL_VERTEX_SHADER_ARB or GL_FRAGMENT_SHADER_ARB
-            shaders should be a sequence of shader source to compile.
-            """
-            # Create a shader object
-            shader_object = glCreateShaderObjectARB(type)
-      
-            # Add the source code
-            glShaderSourceARB(shader_object, len(shaders), shaders)
-            
-            # Compile the shader
-            glCompileShaderARB(shader_object)
-            
-            # Print the compiler log
-            self.PrintInfoLog("vertex shader", shader_object)
-            
-            # Check if compiled, and attach if it did
-            compiled = glGetObjectParameterivARB(shader_object, GL_OBJECT_COMPILE_STATUS_ARB)
-            if compiled:
-               glAttachObjectARB(self.m_program, shader_object)
-               
-            # Delete the object (glAttachObjectARB makes a copy)
-            glDeleteObjectARB(shader_object)
-            
-            # print the gl error log
-            self.PrintGLError()
-            
-         def link(self):
-            """
-            Links the shaders together.
-            """
-            # clear error indicator
-            glGetError()
-            
-            glLinkProgramARB(self.m_program)
-      
-            self.PrintInfoLog("link", self.m_program)
-         
-            linked = glGetObjectParameterivARB(self.m_program, GL_OBJECT_LINK_STATUS_ARB)
-            if not linked:
-               print "Shader failed to link"
-               return
-      
-            glValidateProgramARB(self.m_program)
-            valid = glGetObjectParameterivARB(self.m_program, GL_OBJECT_VALIDATE_STATUS_ARB)
-            if not valid:
-               print "Shader failed to validate"
-               return
-            
-         def activate(self, rasty, cachingInfo, mat):
-            self.pass_no+=1

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list