[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28074] branches/soc-2009-yukishiro: merge till 26841

Jingyuan Huang jingyuan.huang at gmail.com
Wed Apr 7 19:18:11 CEST 2010


Revision: 28074
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28074
Author:   yukishiro
Date:     2010-04-07 19:18:11 +0200 (Wed, 07 Apr 2010)

Log Message:
-----------
merge till 26841

Modified Paths:
--------------
    branches/soc-2009-yukishiro/config/darwin-config.py
    branches/soc-2009-yukishiro/config/win32-vc-config.py
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/cdderivedmesh.c
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/mesh.c
    branches/soc-2009-yukishiro/source/blender/blenloader/intern/writefile.c
    branches/soc-2009-yukishiro/source/blender/editors/interface/interface_draw.c
    branches/soc-2009-yukishiro/source/blender/editors/space_buttons/buttons_context.c
    branches/soc-2009-yukishiro/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_ops.c
    branches/soc-2009-yukishiro/source/blender/nodes/intern/TEX_util.h
    branches/soc-2009-yukishiro/source/blender/python/intern/bpy_interface.c
    branches/soc-2009-yukishiro/source/blender/render/intern/source/rayshade.c
    branches/soc-2009-yukishiro/source/blender/windowmanager/intern/wm_init_exit.c
    branches/soc-2009-yukishiro/source/creator/CMakeLists.txt
    branches/soc-2009-yukishiro/tools/btools.py

Added Paths:
-----------
    branches/soc-2009-yukishiro/release/datafiles/splash.png
    branches/soc-2009-yukishiro/release/test/
    branches/soc-2009-yukishiro/release/test/pep8.py
    branches/soc-2009-yukishiro/release/test/rna_array.py
    branches/soc-2009-yukishiro/source/blender/editors/datafiles/splash.png.c

Removed Paths:
-------------
    branches/soc-2009-yukishiro/intern/audaspace/SDL/AUD_SDLMixerReader.cpp

Modified: branches/soc-2009-yukishiro/config/darwin-config.py
===================================================================
--- branches/soc-2009-yukishiro/config/darwin-config.py	2010-04-07 17:06:22 UTC (rev 28073)
+++ branches/soc-2009-yukishiro/config/darwin-config.py	2010-04-07 17:18:11 UTC (rev 28074)
@@ -266,9 +266,6 @@
 BF_LAPACK_LIB = 'lapack blas'
 BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
 
-
-CFLAGS = ['-pipe','-fPIC','-funsigned-char']
-
 #OpenCollada flags
 WITH_BF_COLLADA = False
 BF_COLLADA = '#source/blender/collada'
@@ -284,7 +281,6 @@
 #BF_EXPAT = '/usr'
 #BF_EXPAT_LIB = 'expat'
 #BF_EXPAT_LIBPATH = '/usr/lib'
->>>>>>> .merge-right.r26841
 
 #Ray trace optimization
 if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'i386':

Modified: branches/soc-2009-yukishiro/config/win32-vc-config.py
===================================================================
--- branches/soc-2009-yukishiro/config/win32-vc-config.py	2010-04-07 17:06:22 UTC (rev 28073)
+++ branches/soc-2009-yukishiro/config/win32-vc-config.py	2010-04-07 17:18:11 UTC (rev 28074)
@@ -157,7 +157,6 @@
 WITH_BF_RAYOPTIMIZATION = False
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
 
->>>>>>> .merge-right.r26841
 WITH_BF_STATICOPENGL = False
 BF_OPENGL_INC = '${BF_OPENGL}/include'
 BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'

