[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39748] branches/soc-2011-pepper: * Removing mocap GSoC (is an addon already).

Joerg Mueller nexyon at gmail.com
Sun Aug 28 16:21:44 CEST 2011


Revision: 39748
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39748
Author:   nexyon
Date:     2011-08-28 14:21:44 +0000 (Sun, 28 Aug 2011)
Log Message:
-----------
* Removing mocap GSoC (is an addon already).
* Fixing ffmpeg-0.8 errors.
* Fixing Ketsji paths.
* Removing DoSound from BGE.
* Fixing audio scene update to use only current scene objects.

Modified Paths:
--------------
    branches/soc-2011-pepper/CMakeLists.txt
    branches/soc-2011-pepper/build_files/scons/config/darwin-config.py
    branches/soc-2011-pepper/build_files/scons/config/win32-vc-config.py
    branches/soc-2011-pepper/build_files/scons/config/win64-vc-config.py
    branches/soc-2011-pepper/source/blender/blenkernel/BKE_sound.h
    branches/soc-2011-pepper/source/blender/blenkernel/intern/scene.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/sound.c
    branches/soc-2011-pepper/source/gameengine/Ketsji/CMakeLists.txt
    branches/soc-2011-pepper/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    branches/soc-2011-pepper/source/gameengine/Ketsji/KX_KetsjiEngine.h

Removed Paths:
-------------
    branches/soc-2011-pepper/release/scripts/modules/mocap_constraints.py
    branches/soc-2011-pepper/release/scripts/modules/mocap_tools.py
    branches/soc-2011-pepper/release/scripts/modules/retarget.py
    branches/soc-2011-pepper/release/scripts/startup/ui_mocap.py

Modified: branches/soc-2011-pepper/CMakeLists.txt
===================================================================
--- branches/soc-2011-pepper/CMakeLists.txt	2011-08-28 13:55:59 UTC (rev 39747)
+++ branches/soc-2011-pepper/CMakeLists.txt	2011-08-28 14:21:44 UTC (rev 39748)
@@ -706,8 +706,8 @@
 
 		if(WITH_CODEC_FFMPEG)
 			set(FFMPEG_INCLUDE_DIRS
-				${LIBDIR}/ffmpeg-0.8/include
-				${LIBDIR}/ffmpeg-0.8/include/msvc
+				${LIBDIR}/ffmpeg/include
+				${LIBDIR}/ffmpeg/include/msvc
 			)
 			set(FFMPEG_LIBRARIES
 				${LIBDIR}/ffmpeg/lib/avcodec-53.lib
@@ -839,7 +839,7 @@
 		endif()
 		
 		if(WITH_CODEC_FFMPEG)
-			set(FFMPEG ${LIBDIR}/ffmpeg-0.8)
+			set(FFMPEG ${LIBDIR}/ffmpeg)
 			set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include)
 			set(FFMPEG_LIBRARIES avcodec-53 avformat-53 avdevice-53 avutil-51 swscale-2)
 			set(FFMPEG_LIBPATH ${FFMPEG}/lib)
@@ -978,7 +978,7 @@
 	endif()
 
 	if(WITH_CODEC_FFMPEG)
