Final merge of HEAD (bf-blender) into the orange branch.
authorChris Want <cwant@ualberta.ca>
Sat, 28 Jan 2006 16:35:18 +0000 (16:35 +0000)
committerChris Want <cwant@ualberta.ca>
Sat, 28 Jan 2006 16:35:18 +0000 (16:35 +0000)
Here are my notes on things to look out for as potential problem
spots:

source/blender/blenkernel/intern/displist.c:
+ is initfastshade(void) supposed to be empty? I had
to make it empty to get the merged tree to compile.

source/blender/python/api2_2x/Armature.c:
+ went with the version that had Armature_getLayers()

source/blender/python/api2_2x/Object.c
+ went with the version of Object_getPose() from bf-blender.
(#ifdef 0-ed the other version)

source/blender/python/api2_2x/Pose.[ch]
+ had problems linking due to no Pose_Init() ... copied these
two files straight from bf-blender.

source/blender/src/drawview.c:
+ view3d_panel_properties() had things shifted a few things shifted
a few pixels, otherwise, things were painless

source/blender/src/splash.jpg.c:
+ went with bf-blender version (orange is dead)

source/gameengine:
+ went with bf-blender version -- does not compile due to IMB_rect* stuff,
Ton should look into this.

26 files changed:
1  2 
source/Makefile
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/constraint.c
source/blender/python/SConscript
source/blender/python/api2_2x/Armature.c
source/blender/python/api2_2x/Bone.h
source/blender/python/api2_2x/NLA.c
source/blender/python/api2_2x/Object.c
source/blender/src/buttons_editing.c
source/blender/src/buttons_logic.c
source/blender/src/drawseq.c
source/blender/src/filesel.c
source/blender/src/header_ipo.c
source/blender/src/header_oops.c
source/blender/src/header_script.c
source/blender/src/header_text.c
source/blender/src/header_view3d.c
source/blender/src/interface.c
source/blender/src/interface_draw.c
source/blender/src/renderwin.c
source/blender/src/space.c
source/blender/src/toolbox.c
source/blender/src/transform_generics.c
source/blender/src/view.c
source/nan_compile.mk
source/nan_definitions.mk

diff --cc source/Makefile
@@@ -158,16 -158,13 +157,16 @@@ endi
    ifeq ($(WITH_QUICKTIME), true)
      COMLIB += $(OCGDIR)/blender/blenderqt/$(DEBUG_DIR)libblenderqt.a
    endif
 +  ifeq ($(WITH_OPENEXR), true)
 +    COMLIB += $(OCGDIR)/blender/imbuf/openexr/$(DEBUG_DIR)libopenexr.a
 +  endif
    ifeq ($(WITH_FREETYPE2), true)
      ifeq ($(OS), windows)
-               ifeq ($(FREE_WINDOWS), true)
-                       COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
-               else
-                       COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
-               endif
+       ifeq ($(FREE_WINDOWS), true)
+         COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
+       else
+         COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
+       endif
      else
        ifeq ($(OS), irix)
          COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
Simple merge
Simple merge
Simple merge
@@@ -321,8 -312,6 +324,8 @@@ If 'name_only' is nonzero or True, onl
         "Returns the object draw type"},
        {"getAction", ( PyCFunction ) Object_getAction, METH_NOARGS,
         "Returns the active action for this object"},
-        "Returns the pose for this object"},
 +      {"getPose", ( PyCFunction ) Object_getPose, METH_NOARGS,
++      "() - returns the pose from an object if it exists, else None"},
        {"isSelected", ( PyCFunction ) Object_isSelected, METH_NOARGS,
         "Return a 1 or 0 depending on whether the object is selected"},
        {"getEuler", ( PyCFunction ) Object_getEuler, METH_NOARGS,
@@@ -585,7 -566,10 +588,8 @@@ works only if self and the object speci
         "([s1<,s2,s3...>]) - Delete specified scriptlinks from this object."},
        {"setDupliVerts", ( PyCFunction ) Object_setDupliVerts,
         METH_VARARGS, "() - set or reset duplicate child objects on all vertices"},
-       
+        {"insertShapeKey", ( PyCFunction ) Object_insertShapeKey,
+        METH_NOARGS, "() - Insert a Shape Key in the current object"},
 -      {"getPose", (PyCFunction)Object_getPose, METH_NOARGS,
 -      "() - returns the pose from an object if it exists, else None"},
        {NULL, NULL, 0, NULL}
  };
  
@@@ -1178,18 -1171,7 +1191,27 @@@ static PyObject *Object_getAction( BPy_
        }
  }
  
++#if 0
 +static PyObject *Object_getPose( BPy_Object * self )
 +{
 +      /*BPy_Action *py_action = NULL; */
 +
 +  if( !self->object->pose ) {
 +    Py_INCREF( Py_None );
 +    return ( Py_None );
 +  }
 +      else 
 +              return Pose_CreatePyObject( self->object->pose );
 +}
 +
