svn merge https://svn.blender.org/svnroot/bf-blender/branches/render25 -r27875:27895
authorCampbell Barton <ideasman42@gmail.com>
Wed, 31 Mar 2010 07:22:18 +0000 (07:22 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 31 Mar 2010 07:22:18 +0000 (07:22 +0000)
source/blender/blenkernel/intern/library.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/include/ED_mesh.h
source/blender/editors/mesh/editmesh.c
source/blender/editors/object/object_edit.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/util/ed_util.c
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesrna/intern/rna_curve.c

index 0eaafcb67ede7589cc7b2bff96f4145d0a157b23..8605cf51b68f933d0c3cd6f2057322caded3f7f6 100644 (file)
@@ -1236,11 +1236,17 @@ static void image_fix_relative_path(Image *ima)
 
 #define LIBTAG(a)      if(a && a->id.lib) {a->id.flag &=~LIB_INDIRECT; a->id.flag |= LIB_EXTERN;}
 
-static void lib_indirect_test_id(ID *id)
+static void lib_indirect_test_id(ID *id, Library *lib)
 {
        
-       if(id->lib)
+       if(id->lib) {
+               /* datablocks that were indirectly related are now direct links
+                * without this, appending data that has a link to other data will fail to write */
+               if(lib && id->lib->parent == lib) {
+                       id_lib_extern(id);
+               }
                return;
+       }
        
        if(GS(id->name)==ID_OB) {               
                Object *ob= (Object *)id;
@@ -1336,7 +1342,7 @@ void all_local(Library *lib, int untagged_only)
        a= set_listbasepointers(G.main, lbarray);
        while(a--) {
                for(id= lbarray[a]->first; id; id=id->next)
-                       lib_indirect_test_id(id);
+                       lib_indirect_test_id(id, lib);
        }
 }
 
index 0ca21a68224b85c3fee2eba899bbcedc9806e447..a51ecbd2a1535817c940a2152e95e3d859fb0d8c 100644 (file)
@@ -12130,8 +12130,8 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
                                if(fd==NULL) {
 
                                        /* printf and reports for now... its important users know this */
-                                       printf("read library: %s\n", mainptr->curlib->name);
-                                       BKE_reportf(basefd->reports, RPT_INFO, "read library: '%s'\n", mainptr->curlib->name);
+                                       printf("read library: '%s', '%s'\n", mainptr->curlib->filename, mainptr->curlib->name);
+                                       BKE_reportf(basefd->reports, RPT_INFO, "read library:  '%s', '%s'\n", mainptr->curlib->filename, mainptr->curlib->name);
 
                                        fd= blo_openblenderfile(mainptr->curlib->filename, basefd->reports);
 
index d3e405511946e2bc4162aabdcf82b5c70e74ae35..43c11206bbe44bae63436a0c2192e48b22b6b50a 100644 (file)
@@ -78,6 +78,8 @@ struct rcti;
 /* meshtools.c */
 
 intptr_t       mesh_octree_table(struct Object *ob, struct EditMesh *em, float *co, char mode);
+long           mesh_mirrtopo_table(struct Object *ob, char mode);
+
 struct EditVert   *editmesh_get_x_mirror_vert(struct Object *ob, struct EditMesh *em, struct EditVert *eve, float *co, int index);
 int                    mesh_get_x_mirror_vert(struct Object *ob, int index);
 int                    *mesh_get_x_mirror_faces(struct Object *ob, struct EditMesh *em);
index 74558d13a52887229be80cd98b654b003da88ec5..e3f0d96ccfce23a987193a651350d276a8a18a74 100644 (file)
@@ -563,7 +563,8 @@ void free_editMesh(EditMesh *em)
        em->allfaces= em->curface= NULL;
        
        mesh_octree_table(NULL, NULL, NULL, 'e');
-       
+       mesh_mirrtopo_table(NULL, 'e');
+
        em->totvert= em->totedge= em->totface= 0;
 
 // XXX if(em->retopo_paint_data) retopo_free_paint_data(em->retopo_paint_data);
index 419956c66265ea4aa4a0ee02dd9bac11dbaa29f0..a9baf56999bc6cedc32415d187e065e8e3daec66 100644 (file)
@@ -261,8 +261,10 @@ void ED_object_exit_editmode(bContext *C, int flag)
                        me->edit_mesh= NULL;
                }
                
-               if(obedit->restore_mode & OB_MODE_WEIGHT_PAINT)
-                       mesh_octree_table(obedit, NULL, NULL, 'e');
+               if(obedit->restore_mode & OB_MODE_WEIGHT_PAINT) {
+                       mesh_octree_table(NULL, NULL, NULL, 'e');
+                       mesh_mirrtopo_table(NULL, 'e');
+               }
        }
        else if (obedit->type==OB_ARMATURE) {   
                ED_armature_from_edit(obedit);
index d1274cdac8bbfa6e880bd06173e3e4a4bcee74d2..7bfb7716c9c95316849df4c9aa6b136a63fa17bd 100644 (file)
@@ -1111,7 +1111,8 @@ static int set_wpaint(bContext *C, wmOperator *op)                /* toggle */
                }
        }
        else {
-               mesh_octree_table(ob, NULL, NULL, 'e');
+               mesh_octree_table(NULL, NULL, NULL, 'e');
+               mesh_mirrtopo_table(NULL, 'e');
        }
        
        WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene);
index 14e519b125d3cb8cf8927bde9f18bdb0d8334fac..1074c3572fc665ccefda2e31cb531672660f129f 100644 (file)
@@ -374,6 +374,24 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
                        }
                }
                SEQ_END
+               
+               {
+                       SpaceSeq *sseq= CTX_wm_space_seq(C);
+                       if (sseq && sseq->flag & SEQ_MARKER_TRANS) {
+                               TimeMarker *marker;
+
+                               for (marker= scene->markers.first; marker; marker= marker->next) {
+                                       if(     ((x < CFRA) && marker->frame < CFRA) ||
+                                               ((x >= CFRA) && marker->frame >= CFRA)
+                                       ) {
+                                               marker->flag |= SELECT;
+                                       }
+                                       else {
+                                               marker->flag &= ~SELECT;
+                                       }
+                               }
+                       }
+               }
        } else {
                // seq= find_nearest_seq(scene, v2d, &hand, mval);
 
index 52e3b9baa13d7a47c117948b2b17e4243cb9d590..19bd18ade1ffe57cdfeb1156ae1e2813da4dcc68 100644 (file)
@@ -64,7 +64,8 @@ void ED_editors_exit(bContext *C)
                        Object *ob= sce->obedit;
                
                        /* global in meshtools... */
-                       mesh_octree_table(ob, NULL, NULL, 'e');
+                       mesh_octree_table(NULL, NULL, NULL, 'e');
+                       mesh_mirrtopo_table(NULL, 'e');
                        
                        if(ob) {
                                if(ob->type==OB_MESH) {
@@ -91,8 +92,10 @@ void ED_editors_exit(bContext *C)
                        Object *ob= sce->basact->object;
                        
                        /* if weight-painting is on, free mesh octree data */
-                       if(ob->mode & OB_MODE_WEIGHT_PAINT)
-                               mesh_octree_table(ob, NULL, NULL, 'e');
+                       if(ob->mode & OB_MODE_WEIGHT_PAINT) {
+                               mesh_octree_table(NULL, NULL, NULL, 'e');
+                               mesh_mirrtopo_table(NULL, 'e');
+                       }
                }
        }
        
index 6bdecd8c7c6fa0b468348ace72e216963a56422b..f5b80266e5cfc7274f74d21d983557d8e2f08bca 100644 (file)
@@ -687,7 +687,6 @@ typedef struct SolidifyModifierData {
        float crease_outer;
        float crease_rim;
        int flag;
-       char pad[4];
 } SolidifyModifierData;
 
 #define MOD_SOLIDIFY_RIM                       (1<<0)
index c0ad35eb7c39b295398b795c0240125bda7bf33c..14cf36c2807e25bd2f663b37491442c56e7a6191 100644 (file)
@@ -25,6 +25,7 @@
 #include <stdlib.h>
 
 #include "RNA_define.h"
+#include "RNA_types.h"
 
 #include "rna_internal.h"
 
@@ -216,58 +217,36 @@ static void rna_Curve_update_deps(Main *bmain, Scene *scene, PointerRNA *ptr)
        rna_Curve_update_data(bmain, scene, ptr);
 }
 
-static PointerRNA rna_Curve_bevelObject_get(PointerRNA *ptr)
+static void rna_Curve_update_taper(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
        Curve *cu= (Curve*)ptr->id.data;
-       Object *ob= cu->bevobj;
-
-       if(ob)
-               return rna_pointer_inherit_refine(ptr, &RNA_Object, ob);
-
-       return rna_pointer_inherit_refine(ptr, NULL, NULL);
-}
-
-static void rna_Curve_bevelObject_set(PointerRNA *ptr, PointerRNA value)
-{
-       Curve *cu= (Curve*)ptr->id.data;
-       Object *ob= (Object*)value.data;
+       Object *ob= cu->taperobj;
 
        if (ob) {
-               /* if bevel object has got the save curve, as object, for which it's */
-               /* set as bevobj, there could be infinity loop in displist calculation */
-               if (ob->type == OB_CURVE && ob->data != cu) {
-                       cu->bevobj = ob;
+               /* if taper object has got the save curve, as object, for which it's */
+               /* set as taperobj, there could be infinity loop in displist calculation */
+               if (ob->type != OB_CURVE || ob->data == cu) {
+                       cu->taperobj = NULL;
                }
-       } else {
-               cu->bevobj = NULL;
        }
-}
 
-static PointerRNA rna_Curve_taperObject_get(PointerRNA *ptr)
-{
-       Curve *cu= (Curve*)ptr->id.data;
-       Object *ob= cu->taperobj;
-
-       if(ob)
-               return rna_pointer_inherit_refine(ptr, &RNA_Object, ob);
-
-       return rna_pointer_inherit_refine(ptr, NULL, NULL);
+       rna_Curve_update_deps(bmain, scene, ptr);
 }
 
-static void rna_Curve_taperObject_set(PointerRNA *ptr, PointerRNA value)
+static void rna_Curve_update_bevel(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
        Curve *cu= (Curve*)ptr->id.data;
-       Object *ob= (Object*)value.data;
+       Object *ob= cu->bevobj;
 
        if (ob) {
-               /* if taper object has got the save curve, as object, for which it's */
+               /* if bevel object has got the save curve, as object, for which it's */
                /* set as bevobj, there could be infinity loop in displist calculation */
-               if (ob->type == OB_CURVE && ob->data != cu) {
-                       cu->taperobj = ob;
+               if (ob->type != OB_CURVE || ob->data == cu) {
+                       cu->bevobj = NULL;
                }
-       } else {
-               cu->taperobj = NULL;
        }
+
+       rna_Curve_update_deps(bmain, scene, ptr);
 }
 
 static void rna_Curve_resolution_u_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -1087,21 +1066,17 @@ static void rna_def_curve(BlenderRNA *brna)
        
        /* pointers */
        prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
-       RNA_def_property_struct_type(prop, "Object");
        RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Bevel Object", "Curve object name that defines the bevel shape");
-       RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
-       RNA_def_property_pointer_funcs(prop, "rna_Curve_bevelObject_get", "rna_Curve_bevelObject_set", NULL);
-
+       RNA_def_property_update(prop, 0, "rna_Curve_update_bevel");
+       
        prop= RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
-       RNA_def_property_struct_type(prop, "Object");
        RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Taper Object", "Curve object name that defines the taper (width)");
-       RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
-       RNA_def_property_pointer_funcs(prop, "rna_Curve_taperObject_get", "rna_Curve_taperObject_set", NULL);
-
+       RNA_def_property_update(prop, 0, "rna_Curve_update_taper");
+       
        /* Flags */
 
        prop= RNA_def_property(srna, "dimensions", PROP_ENUM, PROP_NONE); /* as an enum */