2.5 - NLA SoC Branch Merged to 2.5!
authorJoshua Leung <aligorith@gmail.com>
Sat, 11 Jul 2009 05:41:21 +0000 (05:41 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sat, 11 Jul 2009 05:41:21 +0000 (05:41 +0000)
(19863 to 21513)

Highlights of the new NLA System (and related Animation System changes):
* NLA Data is stored in AnimData alongside Action and Drivers. The NLA stack is evaluated before the Action, with the Action always overriding the results of the stack.
* NLA Data is arranged in 'Tracks', which act like PhotoShop layers. These can be muted, protected, and/or made to be played back by themselves
* Within each track, there can be multiple 'Strips'. There are 3 types of strip -> Action Clip (references some action), Transition (blends between the endpoints of two strips), and Meta (container for several strips that occur sequentially)
* FModifiers can be applied to strips, and strips can have animated influence/time controls. Playback for strips can also be backwards now!
* Playback can now go in forward and backwards directions.
* Animation Editors have been polished (unfinished features added, existing features cleaned up and made more consistent)

Notes for BuildSystem Maintainers:
* Only scons has been actively tested. Makefiles should work fine.
* MSVC ProjectFiles are broken due to the very way they work.
* CMake status unknown...

Other notes:
* Hopefully I haven't made any mistakes while doing the merge. More files than expected were showing some weird conflicts, so you may have some broken code...
* Not all old files (with NLA) data load exactly the same anymore. However, the bulk of the files out there should be ok (I hope)

14 files changed:
release/scripts/textplugin_convert_ge.py
release/scripts/wizard_bolt_factory.py
release/ui/buttons_data_modifier.py
source/blender/editors/interface/view2d.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/python/generic/quat.c
source/blender/python/intern/bpy_util.c
source/gameengine/Converter/BL_ModifierDeformer.cpp
source/gameengine/Converter/BL_ModifierDeformer.h
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/PyDoc/API_intro.py
source/gameengine/SceneGraph/SG_DList.h
source/gameengine/SceneGraph/SG_QList.h

index f3b44cdb14b2ede42a5b367830c0670df5e9689e..21e065bcfd777b04dc698da54349f028fbd8e77d 100644 (file)
@@ -718,7 +718,7 @@ def convert248to249(lines, log = True, logErrors = True, fileName = None):
                                try:
                                        # Convert!
                                        func(lines, row, match.start(1), match.end(1), closure)
-                               except ConversionError as e:
+                               except ConversionError, e:
                                        # Insert a comment saying the conversion failed.
                                        print "ERROR: %sline %d, %s: %s\n" % (
                                                fileIdStr, row + 1, attrName, e)
index 6a280eccc5899569ec777ddd90d69ff075b28d81..2d653b211d5bb350b04adb1eec473c6650fa0bd1 100644 (file)
@@ -8,7 +8,7 @@ Tooltip: 'Create models of various types of screw fasteners.'
 """
 
 __author__ = " Aaron Keith (Spudmn) "
-__version__ = "2.00 2009/05/22"
+__version__ = "2.02 2009/06/10"
 __url__ = ["Author's site,http://sourceforge.net/projects/boltfactory/", "Blender,http://wiki.blender.org/index.php/Extensions:Py/Scripts/Manual/Misc/Bolt_Factory"]
 __bpydoc__ = """\
 Bolt_Factory.py 
@@ -22,6 +22,13 @@ with default settings.
 
 
 History:
+ V2.02 10/06/09 by Aaron Keith
+
+    -Added changes made by the Blender team.
+
+ V2.01 26/05/09 by Aaron Keith
+
+    -    Fixed normal's on Lock Nut
 
 V2.00 22/05/09 by Aaron Keith
 
@@ -2005,7 +2012,7 @@ def add_Nylon_Head(OUTSIDE_RADIUS,Z_LOCATION = 0):
     sVerts,sFaces = SpinDup(verts,faces,360,DIV,'z')
     sVerts.extend(verts)        #add the start verts to the Spin verts to complete the loop
     
-    faces.extend(Build_Face_List_Quads(FaceStart,Row-1,DIV))
+    faces.extend(Build_Face_List_Quads(FaceStart,Row-1,DIV,1))
 
     return Move_Verts_Up_Z(sVerts,0),faces,Lowest_Z_Vert
 
@@ -2059,7 +2066,7 @@ def add_Nylon_Part(OUTSIDE_RADIUS,Z_LOCATION = 0):
     sVerts,sFaces = SpinDup(verts,faces,360,DIV,'z')
     sVerts.extend(verts)  #add the start verts to the Spin verts to complete the loop
     
-    faces.extend(Build_Face_List_Quads(FaceStart,Row-1,DIV))
+    faces.extend(Build_Face_List_Quads(FaceStart,Row-1,DIV,1))
 
     return sVerts,faces,0 - Lowest_Z_Vert
 
@@ -2594,8 +2601,8 @@ def Create_Tab(X1,Y1,X2,Y2,Title,Buttons): # X1,Y1 = Top Left X2,Y2 = Bottom Rig
     
 def Dispaly_Title_Bar(Y_POS,CONTROL_HEIGHT):
     CONTROL_WIDTH = 250
-    Create_Tab(3,Y_POS,CONTROL_WIDTH,Y_POS -CONTROL_HEIGHT,"Bolt Factory V2.00",Model_Type)
-    
+    Create_Tab(3,Y_POS,CONTROL_WIDTH,Y_POS -CONTROL_HEIGHT,"Bolt Factory V2.02",Model_Type)
+   
     
       
 def Dispaly_Preset_Tab(Y_POS,CONTROL_HEIGHT):
index 2f0f56de06cec6e65c947d24662cc177b045817f..10f3efa1ed42d03c21403b1b84de625713844622 100644 (file)
@@ -19,9 +19,9 @@ class DATA_PT_modifiers(DataButtonsPanel):
                row.itemL();
 
                for md in ob.modifiers:
-                       box = layout.template_modifier(context, md)
+                       box = layout.template_modifier(md)
 
-                       if md.expanded:
+                       if box:
                                if md.type == 'ARMATURE':
                                        self.armature(box, ob, md)
                                elif md.type == 'ARRAY':
@@ -101,7 +101,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
                elif md.fit_type == 'FIT_LENGTH':
                        layout.itemR(md, "length")
                elif md.fit_type == 'FIT_CURVE':
-                               layout.itemR(md, "curve")
+                       layout.itemR(md, "curve")
 
                layout.itemS()
                
@@ -196,7 +196,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
                layout.itemL(text="See Collision panel.")
                
        def curve(self, layout, ob, md):
-               layout.itemR(md, "curve")
+               layout.itemR(md, "object")
                layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
                layout.itemR(md, "deform_axis")
                
@@ -247,7 +247,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
                # Missing: "Reset" and "Recenter"
                
        def lattice(self, layout, ob, md):
-               layout.itemR(md, "lattice")
+               layout.itemR(md, "object")
                layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
                
        def mask(self, layout, ob, md):
@@ -259,7 +259,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
                layout.itemR(md, "inverse")
                
        def mesh_deform(self, layout, ob, md):
-               layout.itemR(md, "mesh")
+               layout.itemR(md, "object")
                layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
                layout.itemR(md, "invert")
 
index c3a0b2a2cdd558749e5f4e700cfa801887b96e2e..6df7b1c8e281b970ceaea43629741def1b1d3fee 100644 (file)
@@ -273,6 +273,9 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
 
                                v2d->cur.ymax= 0.0f;
                                v2d->cur.ymin= -winy*style->panelzoom;
+
+                               v2d->cur.ymax= 0.0f;
+                               v2d->cur.ymin= -winy*style->panelzoom;
                        }
                                break;
                                