++#endif
++
++static PyObject * Object_getPose(BPy_Object *self)
++{
++      //if there is no pose will return PyNone
++      return PyPose_FromPose(self->object->pose, self->object->id.name+2);
++}
  static PyObject *Object_isSelected( BPy_Object * self )
  {
        Base *base;
@@@ -3011,6 -2787,18 +3033,12 @@@ static PyObject *Object_getEffects( BPy
        return effect_list;
  }
  
 -static PyObject * Object_getPose(BPy_Object *self)
 -{
 -      //if there is no pose will return PyNone
 -      return PyPose_FromPose(self->object->pose, self->object->id.name+2);
 -}
 -
+ static  PyObject *Object_insertShapeKey(BPy_Object * self)
+ {
+       insert_shapekey(self->object);
+       return Py_None;
+ }
  /*****************************************************************************/
  /* Function:  Object_CreatePyObject                                    */
  /* Description: This function will create a new BlenObject from an existing  */
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -262,10 -263,11 +263,11 @@@ void script_buttons(void
        else
                uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN,        xco+=XIC,0,XIC,YIC, 0, 0,
                                0, 0, 0, "Makes current window full screen (CTRL+Down arrow)");
+       uiBlockEndAlign(block);
+       
        /* STD SCRIPT BUTTONS */
        xco += 2*XIC;
 -      xco= std_libbuttons(block, xco, 0, 0, NULL, B_SCRIPTBROWSE, (ID*)sc->script, 0, &(sc->menunr), 0, 0, 0, 0, 0);
 +      xco= std_libbuttons(block, xco, 0, 0, NULL, B_SCRIPTBROWSE, ID_SCRIPT, 0, (ID*)sc->script, 0, &(sc->menunr), 0, 0, 0, 0, 0);
  
        /* always as last  */
        curarea->headbutlen= xco+2*XIC;
@@@ -619,10 -620,11 +620,11 @@@ void text_buttons(void
        uiDefIconButI(block, ICONTOG, B_TEXTLINENUM, ICON_LONGDISPLAY, xco+=XIC,0,XIC,YIC, &st->showlinenrs, 0, 0, 0, 0, "Displays line numbers");
  
        uiDefIconButI(block, ICONTOG, B_SYNTAX, ICON_SYNTAX, xco+=XIC,0,XIC,YIC, &st->showsyntax, 0, 0, 0, 0, "Enables Syntax Highlighting");
+       uiBlockEndAlign(block);
+       
        /* STD TEXT BUTTONS */
        xco+= 2*XIC;
 -      xco= std_libbuttons(block, xco, 0, 0, NULL, B_TEXTBROWSE, (ID*)st->text, 0, &(st->menunr), 0, 0, B_TEXTDELETE, 0, 0);
 +      xco= std_libbuttons(block, xco, 0, 0, NULL, B_TEXTBROWSE, ID_TXT, 0, (ID*)st->text, 0, &(st->menunr), 0, 0, B_TEXTDELETE, 0, 0);
  
        /*
        if (st->text) {
Simple merge
Simple merge
Simple merge
@@@ -1012,11 -1171,18 +1012,18 @@@ void BIF_do_render(int anim
        /* if start render in 3d win, use layer from window (e.g also local view) */
        if(curarea && curarea->spacetype==SPACE_VIEW3D) {
                int lay= G.scene->lay;
-               if(G.vd->lay & 0xFF000000)      // localview
-                       G.scene->lay |= G.vd->lay;
-               else G.scene->lay= G.vd->lay;
+               /*
+                * if view is defined (might not be if called form script), check
+                * and set layers
+                */
+               if(G.vd) {
+                       if(G.vd->lay & 0xFF000000)      // localview
+                               G.scene->lay |= G.vd->lay;
+                       else
+                               G.scene->lay= G.vd->lay;
+               }
                
 -              do_render(NULL, anim, 0);
 +              do_render(anim);
                
                G.scene->lay= lay;
        }
Simple merge
Simple merge
@@@ -534,9 -535,15 +534,16 @@@ void viewmove(int mode
        int firsttime=1;
        short mvalball[2], mval[2], mvalo[2];
        short use_sel = 0;
 +      short preview3d_event= 1;
        
+       /* 3D window may not be defined */
+       if( !G.vd ) {
+               fprintf( stderr, "G.vd == NULL in viewmove()\n" );
+               return;
+       }
        /* sometimes this routine is called from headerbuttons */
        areawinset(curarea->win);
        
        initgrabz(-G.vd->ofs[0], -G.vd->ofs[1], -G.vd->ofs[2]);
@@@ -80,10 -80,10 +80,10 @@@ endi
  ifeq ($(OS),darwin)
      CC        = gcc
      CCC       = g++
-     CFLAGS    += -pipe -fPIC -ffast-math -mcpu=7450 -mtune=7450
+     CFLAGS    += -pipe -fPIC -ffast-math -mcpu=7450 -mtune=G5
      CCFLAGS   += -pipe -fPIC 
 -    REL_CFLAGS        += -O2
 -    REL_CCFLAGS       += -O2
 +#    REL_CFLAGS       += -O2
 +#   REL_CCFLAGS       += -O2
      CPPFLAGS  += -D_THREAD_SAFE
      NAN_DEPEND        = true
      OPENGL_HEADERS = /System/Library/Frameworks/OpenGL.framework
Simple merge