Merging r44003 through r44069 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 12 Feb 2012 19:00:13 +0000 (19:00 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 12 Feb 2012 19:00:13 +0000 (19:00 +0000)
43 files changed:
doc/python_api/sphinx_doc_gen.py
doc/python_api/sphinx_doc_gen.sh
extern/CMakeLists.txt
extern/binreloc/CMakeLists.txt
extern/bullet2/CMakeLists.txt
extern/carve/CMakeLists.txt
extern/colamd/CMakeLists.txt
extern/glew/CMakeLists.txt
extern/libmv/CMakeLists.txt
extern/libopenjpeg/CMakeLists.txt
extern/libredcode/CMakeLists.txt
extern/lzma/CMakeLists.txt
extern/lzo/CMakeLists.txt
extern/recastnavigation/CMakeLists.txt
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_ui/space_logic.py
source/blender/blenfont/BLF_api.h
source/blender/blenfont/intern/blf_glyph.c
source/blender/blenkernel/BKE_booleanops_mesh.h
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenlib/BLI_callbacks.h
source/blender/blenlib/BLI_graph.h
source/blender/collada/TransformWriter.cpp
source/blender/editors/interface/resources.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/modifiers/CMakeLists.txt
source/blender/modifiers/intern/MOD_explode.c
source/blender/python/mathutils/mathutils_Vector.c
source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
source/gameengine/Ketsji/KX_FontObject.cpp
source/tests/bl_pyapi_mathutils.py

index 29fcec58ae8c16e68fc9a9e326f3aac108f96314..9540039882e89df759e393fba873e3a7c3624b4b 100644 (file)
@@ -1135,7 +1135,9 @@ def rna2sphinx(BASEPATH):
     fw("\n")
     fw("Welcome, this document is an API reference for Blender %s. built %s.\n" % (version_string, bpy.app.build_date))
     fw("\n")
-    fw("`A PDF version of this document is also available <blender_python_reference_%s.pdf>`_\n" % version_string_pdf)
+
+    # fw("`A PDF version of this document is also available <blender_python_reference_%s.pdf>`_\n" % version_string_pdf)
+    fw("`A compressed ZIP file of this site is available <blender_python_reference_%s.zip>`_\n" % version_string_pdf)
 
     fw("\n")
 
index fad9bfbbf902a5627c4feccf5815fde2be8135c0..1698e9892bc79df52199369441a05f655927d10b 100755 (executable)
@@ -11,7 +11,8 @@
 DO_UPLOAD=true
 DO_EXE_BLENDER=true
 DO_OUT_HTML=true
-DO_OUT_PDF=true
+DO_OUT_HTML_ZIP=true
+DO_OUT_PDF=false
 
 
 BLENDER="./blender.bin"
@@ -61,6 +62,17 @@ if $DO_OUT_HTML ; then
        # annoying bug in sphinx makes it very slow unless we do this. should report.
        cd $SPHINXBASE
        sphinx-build -n -b html sphinx-in sphinx-out
+
+       # ------------------------------------------------------------------------
+       # ZIP the HTML dir for upload
+
+       if $DO_OUT_HTML_ZIP ; then
+               # lame, temp rename dir
+               mv sphinx-out blender_python_reference_$BLENDER_VERSION
+               zip -r -9 blender_python_reference_$BLENDER_VERSION.zip blender_python_reference_$BLENDER_VERSION
+               mv blender_python_reference_$BLENDER_VERSION sphinx-out
+       fi
+
        cd -
 fi
 
@@ -74,6 +86,7 @@ if $DO_OUT_PDF ; then
        mv $SPHINXBASE/sphinx-out/contents.pdf $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf
 fi
 
+
 # ----------------------------------------------------------------------------
 # Upload to blender servers, comment this section for testing
 
@@ -89,8 +102,14 @@ if $DO_UPLOAD ; then
        # better redirect
        ssh $SSH_USER@emo.blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/250PythonDoc/index.html'
 
-       # rename so local PDF has matching name.
-       rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
+       if $DO_OUT_PDF ; then
+               # rename so local PDF has matching name.
+               rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf
+       fi
+
+       if $DO_OUT_HTML_ZIP ; then
+               rsync --progress -avze "ssh -p 22" $SPHINXBASE/blender_python_reference_$BLENDER_VERSION.zip $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.zip
+       fi
 
 fi
 
index 6215673eb44b39af85d50484243410412382a1f1..8442e5d0c712939164db0f3a0cad74e69db4d871 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
index 753e28091d33ea44556648bac73938737de5e735..524b884450ce391ba00b64aa10797e94f12acfd9 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2008 by The Blender Foundation
 # All rights reserved.
index 58841d606cff24ad08a8f3a66e78da6b29f0131c..51b295e897f9dba9cbae43b35c5614f8a1a4af2f 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
index abd35d33c1cd9e89dfe6dce62dc4ef4f17497d89..cbf92ee293ef9dadc488935f1d72903183ff4071 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
index 5b565518e4f8d77abb4b3c2301acd2f0f1adaca5..3019ee5904e8f0d116c73283aef955e137f03202 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2011, Blender Foundation
 # All rights reserved.
index 9704c137f8bb7636ab17f8e6ae37df37e08f1d29..34f6707398dfdc083abf45806f8d08f974e3e3bb 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
index 1e370e5f31b6a57c455853226349129445729322..075ff15a798971abf9b7646be358b5e107293258 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2011, Blender Foundation
 # All rights reserved.
index 8b79394c05342f03d13fc831f71439ee657cf490..6967048ac83362e9d34b8072d9c4dac8c0960cb1 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
index 02e219fa8713a79880136147547b39dac9dc9e53..c9d2bfc8fd623f9352859835b47233aa6cb676d2 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
index 89993d61491bb46f1b8d9d727390fa1863c3b677..31670f595f6575c5ca750624524e8a30763e2330 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
index 75b3605f75b98c4c732ea29f2d36f4b0b07cda56..5172a96e599d2b5bc9a319e4bb5f2c5878f3d7d8 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
index 05c62936dc0fb76f77b8b6393ac9f9f373d7d918..d6c7fd357b1b230957b18f0e69dcd59a2081f890 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
index 946543cc864f75dd660ca7cbc7d7af214dec69b8..1a17cd9f000bf7fcdf277964e8e6ae632f913a7c 100644 (file)
@@ -35,10 +35,11 @@ class AddPresetBase():
             name="Name",
             description="Name of the preset, used to make the path name",
             maxlen=64,
+            options={'SKIP_SAVE'},
             )
     remove_active = bpy.props.BoolProperty(
             default=False,
-            options={'HIDDEN'},
+            options={'HIDDEN', 'SKIP_SAVE'},
             )
 
     @staticmethod