-		set(FFMPEG ${LIBDIR}/ffmpeg-0.8)
+		set(FFMPEG ${LIBDIR}/ffmpeg)
 		set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
 		set(FFMPEG_LIBRARIES avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
 		set(FFMPEG_LIBPATH ${FFMPEG}/lib)

Modified: branches/soc-2011-pepper/build_files/scons/config/darwin-config.py
===================================================================
--- branches/soc-2011-pepper/build_files/scons/config/darwin-config.py	2011-08-28 13:55:59 UTC (rev 39747)
+++ branches/soc-2011-pepper/build_files/scons/config/darwin-config.py	2011-08-28 14:21:44 UTC (rev 39748)
@@ -98,7 +98,7 @@
 
 # enable ffmpeg  support
 WITH_BF_FFMPEG = True  # -DWITH_FFMPEG
-BF_FFMPEG = LIBDIR + '/ffmpeg-0.8'
+BF_FFMPEG = LIBDIR + '/ffmpeg'
 BF_FFMPEG_INC = "${BF_FFMPEG}/include"
 BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
 BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'

Modified: branches/soc-2011-pepper/build_files/scons/config/win32-vc-config.py
===================================================================
--- branches/soc-2011-pepper/build_files/scons/config/win32-vc-config.py	2011-08-28 13:55:59 UTC (rev 39747)
+++ branches/soc-2011-pepper/build_files/scons/config/win32-vc-config.py	2011-08-28 14:21:44 UTC (rev 39748)
@@ -3,7 +3,7 @@
 
 # enable ffmpeg  support
 WITH_BF_FFMPEG = True  # -DWITH_FFMPEG
-BF_FFMPEG = LIBDIR +'/ffmpeg-0.8'
+BF_FFMPEG = LIBDIR +'/ffmpeg'
 BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
 BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
 BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib'

Modified: branches/soc-2011-pepper/build_files/scons/config/win64-vc-config.py
===================================================================
--- branches/soc-2011-pepper/build_files/scons/config/win64-vc-config.py	2011-08-28 13:55:59 UTC (rev 39747)
+++ branches/soc-2011-pepper/build_files/scons/config/win64-vc-config.py	2011-08-28 14:21:44 UTC (rev 39748)
@@ -3,7 +3,7 @@
 
 # enable ffmpeg  support
 WITH_BF_FFMPEG = True # -DWITH_FFMPEG
-BF_FFMPEG = LIBDIR +'/ffmpeg-0.8'
+BF_FFMPEG = LIBDIR +'/ffmpeg'
 BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc '
 BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
 BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib'

Deleted: branches/soc-2011-pepper/release/scripts/modules/mocap_constraints.py
===================================================================
--- branches/soc-2011-pepper/release/scripts/modules/mocap_constraints.py	2011-08-28 13:55:59 UTC (rev 39747)
+++ branches/soc-2011-pepper/release/scripts/modules/mocap_constraints.py	2011-08-28 14:21:44 UTC (rev 39748)
@@ -1,434 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-import bpy
-from mathutils import *
-from bl_operators import nla
-from retarget import hasIKConstraint
-
-### Utility Functions
-
-
-def getConsObj(bone):
-    #utility function - returns related IK target if bone has IK
-    ik = [constraint for constraint in bone.constraints if constraint.type == "IK"]
-    if ik:
-        ik = ik[0]
-        cons_obj = ik.target
-        if ik.subtarget:
-            cons_obj = ik.target.pose.bones[ik.subtarget]
-    else:
-        cons_obj = bone
-    return cons_obj
-
-
-def consObjToBone(cons_obj):
-    #Utility function - returns related bone from ik object
-    if cons_obj.name[-3:] == "Org":
-        return cons_obj.name[:-3]
-    else:
-        return cons_obj.name
-
-### And and Remove Constraints (called from operators)
-
-
-def addNewConstraint(m_constraint, cons_obj):
-     #Decide the correct Blender constraint according to the Mocap constraint type
-    if m_constraint.type == "point" or m_constraint.type == "freeze":
-        c_type = "LIMIT_LOCATION"
-    if m_constraint.type == "distance":
-        c_type = "LIMIT_DISTANCE"
-    if m_constraint.type == "floor":
-        c_type = "LIMIT_LOCATION"
-        #create and store the new constraint within m_constraint
-    real_constraint = cons_obj.constraints.new(c_type)
-    real_constraint.name = "Auto fixes " + str(len(cons_obj.constraints))
-    m_constraint.real_constraint_bone = consObjToBone(cons_obj)
-    m_constraint.real_constraint = real_constraint.name
-    #set the rest of the constraint properties
-    setConstraint(m_constraint, bpy.context)
-
-
-def removeConstraint(m_constraint, cons_obj):
-    #remove the influence fcurve and Blender constraint
-    oldConstraint = cons_obj.constraints[m_constraint.real_constraint]
-    removeFcurves(cons_obj, bpy.context.active_object, oldConstraint, m_constraint)
-    cons_obj.constraints.remove(oldConstraint)
-
-### Update functions. There are 3: UpdateType/Bone
-### update framing (deals with changes in the desired frame range)
-### And setConstraint which deals with the rest
-
-
-def updateConstraintBoneType(m_constraint, context):
-    #If the constraint exists, we need to remove it
-    #from the old bone
-    obj = context.active_object
-    bones = obj.pose.bones
-    if m_constraint.real_constraint:
-        bone = bones[m_constraint.real_constraint_bone]
-        cons_obj = getConsObj(bone)
-        removeConstraint(m_constraint, cons_obj)
-    #Regardless, after that we create a new constraint
-    if m_constraint.constrained_bone:
-        bone = bones[m_constraint.constrained_bone]
-        cons_obj = getConsObj(bone)
-        addNewConstraint(m_constraint, cons_obj)
-
-
-def setConstraintFraming(m_constraint, context):
-    obj = context.active_object
-    bones = obj.pose.bones
-    bone = bones[m_constraint.constrained_bone]
-    cons_obj = getConsObj(bone)
-    real_constraint = cons_obj.constraints[m_constraint.real_constraint]
-    #remove the old keyframes
-    removeFcurves(cons_obj, obj, real_constraint, m_constraint)
-    #set the new ones according to the m_constraint properties
-    s, e = m_constraint.s_frame, m_constraint.e_frame
-    s_in, s_out = m_constraint.smooth_in, m_constraint.smooth_out
-    real_constraint.influence = 1
-    real_constraint.keyframe_insert(data_path="influence", frame=s)
-    real_constraint.keyframe_insert(data_path="influence", frame=e)
-    real_constraint.influence = 0
-    real_constraint.keyframe_insert(data_path="influence", frame=s - s_in)
-    real_constraint.keyframe_insert(data_path="influence", frame=e + s_out)
-
-
-def removeFcurves(cons_obj, obj, real_constraint, m_constraint):
-    #Determine if the constrained object is a bone or an empty
-    if isinstance(cons_obj, bpy.types.PoseBone):
-        fcurves = obj.animation_data.action.fcurves
-    else:
-        fcurves = cons_obj.animation_data.action.fcurves
-    #Find the RNA data path of the constraint's influence
-    RNA_paths = []
-    RNA_paths.append(real_constraint.path_from_id("influence"))
-    if m_constraint.type == "floor" or m_constraint.type == "point":
-        RNA_paths += [real_constraint.path_from_id("max_x"), real_constraint.path_from_id("min_x")]
-        RNA_paths += [real_constraint.path_from_id("max_y"), real_constraint.path_from_id("min_y")]
-        RNA_paths += [real_constraint.path_from_id("max_z"), real_constraint.path_from_id("min_z")]
-    #Retrieve the correct fcurve via the RNA data path and remove it
-    fcurves_del = [fcurve for fcurve in fcurves if fcurve.data_path in RNA_paths]
-    #clear the fcurve and set the frames.
-    if fcurves_del:
-        for fcurve in fcurves_del:
-            fcurves.remove(fcurve)
-    #remove armature fcurves (if user keyframed m_constraint properties)
-    if obj.data.animation_data and m_constraint.type == "point":
-        if obj.data.animation_data.action:
-            path = m_constraint.path_from_id("targetPoint")
-            m_fcurves = [fcurve for fcurve in obj.data.animation_data.action.fcurves if fcurve.data_path == path]
-            for curve in m_fcurves:
-                obj.data.animation_data.action.fcurves.remove(curve)
-
-#Utility function for copying property fcurves over
-
-
-def copyFCurve(newCurve, oldCurve):
-    for point in oldCurve.keyframe_points:
-        newCurve.keyframe_points.insert(frame=point.co.x, value=point.co.y)
-
-#Creates new fcurves for the constraint properties (for floor and point)
-
-
-def createConstraintFCurves(cons_obj, obj, real_constraint):
-    if isinstance(cons_obj, bpy.types.PoseBone):
-        c_fcurves = obj.animation_data.action.fcurves
-    else:
-        c_fcurves = cons_obj.animation_data.action.fcurves
-    c_x_path = [real_constraint.path_from_id("max_x"), real_constraint.path_from_id("min_x")]

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list