Deleted: branches/soc-2009-yukishiro/intern/audaspace/SDL/AUD_SDLMixerReader.cpp
===================================================================
--- branches/soc-2009-yukishiro/intern/audaspace/SDL/AUD_SDLMixerReader.cpp	2010-04-07 17:06:22 UTC (rev 28073)
+++ branches/soc-2009-yukishiro/intern/audaspace/SDL/AUD_SDLMixerReader.cpp	2010-04-07 17:18:11 UTC (rev 28074)
@@ -1,216 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN LGPL LICENSE BLOCK *****
- *
- * Copyright 2009 Jörg Hermann Müller
- *
- * This file is part of AudaSpace.
- *
- * AudaSpace is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * AudaSpace 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with AudaSpace.  If not, see <http://www.gnu.org/licenses/>.
- *
- * ***** END LGPL LICENSE BLOCK *****
- */
-
-#include "AUD_SDLMixerReader.h"
-#include "AUD_Buffer.h"
-
-#include <cstring>
-
-inline Uint16 AUD_TO_SDL(AUD_SampleFormat format)
-{
-	// SDL only supports 8 and 16 bit audio
-	switch(format)
-	{
-	case AUD_FORMAT_U8:
-		return AUDIO_U8;
-	case AUD_FORMAT_S16:
-		return AUDIO_S16SYS;
-	default:
-		AUD_THROW(AUD_ERROR_SDL);
-	}
-}
-
-// greatest common divisor
-inline int gcd(int a, int b)
-{
-	int c;
-
-	// make sure a is the bigger
-	if(b > a)
-	{
-		c = b;
-		b = a;
-		a = c;
-	}
-
-	// greetings from Euclides
-	while(b != 0)
-	{
-		c = a % b;
-		a = b;
-		b = c;
-	}
-	return a;
-}
-
-AUD_SDLMixerReader::AUD_SDLMixerReader(AUD_IReader* reader,
-											 AUD_Specs specs)
-{
-	if(reader == NULL)
-		AUD_THROW(AUD_ERROR_READER);
-
-	m_reader = reader;
-	m_tspecs = specs;
-	m_sspecs = reader->getSpecs();
-
-	try
-	{
-		// SDL only supports 8 and 16 bit sample formats
-		if(SDL_BuildAudioCVT(&m_cvt,
-							 AUD_TO_SDL(m_sspecs.format),
-							 m_sspecs.channels,
-							 m_sspecs.rate,
-							 AUD_TO_SDL(specs.format),
-							 specs.channels,
-							 specs.rate) == -1)
-			AUD_THROW(AUD_ERROR_SDL);
-	}
-	catch(AUD_Exception e)
-	{
-		delete m_reader; AUD_DELETE("reader")
-		throw;
-	}
-
-	m_eor = false;
-	m_rsposition = 0;
-	m_rssize = 0;
-	m_ssize = m_sspecs.rate / gcd(specs.rate, m_sspecs.rate);
-	m_tsize = m_tspecs.rate * m_ssize / m_sspecs.rate;
-
-	m_buffer = new AUD_Buffer(); AUD_NEW("buffer")
-	m_rsbuffer = new AUD_Buffer(); AUD_NEW("buffer")
-}
-
-AUD_SDLMixerReader::~AUD_SDLMixerReader()
-{
-	delete m_reader; AUD_DELETE("reader")
-	delete m_buffer; AUD_DELETE("buffer")
-	delete m_rsbuffer; AUD_DELETE("buffer")
-}
-
-bool AUD_SDLMixerReader::isSeekable()
-{
-	return m_reader->isSeekable();
-}
-
-void AUD_SDLMixerReader::seek(int position)
-{
-	m_reader->seek(position * m_ssize / m_tsize);
-	m_eor = false;
-}
-
-int AUD_SDLMixerReader::getLength()
-{
-	return m_reader->getLength() * m_tsize / m_ssize;
-}
-
-int AUD_SDLMixerReader::getPosition()
-{
-	return m_reader->getPosition() * m_tsize / m_ssize;
-}
-
-AUD_Specs AUD_SDLMixerReader::getSpecs()
-{
-	return m_tspecs;
-}
-
-AUD_ReaderType AUD_SDLMixerReader::getType()
-{
-	return m_reader->getType();
-}
-
-bool AUD_SDLMixerReader::notify(AUD_Message &message)
-{
-	return m_reader->notify(message);
-}
-
-void AUD_SDLMixerReader::read(int & length, sample_t* & buffer)
-{
-	// sample count for the target buffer without getting a shift
-	int tns = length + m_tsize - length % m_tsize;
-	// sample count for the source buffer without getting a shift
-	int sns = tns * m_ssize / m_tsize;
-	// target sample size
-	int tss = AUD_SAMPLE_SIZE(m_tspecs);
-	// source sample size
-	int sss = AUD_SAMPLE_SIZE(m_sspecs);
-
-	// input is output buffer
-	int buf_size = AUD_MAX(tns*tss, sns*sss);
-
-	// resize if necessary
-	if(m_rsbuffer->getSize() < buf_size)
-		m_rsbuffer->resize(buf_size, true);
-
-	if(m_buffer->getSize() < length*tss)
-		m_buffer->resize(length*tss);
-
-	buffer = m_buffer->getBuffer();
-	int size;
-	int index = 0;
-	sample_t* buf;
-
-	while(index < length)
-	{
-		if(m_rsposition == m_rssize)
-		{
-			// no more data
-			if(m_eor)
-				length = index;
-			// mix
-			else
-			{
-				// read from source
-				size = sns;
-				m_reader->read(size, buf);
-
-				// prepare
-				m_cvt.buf = m_rsbuffer->getBuffer();
-				m_cvt.len = size*sss;
-				memcpy(m_cvt.buf, buf, size*sss);
-
-				// convert
-				SDL_ConvertAudio(&m_cvt);
-
-				// end of reader
-				if(size < sns)
-					m_eor = true;
-
-				m_rsposition = 0;
-				m_rssize = size * m_tsize / m_ssize;
-			}
-		}
-
-		// size to copy
-		size = AUD_MIN(m_rssize-m_rsposition, length-index);
-
-		// copy
-		memcpy(m_buffer->getBuffer() + index * tss,
-			   m_rsbuffer->getBuffer() + m_rsposition * tss,
-			   size*tss);
-		m_rsposition += size;
-		index += size;
-	}
-}

Added: branches/soc-2009-yukishiro/release/datafiles/splash.png
===================================================================
(Binary files differ)


Property changes on: branches/soc-2009-yukishiro/release/datafiles/splash.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: branches/soc-2009-yukishiro/release/test/pep8.py
===================================================================
--- branches/soc-2009-yukishiro/release/test/pep8.py	                        (rev 0)
+++ branches/soc-2009-yukishiro/release/test/pep8.py	2010-04-07 17:18:11 UTC (rev 28074)
@@ -0,0 +1,100 @@
+# ##### 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 os
+
+# depends on pep8, pyflakes, pylint
+# for ubuntu
+#
+#   sudo apt-get install pylint pyflakes
+#
+#   sudo apt-get install python-setuptools python-pip
+#   sudo pip install pep8
+#
+# in debian install pylint pyflakes pep8 with apt-get/aptitude/etc
+#
+# on *nix run
+#   python release/test/pep8.py > pep8_error.txt 2>&1
+
+# how many lines to read into the file, pep8 comment
+# should be directly after the licence header, ~20 in most cases
+PEP8_SEEK_COMMENT = 40
+SKIP_PREFIX = "./tools", "./config", "./scons", "./extern"
+
+
+def file_list_py(path):
+    for dirpath, dirnames, filenames in os.walk(path):
+        for filename in filenames:
+            if filename.endswith(".py"):
+                yield os.path.join(dirpath, filename)
+
+
+def is_pep8(path):
+    f = open(path, 'r')
+    for i in range(PEP8_SEEK_COMMENT):
+        line = f.readline()
+        if line.startswith("# <pep8"):
+            if line.startswith("# <pep8 compliant>"):
+                return 1
+            elif line.startswith("# <pep8-80 compliant>"):
+                return 2
+    f.close()
+    return 0
+
+
+def main():
+    files = []
+    files_skip = []
+    for f in file_list_py("."):
+        pep8_type = is_pep8(f)
+
+        if pep8_type:
+            # so we can batch them for each tool.
+            files.append((os.path.abspath(f), pep8_type))
+        else:
+            if not [None for prefix in SKIP_PREFIX if f.startswith(prefix)]:
+                files_skip.append(f)
+
+    print("\nSkipping...")
+    for f in files_skip:
+        print("    %s" % f)
+
+    # pyflakes
+    print("\n\n\n# running pep8...")
+    for f, pep8_type in files:
+        if pep8_type == 1:
+            # E501:80 line length
+            os.system("pep8 --repeat --ignore=E501 '%s'" % (f))
+        else:
+            os.system("pep8 --repeat '%s'" % (f))
+
+    print("\n\n\n# running pyflakes...")
+    for f, pep8_type in files:
+        os.system("pyflakes '%s'" % f)
+
+    print("\n\n\n# running pylint...")
+    for f, pep8_type in files:
+        # let pep8 complain about line length
+        os.system("pylint --reports=n --max-line-length=1000 '%s'" % f)
+
+if __name__ == "__main__":
+    main()
+
+

Added: branches/soc-2009-yukishiro/release/test/rna_array.py
===================================================================
--- branches/soc-2009-yukishiro/release/test/rna_array.py	                        (rev 0)
+++ branches/soc-2009-yukishiro/release/test/rna_array.py	2010-04-07 17:18:11 UTC (rev 28074)
@@ -0,0 +1,298 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list