@@ -195,7 +196,7 @@ class ExecutePreset(Operator):
                                  preset_class.preset_xml_map)
         else:
             self.report({'ERROR'}, "unknown filetype: %r" % ext)
-            return {'CANCELLED '}
+            return {'CANCELLED'}
 
         return {'FINISHED'}
 
index 1e68b41c645ae55888df5f102731fb702215eb38..846169b333905ad2e703c6375c21b0c954d04787 100644 (file)
@@ -57,7 +57,8 @@ class LOGIC_PT_properties(Panel):
                 props.name = 'Text'
                 props.type = 'STRING'
 
-        layout.operator("object.game_property_new", text="Add Game Property", icon='ZOOMIN')
+        props = layout.operator("object.game_property_new", text="Add Game Property", icon='ZOOMIN')
+        props.name = ''
 
         for i, prop in enumerate(game.properties):
 
index 8752defcc15f50b284f7af6ab4690c8023d6e535..a045f47cb40293717d15c478173f91fd1a874252 100644 (file)
@@ -197,7 +197,6 @@ void BLF_dir_free(char **dirs, int count);
 #define BLF_KERNING_DEFAULT (1<<3)
 #define BLF_MATRIX (1<<4)
 #define BLF_ASPECT (1<<5)
-#define BLF_TEXFILTER (1<<6)
 
 #define BLF_DRAW_STR_DUMMY_MAX 1024
 
index ab7ef8072a9808741fe34db50ec78f2065ab3bdb..f0cfcdc97b9a1d4f3de36359b68d03a5ce73d76e 100644 (file)
@@ -54,8 +54,6 @@
 #include "blf_internal_types.h"
 #include "blf_internal.h"
 
-#define _BLF_PADDING 3
-#define _BLF_MIPMAP_LEVELS 3
 
 GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font, int size, int dpi)
 {
@@ -89,11 +87,7 @@ GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font)
        gc->cur_tex= -1;
        gc->x_offs= 0;
        gc->y_offs= 0;
-       /* Increase padding for each mipmap level: 0->3, 1->4, 2->6, 3->10, ... */
-       if (font->flags & BLF_TEXFILTER)
-               gc->pad= pow(2, _BLF_MIPMAP_LEVELS) + 2;
-       else
-               gc->pad= _BLF_PADDING;
+       gc->pad= 3;
 
        gc->num_glyphs= font->face->num_glyphs;
        gc->rem_glyphs= font->face->num_glyphs;
@@ -302,17 +296,13 @@ void blf_glyph_free(GlyphBLF *g)
 
 static void blf_texture_draw(float uv[2][2], float dx, float y1, float dx1, float y2)
 {
-       /* When a string is being rendered as individual glyphs (as in the game
-        * engine), the leading edge needs to be raised a fraction to prevent
-        * z-fighting for kerned characters. - z0r */
-       const float twist = (dx1 - dx) * 0.0002f;
-
+       
        glBegin(GL_QUADS);
        glTexCoord2f(uv[0][0], uv[0][1]);
-       glVertex3f(dx, y1, twist);
+       glVertex2f(dx, y1);
        
        glTexCoord2f(uv[0][0], uv[1][1]);
-       glVertex3f(dx, y2, twist);
+       glVertex2f(dx, y2);
        
        glTexCoord2f(uv[1][0], uv[1][1]);
        glVertex2f(dx1, y2);
@@ -415,15 +405,6 @@ int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
 
                glBindTexture(GL_TEXTURE_2D, g->tex);
                glTexSubImage2D(GL_TEXTURE_2D, 0, g->xoff, g->yoff, g->width, g->height, GL_ALPHA, GL_UNSIGNED_BYTE, g->bitmap);
-               if (font->flags & BLF_TEXFILTER) {
-                       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
-                       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL,
-                                       _BLF_MIPMAP_LEVELS);
-                       glGenerateMipmap(GL_TEXTURE_2D);
-                       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-                       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
-                                       GL_LINEAR_MIPMAP_LINEAR);
-               }
                glPopClientAttrib();
 
                g->uv[0][0]= ((float)g->xoff) / ((float)gc->p2_width);
index 7c989ea17e6dadae1f6b95b34b0b75333e1be9ac..4c4a2dc9998f39e3b66a316dfa4de386547e956a 100644 (file)
@@ -24,8 +24,8 @@
  *
  * ***** END GPL LICENSE BLOCK *****
  */
