Several fixes:
authorJoshua Leung <aligorith@gmail.com>
Mon, 22 Oct 2007 06:28:39 +0000 (06:28 +0000)
committerJoshua Leung <aligorith@gmail.com>
Mon, 22 Oct 2007 06:28:39 +0000 (06:28 +0000)
* DNA_action_types.h - fixes for typos that broke compiling (own error)

* transform.c - fix for implicit definition of a function (missing header)

* outliner.c - commented out a few unused vars (as a result of constraints refactor)

* editsima.c - fixed uninitialised var warning

* drawview.c - bugfix #7598 load without ui crashes if there is no camera. Patch provided by Daniel Genrich (genscher)

source/blender/makesdna/DNA_action_types.h
source/blender/src/drawview.c
source/blender/src/editsima.c
source/blender/src/outliner.c
source/blender/src/transform.c

index 479bb74919644f045129fdec5f83aa25f3d05b92..3c5ef7c94e68b34d2f1cda650d325cf23f966a5f 100644 (file)
@@ -162,7 +162,7 @@ typedef enum SACTION_FLAG {
 /* SpaceAction AutoSnap Settings (also used by SpaceNLA) */
 typedef enum SACTSNAP_MODES {
                /* no auto-snap */
-       SACTSNAP_OFF = 0        
+       SACTSNAP_OFF = 0,       
                /* snap to 1.0 frame/second intervals */
        SACTSNAP_STEP,
                /* snap to actual frames/seconds (nla-action time) */
@@ -199,7 +199,7 @@ enum        {
 };
 
 /* PoseChannel constflag (constraint detection) */
-typedef PCHAN_CONSTFLAG {
+typedef enum PCHAN_CONSTFLAG {
        PCHAN_HAS_IK            = (1<<0),
        PCHAN_HAS_CONST         = (1<<1),
                /* only used for drawing Posemode, not stored in channel */
@@ -210,7 +210,7 @@ typedef PCHAN_CONSTFLAG {
 } PCHAN_CONSTFLAG;
 
 /* PoseChannel->ikflag */
-typedef PCHAN_IKFLAG {
+typedef enum PCHAN_IKFLAG {
        BONE_IK_NO_XDOF = (1<<0),
        BONE_IK_NO_YDOF = (1<<1),
        BONE_IK_NO_ZDOF = (1<<2),
index 6752988d6f10b8245aa506af8cc9234c0babc852..e437ad86cdaccff1ff8c1fefcddd921192e4586f 100644 (file)
@@ -1509,8 +1509,8 @@ static void draw_viewport_name(ScrArea *sa)
                                name = (G.vd->flag2 & V3D_OPP_DIRECTION_NAME) ? "Bottom Ortho" : "Top Ortho";
                        break;
                default:
-                       if(G.vd->persp==V3D_PERSP_USE_THE_CAMERA) {
-                               if (G.vd->camera->type == OB_CAMERA) {
+                       if (G.vd->persp==V3D_PERSP_USE_THE_CAMERA) {
+                               if ((G.vd->camera) && (G.vd->camera->type == OB_CAMERA)) {
                                        Camera *cam;
                                        cam = G.vd->camera->data;
                                        name = (cam->type != CAM_ORTHO) ? "Camera Persp" : "Camera Ortho";
index 1b713609174fd0395397b2ab751065cae11a1416..18191c970dfbd2293228e55b418f6f41682117d5 100644 (file)
@@ -1634,7 +1634,7 @@ void uvface_setsel__internal(short select)
        } else if ((G.sima->flag & SI_SYNC_UVSEL)==0 && G.sima->sticky == SI_STICKY_LOC) {
                EditFace *efa_vlist;
                MTFace *tf_vlist;
-               UvMapVert *vlist, *start_vlist, *vlist_iter;
+               UvMapVert *vlist, *start_vlist=NULL, *vlist_iter;
                struct UvVertMap *vmap;
                float limit[2];
                int efa_index;
index 0ed50c75ad4b94ab11712bd4380311106899fec9..aa5fd0d409be5ccccd63c9fb262bebcc33f2cf63 100644 (file)
@@ -591,11 +591,11 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
                                                        pchan->prev= (bPoseChannel *)ten;
                                                        
                                                        if(pchan->constraints.first) {
-                                                               Object *target;
+                                                               //Object *target;
                                                                bConstraint *con;
                                                                TreeElement *ten1;
                                                                TreeElement *tenla1= outliner_add_element(soops, &ten->subtree, ob, ten, TSE_CONSTRAINT_BASE, 0);
-                                                               char *str;
+                                                               //char *str;
                                                                
                                                                tenla1->name= "Constraints";
                                                                for(con= pchan->constraints.first; con; con= con->next, const_index++) {
@@ -644,12 +644,12 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
                                        outliner_add_element(soops, &te->subtree, ob->mat[a], te, 0, a);
                                
                                if(ob->constraints.first) {
-                                       Object *target;
+                                       //Object *target;
                                        bConstraint *con;
                                        TreeElement *ten;
                                        TreeElement *tenla= outliner_add_element(soops, &te->subtree, ob, te, TSE_CONSTRAINT_BASE, 0);
                                        int a= 0;
-                                       char *str;
+                                       //char *str;
                                        
                                        tenla->name= "Constraints";
                                        for(con= ob->constraints.first; con; con= con->next, a++) {
index fa87a05429384a0aed7dddbc7d6b212ec25f741c..321a56c5ebda032bab4eb8d0435abe48af24774a 100644 (file)
@@ -86,6 +86,7 @@
 #include "BSE_drawipo.h"
 #include "BSE_editnla_types.h" /* for NLAWIDTH */
 #include "BSE_editaction_types.h"
+#include "BSE_time.h"
 #include "BSE_view.h"
 
 #include "BLI_arithb.h"