diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-31 11:22:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-31 11:22:18 +0400 |
commit | 2910d75f2c68f79054e47348925f13b127ada9d6 (patch) | |
tree | cbb146ee56708892fdc5ff92ceba84e4d3479c6f /source/blender | |
parent | 7af91f6663564f1c3c85960b95f2c6e3ca213231 (diff) |
svn merge https://svn.blender.org/svnroot/bf-blender/branches/render25 -r27875:27895
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 12 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 4 | ||||
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh.c | 3 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_select.c | 18 | ||||
-rw-r--r-- | source/blender/editors/util/ed_util.c | 9 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 63 |
10 files changed, 64 insertions, 57 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 0eaafcb67ed..8605cf51b68 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -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); } } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 0ca21a68224..a51ecbd2a15 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -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); diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index d3e40551194..43c11206bbe 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -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); diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c index 74558d13a52..e3f0d96ccfc 100644 --- a/source/blender/editors/mesh/editmesh.c +++ b/source/blender/editors/mesh/editmesh.c @@ -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); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 419956c6626..a9baf56999b 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -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); diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index d1274cdac8b..7bfb7716c9c 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -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); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 14e519b125d..1074c3572fc 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -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); diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 52e3b9baa13..19bd18ade1f 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -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'); + } } } diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 6bdecd8c7c6..f5b80266e5c 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -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) diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index c0ad35eb7c3..14cf36c2807 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -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 */ |