-#ifndef BKE_PyBooleanOps_h
-#define BKE_PyBooleanOps_h
+#ifndef BKE_BOOLEANOPS_MESH_H
+#define BKE_BOOLEANOPS_MESH_H
 
 /** \file BKE_booleanops_mesh.h
  *  \ingroup bke
index cd3933d3c4479d4bc4419b59f9066c6e06c8c856..f0b05846670d3b51df63522baffabee0ec6530a6 100644 (file)
@@ -1365,6 +1365,35 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
        if(pind->keyed || pind->cache || point_vel)
                mul_v3_fl(result->vel, 1.f/invdt);
 }
+
+static void interpolate_pathcache(ParticleCacheKey *first, float t, ParticleCacheKey *result)
+{
+       int i=0;
+       ParticleCacheKey *cur = first;
+
+       /* scale the requested time to fit the entire path even if the path is cut early */
+       t *= (first+first->steps)->time;
+
+       while(i<first->steps && cur->time < t)
+               cur++;
+
+       if(cur->time == t)
+               *result = *cur;
+       else {
+               float dt = (t-(cur-1)->time)/(cur->time-(cur-1)->time);
+               interp_v3_v3v3(result->co, (cur-1)->co, cur->co, dt);
+               interp_v3_v3v3(result->vel, (cur-1)->vel, cur->vel, dt);
+               interp_qt_qtqt(result->rot, (cur-1)->rot, cur->rot, dt);
+               result->time = t;
+       }
+
+       /* first is actual base rotation, others are incremental from first */
+       if(cur==first || cur-1==first)
+               copy_qt_qt(result->rot, first->rot);
+       else
+               mul_qt_qtqt(result->rot, first->rot, result->rot);
+}
+
 /************************************************/
 /*                     Particles on a dm                                       */
 /************************************************/
@@ -2648,6 +2677,8 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
                        /* offset the child from the parent position */
                        offset_child(cpa, (ParticleKey*)(key[0]+k), par_rot, (ParticleKey*)child, part->childflat, part->childrad);
                }
+
+               child->time = (float)k/(float)ctx->steps;
        }
 
        /* apply effectors */
@@ -3009,6 +3040,8 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra)
 
                        if(k==1)
                                copy_v3_v3((ca-1)->vel, ca->vel);
+
+                       ca->time = (float)k/(float)steps;
                }
                /* First rotation is based on emitting face orientation.
                 * This is way better than having flipping rotations resulting
@@ -3089,6 +3122,9 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
                if(edit->totcached && !(point->flag & PEP_EDIT_RECALC))
                        continue;
 
+               if(point->totkey == 0)
+                       continue;
+
                ekey = point->keys;
 
                pind.keyed = 0;
@@ -4013,84 +4049,105 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
        CLAMP(t, 0.0f, 1.0f);
 
        if(p<totpart){
-               pa = psys->particles + p;
-               pind.keyed = keyed;
-               pind.cache = cached ? psys->pointcache : NULL;
-               pind.epoint = NULL;
-               pind.bspline = (psys->part->flag & PART_HAIR_BSPLINE);
-               /* pind.dm disabled in editmode means we dont get effectors taken into
-                * account when subdividing for instance */
-               pind.dm = psys_in_edit_mode(sim->scene, psys) ? NULL : psys->hair_out_dm;
-               init_particle_interpolation(sim->ob, psys, pa, &pind);
-               do_particle_interpolation(psys, p, pa, t, &pind, state);
-
-               if(pind.dm) {
-                       mul_m4_v3(sim->ob->obmat, state->co);
-                       mul_mat3_m4_v3(sim->ob->obmat, state->vel);
-               }
-               else if(!keyed && !cached && !(psys->flag & PSYS_GLOBAL_HAIR)) {
-                       if((pa->flag & PARS_REKEY)==0) {
-                               psys_mat_hair_to_global(sim->ob, sim->psmd->dm, part->from, pa, hairmat);
-                               mul_m4_v3(hairmat, state->co);
-                               mul_mat3_m4_v3(hairmat, state->vel);
-
-                               if(sim->psys->effectors && (part->flag & PART_CHILD_GUIDE)==0) {
-                                       do_guides(sim->psys->effectors, state, p, state->time);
-                                       /* TODO: proper velocity handling */
-                               }
+               /* interpolate pathcache directly if it exist */
+               if(psys->pathcache) {
+                       ParticleCacheKey result;
+                       interpolate_pathcache(psys->pathcache[p], t, &result);
+                       copy_v3_v3(state->co, result.co);
+                       copy_v3_v3(state->vel, result.vel);
+                       copy_qt_qt(state->rot, result.rot);
+               }
+               /* otherwise interpolate with other means */
+               else {
+                       pa = psys->particles + p;
+
+                       pind.keyed = keyed;
+                       pind.cache = cached ? psys->pointcache : NULL;
+                       pind.epoint = NULL;
+                       pind.bspline = (psys->part->flag & PART_HAIR_BSPLINE);
+                       /* pind.dm disabled in editmode means we dont get effectors taken into
+                        * account when subdividing for instance */
+                       pind.dm = psys_in_edit_mode(sim->scene, psys) ? NULL : psys->hair_out_dm;
+                       init_particle_interpolation(sim->ob, psys, pa, &pind);
+                       do_particle_interpolation(psys, p, pa, t, &pind, state);
+
+                       if(pind.dm) {
+                               mul_m4_v3(sim->ob->obmat, state->co);
+                               mul_mat3_m4_v3(sim->ob->obmat, state->vel);
+                       }
+                       else if(!keyed && !cached && !(psys->flag & PSYS_GLOBAL_HAIR)) {
+                               if((pa->flag & PARS_REKEY)==0) {
+                                       psys_mat_hair_to_global(sim->ob, sim->psmd->dm, part->from, pa, hairmat);
+                                       mul_m4_v3(hairmat, state->co);
+                                       mul_mat3_m4_v3(hairmat, state->vel);
+
+                                       if(sim->psys->effectors && (part->flag & PART_CHILD_GUIDE)==0) {
+                                               do_guides(sim->psys->effectors, state, p, state->time);
+                                               /* TODO: proper velocity handling */
+                                       }
 
-                               if(psys->lattice && edit==0)
-                                       calc_latt_deform(psys->lattice, state->co,1.0f);
+                                       if(psys->lattice && edit==0)
+                                               calc_latt_deform(psys->lattice, state->co,1.0f);
+                               }
                        }
                }
        }
        else if(totchild){
                //invert_m4_m4(imat,ob->obmat);
 
-               cpa=psys->child+p-totpart;
+               /* interpolate childcache directly if it exists */
+               if(psys->childcache) {
+                       ParticleCacheKey result;
+                       interpolate_pathcache(psys->childcache[p-totpart], t, &result);
+                       copy_v3_v3(state->co, result.co);
+                       copy_v3_v3(state->vel, result.vel);
+                       copy_qt_qt(state->rot, result.rot);
+               }
+               else {
+                       cpa=psys->child+p-totpart;
 
-               if(state->time < 0.0f)
-                       t = psys_get_child_time(psys, cpa, -state->time, NULL, NULL);
+                       if(state->time < 0.0f)
+                               t = psys_get_child_time(psys, cpa, -state->time, NULL, NULL);
                
-               if(totchild && part->childtype==PART_CHILD_FACES){
-                       /* part->parents could still be 0 so we can't test with totparent */
-                       between=1;
-               }
-               if(between){
-                       int w = 0;
-                       float foffset;
-
-                       /* get parent states */
-                       while(w<4 && cpa->pa[w]>=0){
-                               keys[w].time = state->time;
-                               psys_get_particle_on_path(sim, cpa->pa[w], keys+w, 1);
-                               w++;
+                       if(totchild && part->childtype==PART_CHILD_FACES){
+                               /* part->parents could still be 0 so we can't test with totparent */
+                               between=1;
                        }
+                       if(between){
+                               int w = 0;
+                               float foffset;
+
+                               /* get parent states */
+                               while(w<4 && cpa->pa[w]>=0){
+                                       keys[w].time = state->time;
+                                       psys_get_particle_on_path(sim, cpa->pa[w], keys+w, 1);
+                                       w++;
+                               }
 
-                       /* get the original coordinates (orco) for texture usage */
-                       cpa_num=cpa->num;
+                               /* get the original coordinates (orco) for texture usage */
+                               cpa_num=cpa->num;
                        
-                       foffset= cpa->foffset;
-                       cpa_fuv = cpa->fuv;
-                       cpa_from = PART_FROM_FACE;
+                               foffset= cpa->foffset;
+                               cpa_fuv = cpa->fuv;
+                               cpa_from = PART_FROM_FACE;
 
-                       psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa->fuv,foffset,co,0,0,0,orco,0);
+                               psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa->fuv,foffset,co,0,0,0,orco,0);
 
-                       /* we need to save the actual root position of the child for positioning it accurately to the surface of the emitter */
-                       //copy_v3_v3(cpa_1st,co);
+                               /* we need to save the actual root position of the child for positioning it accurately to the surface of the emitter */
+                               //copy_v3_v3(cpa_1st,co);
 
-                       //mul_m4_v3(ob->obmat,cpa_1st);
+                               //mul_m4_v3(ob->obmat,cpa_1st);
 
-                       pa = psys->particles + cpa->parent;
+                               pa = psys->particles + cpa->parent;
 
-                       if(part->type == PART_HAIR)
-                               psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat);
-                       else
-                               unit_m4(hairmat);
+                               if(part->type == PART_HAIR)
+                                       psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat);
+                               else
+                                       unit_m4(hairmat);
 
-                       pa=0;
-               }
-               else{
+                               pa=0;
+                       }
+                                                                                                                                                                       else{
                        /* get the parent state */
                        keys->time = state->time;
                        psys_get_particle_on_path(sim, cpa->parent, keys,1);
@@ -4114,74 +4171,75 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
                        }
                }
 
-               /* correct child ipo timing */
-#if 0 // XXX old animation system
-               if((part->flag&PART_ABS_TIME)==0 && part->ipo){
-                       calc_ipo(part->ipo, 100.0f*t);
-                       execute_ipo((ID *)part, part->ipo);
-               }
-#endif // XXX old animation system
+                       /* correct child ipo timing */
+       #if 0 // XXX old animation system
+                       if((part->flag&PART_ABS_TIME)==0 && part->ipo){
+                               calc_ipo(part->ipo, 100.0f*t);
+                               execute_ipo((ID *)part, part->ipo);
+                       }
+       #endif // XXX old animation system
                
-               /* get different child parameters from textures & vgroups */
-               memset(&ctx, 0, sizeof(ParticleThreadContext));
-               ctx.sim = *sim;
-               ctx.dm = psmd->dm;
-               ctx.ma = ma;
-               /* TODO: assign vertex groups */
-               get_child_modifier_parameters(part, &ctx, cpa, cpa_from, cpa_num, cpa_fuv, orco, &ptex);
-
-               if(between){
-                       int w=0;
+                       /* get different child parameters from textures & vgroups */
+                       memset(&ctx, 0, sizeof(ParticleThreadContext));
+                       ctx.sim = *sim;
+                       ctx.dm = psmd->dm;
+                       ctx.ma = ma;
+                       /* TODO: assign vertex groups */
+                       get_child_modifier_parameters(part, &ctx, cpa, cpa_from, cpa_num, cpa_fuv, orco, &ptex);
+
+                       if(between){
+                               int w=0;
+
+                               state->co[0] = state->co[1] = state->co[2] = 0.0f;
+                               state->vel[0] = state->vel[1] = state->vel[2] = 0.0f;
+
+                               /* child position is the weighted sum of parent positions */
+                               while(w<4 && cpa->pa[w]>=0){
+                                       state->co[0] += cpa->w[w] * keys[w].co[0];
+                                       state->co[1] += cpa->w[w] * keys[w].co[1];
+                                       state->co[2] += cpa->w[w] * keys[w].co[2];
+
+                                       state->vel[0] += cpa->w[w] * keys[w].vel[0];
+                                       state->vel[1] += cpa->w[w] * keys[w].vel[1];
+                                       state->vel[2] += cpa->w[w] * keys[w].vel[2];
+                                       w++;
+                               }
+                               /* apply offset for correct positioning */
+                               //add_v3_v3(state->co, cpa_1st);
+                       }
+                       else{
+                               /* offset the child from the parent position */
+                               offset_child(cpa, keys, keys->rot, state, part->childflat, part->childrad);
+                       }
 
-                       state->co[0] = state->co[1] = state->co[2] = 0.0f;
-                       state->vel[0] = state->vel[1] = state->vel[2] = 0.0f;
+                       par = keys;
 
-                       /* child position is the weighted sum of parent positions */
-                       while(w<4 && cpa->pa[w]>=0){
-                               state->co[0] += cpa->w[w] * keys[w].co[0];
-                               state->co[1] += cpa->w[w] * keys[w].co[1];
-                               state->co[2] += cpa->w[w] * keys[w].co[2];
-
-                               state->vel[0] += cpa->w[w] * keys[w].vel[0];
-                               state->vel[1] += cpa->w[w] * keys[w].vel[1];
-                               state->vel[2] += cpa->w[w] * keys[w].vel[2];
-                               w++;
-                       }
-                       /* apply offset for correct positioning */
-                       //add_v3_v3(state->co, cpa_1st);
-               }
-               else{
-                       /* offset the child from the parent position */
-                       offset_child(cpa, keys, keys->rot, state, part->childflat, part->childrad);
-               }
+                       if(vel)
+                               copy_particle_key(&tstate, state, 1);
 
-               par = keys;
+                       /* apply different deformations to the child path */
+                       do_child_modifiers(sim, &ptex, par, par->rot, cpa, orco, hairmat, state, t);
 
-               if(vel)
-                       copy_particle_key(&tstate, state, 1);
+                       /* try to estimate correct velocity */
+                       if(vel){
+                               ParticleKey tstate;
+                               float length = len_v3(state->vel);
 
-               /* apply different deformations to the child path */
-               do_child_modifiers(sim, &ptex, par, par->rot, cpa, orco, hairmat, state, t);
-
-               /* try to estimate correct velocity */
-               if(vel){
-                       ParticleKey tstate;
-                       float length = len_v3(state->vel);
-
-                       if(t>=0.001f){
-                               tstate.time=t-0.001f;
-                               psys_get_particle_on_path(sim,p,&tstate,0);
-                               sub_v3_v3v3(state->vel,state->co,tstate.co);
-                               normalize_v3(state->vel);
-                       }
-                       else{
-                               tstate.time=t+0.001f;
-                               psys_get_particle_on_path(sim,p,&tstate,0);
-                               sub_v3_v3v3(state->vel,tstate.co,state->co);
-                               normalize_v3(state->vel);
-                       }
+                               if(t>=0.001f){
+                                       tstate.time=t-0.001f;
+                                       psys_get_particle_on_path(sim,p,&tstate,0);
+                                       sub_v3_v3v3(state->vel,state->co,tstate.co);
+                                       normalize_v3(state->vel);
+                               }
+                               else{
+                                       tstate.time=t+0.001f;
+                                       psys_get_particle_on_path(sim,p,&tstate,0);
+                                       sub_v3_v3v3(state->vel,tstate.co,state->co);
+                                       normalize_v3(state->vel);
+                               }
 
-                       mul_v3_fl(state->vel, length);
+                               mul_v3_fl(state->vel, length);
+                       }
                }
        }
 }
index 5a64da7354ed52209202d08d85021f7a141b235d..c00101c98ab8c01685f72b8a90a2672b40214713 100644 (file)
@@ -3407,6 +3407,7 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra)
        ParticleSystem *psys = sim->psys;
        ParticleSettings *part = psys->part;
        ParticleEditSettings *pset = &sim->scene->toolsettings->particle;
+       Base *base;
        int distr=0, alloc=0, skip=0;
 
        if((psys->part->childtype && psys->totchild != get_psys_tot_child(sim->scene, psys)) || psys->recalc&PSYS_RECALC_RESET)
@@ -3449,6 +3450,19 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra)
                }
        }
 
+
+       /* particle instance modifier with "path" option need cached paths even if particle system doesn't */
+       for (base = sim->scene->base.first; base; base= base->next) {
+               ModifierData *md = modifiers_findByType(base->object, eModifierType_ParticleInstance);
+               if(md) {
+                       ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *)md;
+                       if(pimd->flag & eParticleInstanceFlag_Path && pimd->ob == sim->ob && pimd->psys == (psys - (ParticleSystem*)sim->ob->particlesystem.first)) {
+                               skip = 0;
+                               break;
+                       }
+               }
+       }
+
        if(!skip) {
                psys_cache_paths(sim, cfra);
 
@@ -4414,6 +4428,7 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys)
                        if(psys->totpart == 0 && part->totpart == 0) {
                                psys_free_path_cache(psys, NULL);
                                free_hair(ob, psys, 0);
+                               psys->flag |= PSYS_HAIR_DONE;
                        }
                        /* (re-)create hair */
                        else if(hair_needs_recalc(psys)) {
index 7e4fad54cdae60d6ab823e03b78f982f37830f11..201ada45acfb63f62f8fe3286af330d0f289bbf2 100644 (file)
@@ -29,7 +29,6 @@
  *  \ingroup bli
  */
 
-
 #ifndef BLI_CALLBACKS_H
 #define BLI_CALLBACKS_H
 
@@ -64,12 +63,11 @@ typedef struct {
 void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt);
 void BLI_add_cb(bCallbackFuncStore *funcstore, eCbEvent evt);
 
-#endif
-
-
 void BLI_cb_init(void);
 void BLI_cb_finalize(void);
 
 
 /* This is blenlib internal only, unrelated to above */
 void callLocalErrorCallBack(const char* msg);
+
+#endif /* BLI_CALLBACKS_H */
index f625c7bb2d4a06fcd1464d01ed0886164cb64c07..056bba71dea91f32297fbbb7bf244b5e62e0c89c 100644 (file)
@@ -1,3 +1,27 @@
+/*
+ * ***** 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.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Joshua Leung
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
 #ifndef BLI_GRAPH_H_
 #define BLI_GRAPH_H_
 
index a2bca6733e1d4670d78055173fd09792947c36f2..c806cd4858785de574dff8720d1b98af4329c92b 100644 (file)
@@ -103,8 +103,7 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node& node, Object *ob)
                if(ob->parentinv[i%4][i/4] != f) add_parinv = true;
        }
 
-       // Eat this 3ds Max et friends
-       if(add_parinv)
+       if(add_parinv && ob->parent)
        {
                double dmat[4][4];
                UnitConverter converter;
index a70db7ad23500994cd9e9ec9330e78c20c873f17..5eacef1478abaf037b8017038b92c794b88c98bf 100644 (file)
@@ -590,9 +590,9 @@ static void ui_theme_init_new(bTheme *btheme)
 
 
 /* initialize default theme
  Note: when you add new colors, created & saved themes need initialized
-   use function below, init_userdef_do_versions() 
-*/
* Note: when you add new colors, created & saved themes need initialized
+ * use function below, init_userdef_do_versions()
+ */
 void ui_theme_init_default(void)
 {
        bTheme *btheme;
@@ -613,7 +613,9 @@ void ui_theme_init_default(void)
        /* UI buttons */
        ui_widget_color_init(&btheme->tui);
        btheme->tui.iconfile[0]= 0;
-       
+       btheme->tui.panel.show_header = FALSE;
+       SETCOL(btheme->tui.panel.header, 0, 0, 0, 25);
+
        /* Bone Color Sets */
        ui_theme_init_boneColorSets(btheme);
        
index b10fbaf69b74ce21e566c13dcee7954656ccfec2..09ae5e08d605f1ce335beeaaa997f3ed3dbbe21d 100644 (file)
@@ -403,6 +403,10 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
                free_editMesh(me->edit_mesh);
                MEM_freeN(me->edit_mesh);
                me->edit_mesh= NULL;
+
+               /* load_editMesh free's pointers used by CustomData layers which might be used by DerivedMesh too,
+                * so signal to re-create DerivedMesh here (sergey) */
+               DAG_id_tag_update(&me->id, 0);
        }
 
        /* dummie drop support; ensure view shows a result :) */
index 0d724dc1b280143f12d7747e84ce15120b94d05f..2c652df93a088f3901c7ae8bce240cbd1cb8b778 100644 (file)
@@ -44,6 +44,7 @@
 #include "DNA_curve_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_meta_types.h"
+#include "DNA_userdef_types.h"
 
 #include "BKE_context.h"
 #include "BKE_customdata.h"
@@ -1821,8 +1822,9 @@ static int frame_offset_exec(bContext *C, wmOperator *op)
        
        delta = RNA_int_get(op->ptr, "delta");
 
-       scene->r.cfra += delta;
-       scene->r.subframe = 0.f;
+       CFRA += delta;
+       FRAMENUMBER_MIN_CLAMP(CFRA);
+       SUBFRA = 0.f;
        
        sound_seek_scene(bmain, scene);
 
index eaa04a1e09ec79c1270e4b7e483522a79cc3c874..942e1024c0516373bbfaf2a0e92de0777e6d080e 100644 (file)
@@ -441,15 +441,15 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
                                uiBlockSetEmboss(block, UI_EMBOSSN);
                                
                                restrict_bool= group_restrict_flag(gr, OB_RESTRICT_VIEW);
-                               bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_VIEW_ON : ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, NULL, 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+                               bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_VIEW_ON : ICON_RESTRICT_VIEW_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_VIEWX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, NULL, 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
                                uiButSetFunc(bt, restrictbutton_gr_restrict_view, scene, gr);
 
                                restrict_bool= group_restrict_flag(gr, OB_RESTRICT_SELECT);
-                               bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_SELECT_ON : ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, NULL, 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
+                               bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_SELECT_ON : ICON_RESTRICT_SELECT_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_SELECTX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, NULL, 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
                                uiButSetFunc(bt, restrictbutton_gr_restrict_select, scene, gr);
        
                                restrict_bool= group_restrict_flag(gr, OB_RESTRICT_RENDER);
-                               bt = uiDefIconBut(block, BUT, 0, restrict_bool ? ICON_RESTRICT_RENDER_ON : ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, NULL, 0, 0, 0, 0, "Restrict/Allow renderability");
+                               bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_RENDER_ON : ICON_RESTRICT_RENDER_OFF, (int)ar->v2d.cur.xmax-OL_TOG_RESTRICT_RENDERX, (int)te->ys, UI_UNIT_X-1, UI_UNIT_Y-1, NULL, 0, 0, 0, 0, "Restrict/Allow renderability");
                                uiButSetFunc(bt, restrictbutton_gr_restrict_render, scene, gr);
 
                                uiBlockSetEmboss(block, UI_EMBOSS);
index 562cbf45e86add5a39eceabb12becbdb2d315668..eb910b0b0b5540b706d4f917f0ae850a2105e7a7 100644 (file)
@@ -500,7 +500,7 @@ static int outliner_toggle_renderability_exec(bContext *C, wmOperator *UNUSED(op
        
        outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_renderability_cb);
        
-       ED_region_tag_redraw(ar);
+       WM_event_add_notifier(C, NC_SCENE|ND_OB_RENDER, scene);
        
        return OPERATOR_FINISHED;
 }
index a040c63b2ab834f03a3115ae429ba00a43158c55..ebbe28e62fac7bfbf9159b61d4e11dea5fbb6dc9 100644 (file)
@@ -265,6 +265,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
                case NC_ANIMATION:
                        switch(wmn->data) {
                                case ND_NLA_ACTCHANGE:
+                               case ND_KEYFRAME:
                                        ED_region_tag_redraw(ar);
                                        break;
                                case ND_ANIMCHAN:
index 66aefc72f3301593da3ece05d5e645a9f35df9b2..03fd22d104574e28baf5623fc033192d9b5934a2 100644 (file)
@@ -325,20 +325,22 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
                        RNA_string_get(&itemptr, "name", file_only);
                        BLI_join_dirfile(seq_load.path, sizeof(seq_load.path), dir_only, file_only);
 
-                       seq= seq_load_func(C, ed->seqbasep, &seq_load);
-
-                       if(overlap == FALSE) {
-                               if(seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
+                       seq = seq_load_func(C, ed->seqbasep, &seq_load);
+                       if (seq) {
+                               if(overlap == FALSE) {
+                                       if(seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
+                               }
                        }
                }
                RNA_END;
        }
        else {
                /* single file */
-               seq= seq_load_func(C, ed->seqbasep, &seq_load);
-
-               if(overlap == FALSE) {
-                       if(seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
+               seq = seq_load_func(C, ed->seqbasep, &seq_load);
+               if (seq) {
+                       if(overlap == FALSE) {
+                               if(seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene);
+                       }
                }
        }
 
@@ -711,7 +713,8 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven
 
        if (is_type_set && type==SEQ_PLUGIN) {
                /* only plugins need the file selector */
-               return WM_operator_filesel(C, op, event);
+               WM_event_add_fileselect(C, op);
+               return OPERATOR_RUNNING_MODAL;
        }
        else {
                return sequencer_add_effect_strip_exec(C, op);
index 59802f2cf58d46a0f2f3b4b06526d22bf9fd62ab..926faeb417e34086795922ae9d479ddc33e88378 100644 (file)
@@ -598,9 +598,6 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int
                if(use_high_bit_depth) {
                        fscalerect= MEM_mallocN(rectw*recth*sizeof(*fscalerect)*4, "fscalerect");
                        gluScaleImage(GL_RGBA, tpx, tpy, GL_FLOAT, frect, rectw, recth, GL_FLOAT, fscalerect);
-                       /* frect will refer to ibuf->rect_float when not color converting. We don't want to free that */
-                       if(do_color_management)
-                               MEM_freeN(frect);
 
                        frect = fscalerect;
                }
index a6672130dc304b3725e44b9608c1782bb3d27ea1..a3e3eb19a5b2cd89afe9b656a7078e1975eeb894 100644 (file)
@@ -174,7 +174,8 @@ void GPU_extensions_init(void)
                   strstr(renderer, "R5") || strstr(renderer, "RV5") ||
                   strstr(renderer, "RS600") || strstr(renderer, "RS690") ||
                   strstr(renderer, "RS740") || strstr(renderer, "X1") ||
-                  strstr(renderer, "X2"))
+                  strstr(renderer, "X2") || strstr(renderer, "Radeon 9") ||
+                  strstr(renderer, "RADEON 9"))
                        GG.npotdisabled = 1;
        }
 
index cb4151d8aee8eb1f0d8418ad561f2bb806e9ca09..80ddc023250fef49aeb975282547070af8c7aa5f 100644 (file)
@@ -1976,6 +1976,11 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Use Grease Pencil", "Display and edit the grease pencil freehand annotations overlay");
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
        
+       prop= RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES);
+       RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+
        /* grease pencil */
        prop= RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "gpd");
index bc7f446d815848b20c35d7821bcb8f739807b15a..f7c85583150944a5a4783f7947a2465838ce24e3 100644 (file)
@@ -2080,6 +2080,7 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
        prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
        RNA_def_property_ui_text(prop, "Name", "Name of the theme");
        RNA_def_struct_name_property(srna, prop);
+       RNA_def_property_flag(prop, PROP_SKIP_SAVE); /* XXX: for now putting this in presets is silly - its just Default */
 
        prop= RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "active_theme_area");