index f8f613223db2c3cb035bf81d09ff66fec91ca0b4..8b242794ca301cc48169e874b3ab2dcd2d074a23 100644 (file)
@@ -775,6 +775,46 @@ void graph_draw_ghost_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, Vie
        glDisable(GL_BLEND);
 }
 
+/* check if any FModifiers to draw controls for  - fcm is 'active' modifier */
+static short fcurve_needs_draw_fmodifier_controls (FCurve *fcu, FModifier *fcm)
+{
+       /* don't draw if there aren't any modifiers at all */
+       if (fcu->modifiers.first == NULL) 
+               return 0;
+       
+       /* if there's an active modifier - don't draw if it doesn't drastically
+        * alter the curve...
+        */
+       if (fcm) {
+               switch (fcm->type) {
+                       /* clearly harmless */
+                       case FMODIFIER_TYPE_CYCLES:
+                               return 0;
+                               
+                       /* borderline... */
+                       case FMODIFIER_TYPE_NOISE:
+                               return 0;
+               }
+       }
+       
+       /* if only one modifier - don't draw if it is muted or disabled */
+       if (fcu->modifiers.first == fcu->modifiers.last) {
+               fcm= fcu->modifiers.first;
+               if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) 
+                       return 0;
+       }
+       
+       /* if only active modifier - don't draw if it is muted or disabled */
+       if (fcm) {
+               if (fcm->flag & (FMODIFIER_FLAG_DISABLED|FMODIFIER_FLAG_MUTED)) 
+                       return 0;
+       }
+       
+       /* if we're still here, this means that there are modifiers with controls to be drawn */
+       // FIXME: what happens if all the modifiers were muted/disabled
+       return 1;
+}
+
 /* This is called twice from space_graph.c -> graph_main_area_draw()
  * Unselected then selected F-Curves are drawn so that they do not occlude each other.
  */