index 8ae597f2d1c55d3a0dc7084d3bc1b383591c09c9..4f8f301dcbda363809d8656138de011a7bc52f1e 100644 (file)
@@ -67,6 +67,14 @@ EnumPropertyItem event_value_items[] = {
        {KM_RELEASE, "RELEASE", 0, "Release", ""},
        {KM_CLICK, "CLICK", 0, "Click", ""},
        {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
+       {EVT_GESTURE_N, "NORTH", 0, "North", ""},
+       {EVT_GESTURE_NE, "NORTH_EAST", 0, "North-East", ""},
+       {EVT_GESTURE_E, "EAST", 0, "East", ""},
+       {EVT_GESTURE_SE, "SOUTH_EAST", 0, "South-East", ""},
+       {EVT_GESTURE_S, "SOUTH", 0, "South", ""},
+       {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""},
+       {EVT_GESTURE_W, "WEST", 0, "West", ""},
+       {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""},
        {0, NULL, 0, NULL, NULL}};
 
 EnumPropertyItem event_tweak_type_items[]= {
index c6cb658497351ee4e6bd92bf6c6e34761982f038..fabaa6624d435cce3a4fc992c1748811b7ff1565 100644 (file)
@@ -12,7 +12,7 @@
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
index b18be28ac7f2c701ee73fea90c7d2fd059741f5f..d00d76f6f6b249ed8579bd3606e5c1603fca78e7 100644 (file)
@@ -789,8 +789,8 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
        float cfra;
        /* float timestep; */
        int *facepa=emd->facepa;
-       int totdup=0,totvert=0,totface=0,totpart=0;
-       int i, v;
+       int totdup=0,totvert=0,totface=0,totpart=0,delface=0;
+       int i, v, u;
        unsigned int ed_v1, ed_v2, mindex=0;
        MTFace *mtface = NULL, *mtf;
 
@@ -812,6 +812,18 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
        vertpahash= BLI_edgehash_new();
 
        for (i=0; i<totface; i++) {
+               if(facepa[i]!=totpart)
+               {
+                       pa=pars+facepa[i];
+
+                       if((pa->alive==PARS_UNBORN && (emd->flag&eExplodeFlag_Unborn)==0)
+                               || (pa->alive==PARS_ALIVE && (emd->flag&eExplodeFlag_Alive)==0)
+                               || (pa->alive==PARS_DEAD && (emd->flag&eExplodeFlag_Dead)==0)) {
+                               delface++;
+                               continue;
+                       }
+               }
+
                /* do mindex + totvert to ensure the vertex index to be the first
                 * with BLI_edgehashIterator_getKey */
                if(facepa[i]==totpart || cfra < (pars+facepa[i])->time)
@@ -838,7 +850,7 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
        BLI_edgehashIterator_free(ehi);
 
        /* the final duplicated vertices */
-       explode= CDDM_from_template(dm, totdup, 0,totface);
+       explode= CDDM_from_template(dm, totdup, 0,totface-delface);
        mtface = CustomData_get_layer_named(&explode->faceData, CD_MTFACE, emd->uvname);
        /*dupvert= CDDM_get_verts(explode);*/
 
@@ -893,7 +905,7 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
        BLI_edgehashIterator_free(ehi);
 
        /*map new vertices to faces*/
-       for (i=0; i<totface; i++) {
+       for (i=0,u=0; i<totface; i++) {
                MFace source;
                int orig_v4;
 
@@ -907,7 +919,7 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
                }
 
                dm->getFace(dm,i,&source);
-               mf=CDDM_get_face(explode,i);
+               mf=CDDM_get_face(explode,u);
                
                orig_v4 = source.v4;
 
@@ -922,7 +934,7 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
                if(source.v4)
                        source.v4 = edgecut_get(vertpahash, source.v4, mindex);
 
-               DM_copy_face_data(dm,explode,i,i,1);
+               DM_copy_face_data(dm,explode,i,u,1);
 
                *mf = source;
 
@@ -932,13 +944,14 @@ static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
                        /* Clamp to this range to avoid flipping to the other side of the coordinates. */
                        CLAMP(age, 0.001f, 0.999f);
 
-                       mtf = mtface + i;
+                       mtf = mtface + u;
 
                        mtf->uv[0][0] = mtf->uv[1][0] = mtf->uv[2][0] = mtf->uv[3][0] = age;
                        mtf->uv[0][1] = mtf->uv[1][1] = mtf->uv[2][1] = mtf->uv[3][1] = 0.5f;
                }
 
-               test_index_face(mf, &explode->faceData, i, (orig_v4 ? 4 : 3));
+               test_index_face(mf, &explode->faceData, u, (orig_v4 ? 4 : 3));
+               u++;
        }
 
        /* cleanup */
index dec701d5fc30985cd0a7415bd9b49aa809bdf6b4..765df7afcf9c8976782b37780eca08a8dfc5634e 100644 (file)
@@ -1497,7 +1497,7 @@ int column_vector_multiplication(float r_vec[MAX_DIMENSIONS], VectorObject *vec,
                        vec_cpy[3] = 1.0f;
                }
                else {
-                       PyErr_SetString(PyExc_TypeError,
+                       PyErr_SetString(PyExc_ValueError,
                                        "matrix * vector: "
                                                        "len(matrix.col) and len(vector) must be the same, "
                                        "except for 4x4 matrix * 3D vector.");
index 78dcfc8edd9120bc3f8aff5d92b9b515839772dd..7a99a4a1419877ffb903bc034dd5eee12fea4eec 100644 (file)
@@ -136,8 +136,8 @@ void BL_print_game_line(int fontid, const char* text, int size, int dpi, float*
        /* the actual drawing */
        glColor4fv(color);
 
-       BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT|BLF_TEXFILTER);
        /* multiply the text matrix by the object matrix */
+       BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT);
        BLF_matrix(fontid, mat);
 
        /* aspect is the inverse scale that allows you to increase */
@@ -149,7 +149,7 @@ void BL_print_game_line(int fontid, const char* text, int size, int dpi, float*
        BLF_position(fontid, 0, 0, 0);
        BLF_draw(fontid, (char *)text, 65535);
 
-       BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT|BLF_TEXFILTER);
+       BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT);
 }
 
 void BL_print_gamedebug_line(const char* text, int xco, int yco, int width, int height)
index b06a9783b5071eea09c777f754420399eca2470d..55e3220c08caafff3a0b5b2bf81347eeea690369 100644 (file)
@@ -292,10 +292,10 @@ void GPC_RenderTools::RenderText3D(       int fontid,
                                                                        float aspect)
 {
        /* the actual drawing */
-       glColor3fv(color);
+       glColor4fv(color);
  
-       BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT|BLF_TEXFILTER);
        /* multiply the text matrix by the object matrix */
+       BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT);
        BLF_matrix(fontid, mat);
 
        /* aspect is the inverse scale that allows you to increase */
@@ -307,7 +307,7 @@ void GPC_RenderTools::RenderText3D( int fontid,
        BLF_position(fontid, 0, 0, 0);
        BLF_draw(fontid, text, 65535);
 
-       BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT|BLF_TEXFILTER);
+       BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT);
        glEnable(GL_DEPTH_TEST);
 }
 
index 8cce9471587222eda1cb64083706d617b0dd7f5b..519ff97a2a244102e8a1f7885595324e312fc3d9 100644 (file)
@@ -173,10 +173,10 @@ void KX_FontObject::DrawText()
        this->GetObjectColor().getValue(m_color);
 
        /* HARDCODED MULTIPLICATION FACTOR - this will affect the render resolution directly */
-       float RES = BGE_FONT_RES * m_resolution;
+       const float RES = BGE_FONT_RES * m_resolution;
 
-       float size = m_fsize * m_object->size[0] * RES;
-       float aspect = 1.f / (m_object->size[0] * RES);
+       const float size = m_fsize * this->NodeGetWorldScaling()[0] * RES;
+       const float aspect = m_fsize / size;
 
        /* Get a working copy of the OpenGLMatrix to use */
        double mat[16];
index b2e9f27d9ec5cc18dd3cccc36ac250da498d3a47..a37f74463eec65400a4812aa58c5a71ad213c3ac 100644 (file)
@@ -111,8 +111,8 @@ class MatrixTesting(unittest.TestCase):
 
         vec = Vector((1, 2))
 
-        self.assertRaises(TypeError, mat1.__mul__, vec)
-        self.assertRaises(ValueError, vec.__mul__, mat1)  # Why are these different?!
+        self.assertRaises(ValueError, mat1.__mul__, vec)
+        self.assertRaises(ValueError, vec.__mul__, mat1)
 
         mat2 = Matrix(((1, 2),
                        (-2, 3)))