index 6c3bb798c18663df57389617a844ff026f46a7dc..e52d28864390bd7d5b68a3192b7351a682ca90b5 100644 (file)
@@ -441,6 +441,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
                                case ND_GEOM_DATA:
                                case ND_DRAW:
                                case ND_MODIFIER:
+                               case ND_CONSTRAINT:
                                case ND_KEYS:
                                case ND_PARTICLE:
                                        ED_region_tag_redraw(ar);
index 05b2443b581ecd3266ea79b9fdd3a9fbdd27cd60..a353f73c854755bc619620c47e20d8450d7a0eca 100644 (file)
@@ -594,7 +594,7 @@ static PyObject *Quaternion_mul(PyObject * q1, PyObject * q2)
                                PyErr_SetString(PyExc_TypeError, "Quaternion multiplication: only 3D vector rotations currently supported\n");
                                return NULL;
                        }
-                       return quat_rotation((PyObject*)quat1, (PyObject*)vec);
+                       return quat_rotation((PyObject*)quat1, (PyObject*)vec); /* vector updating done inside the func */
                }
                
                scalar= PyFloat_AsDouble(q2);
index 660d00a202ad7449e0ddbaa9005fcdcd933490ac..9f1ef0c62511023d1a29a09a4b09ee14442a0d83 100644 (file)
@@ -171,7 +171,7 @@ void PyObSpit(char *name, PyObject *var) {
        else {
                PyObject_Print(var, stderr, 0);
                fprintf(stderr, " ref:%d ", var->ob_refcnt);
-               fprintf(stderr, " ptr:%ld", (long)var);
+               fprintf(stderr, " ptr:%p", (void *)var);
                
                fprintf(stderr, " type:");
                if(Py_TYPE(var))
index eb27820c92f8cb2c639e3911abefbfbcba165be5..80165548ff2a9ca4604dd34618aac901852901da 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * $Id: BL_ModifierDeformer.cpp 20741 2009-06-08 20:08:19Z blendix $
+ * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
index 74de54152ebb14751c99df6f6098d21a7ae69e35..b09cc2087ca771c5e60fd45d505fede087a3fa5d 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * $Id: BL_ModifierDeformer.h 20741 2009-06-08 20:08:19Z blendix $
+ * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
index 40f05dddada292918d14645d8ac4f4e8e5d1bf19..947cc9959ffd494fd9bb16b48055baa4b684d6e9 100644 (file)
@@ -63,6 +63,10 @@ struct Object;
 /* utility conversion function */
 bool ConvertPythonToGameObject(PyObject * value, KX_GameObject **object, bool py_none_ok, const char *error_prefix);
 
+#ifdef USE_MATHUTILS
+void KX_GameObject_Mathutils_Callback_Init(void);
+#endif
+
 /**
  * KX_GameObject is the main class for dynamic objects.
  */
index ad37e34fbacdfa6a59f71dbe8605043bd40bc30a..578b56eb2b0a7ef552064b2564e9ecd4582d8205 100644 (file)
@@ -6,22 +6,29 @@ The Blender Game Engine Python API Reference
 
        See U{release notes<http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.49/Game_Engine>} for updates, changes and new functionality in the Game Engine Python API.
 
-       Top Module:
-       -----------
-
-               - L{GameLogic}
-               - L{GameKeys}
-               - L{GameTypes}
-               - L{Mathutils}
-               - L{Geometry}
-               - L{BGL}
+       Blender Game Engine Modules:
+       ----------------------------
+       
+               Modules that include methods for accessing GameEngine data and functions.
+               
+                       - L{GameLogic} utility functons for game logic.
+                       - L{GameKeys} keyboard input and event conversion.
+                       - L{Rasterizer} display and rendering.
+                       - L{GameTypes} contains all the python types spesific to the GameEngine.
        
        Undocumented modules:
        ---------------------
                - VideoTexture
-               - CValue
-               - Expression
                - PhysicsConstraints
+       
+       Additional Modules:
+       -------------------
+       
+               These modules have no GameEngine spesific functionality but are useful in many cases.
+               
+                       - L{Mathutils}
+                       - L{Geometry}
+                       - L{BGL}
 
 
 Introduction:
index eea19a85c7aaf24c9fdafa6642a8dd98d188b89e..7bef13cc9e3dc8564e5737919c797b81a105786a 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * $Id: SG_DList.h 20741 2009-06-08 20:08:19Z blendix $
+ * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
index 6656f5a45c862ce0f38d6a32c9e83396bb930a79..d8afc33ea4f02a0a0df32f980f5ce54d0573773e 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * $Id: SG_QList.h 20741 2009-06-08 20:08:19Z blendix $
+ * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *