diff options
author | Ton Roosendaal <ton@blender.org> | 2011-02-16 21:04:03 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-02-16 21:04:03 +0300 |
commit | 9d168f733719c3abeba245a92cb37530db2a98f4 (patch) | |
tree | 80c84aba556fa6b9ad030acdfd992e30a2215c16 /source | |
parent | aed7eaf0d9171c4bfa7814e141afad773cb31441 (diff) |
Bugfix #26096
Switching layers reveiled hidden objects in wrong positions, changes
are currently not being handled for hidden objects.
Only way to fix it is by completely update newly visible objects...
(Also fixed a typo and a compile warning)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 13 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_material.c | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 2ee4f7a9e55..2656127d73c 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -139,10 +139,11 @@ static void handle_view3d_lock(bContext *C) static int view3d_layers_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); Scene *scene= CTX_data_scene(C); ScrArea *sa= CTX_wm_area(C); View3D *v3d= sa->spacedata.first; + Base *base; + int oldlay= v3d->lay; int nr= RNA_int_get(op->ptr, "nr"); int toggle= RNA_boolean_get(op->ptr, "toggle"); @@ -200,8 +201,14 @@ static int view3d_layers_exec(bContext *C, wmOperator *op) if(v3d->scenelock) handle_view3d_lock(C); - /* new layers might need unflushed events events */ - DAG_scene_update_flags(bmain, scene, v3d->lay, FALSE); /* tags all that moves and flushes */ + /* XXX new layers might need updates, there is no provision yet to detect if that's needed */ + oldlay= ~oldlay & v3d->lay; + for (base= scene->base.first; base; base= base->next) { + if(base->lay & oldlay) + base->object->recalc= OB_RECALC_OB|OB_RECALC_DATA; + if(base->lay & oldlay) + printf("recalc %s\n", base->object->id.name+2); + } ED_area_tag_redraw(sa); diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index de80c0a0423..dbed27e95a1 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1941,6 +1941,7 @@ static void VertsToTransData(TransInfo *t, TransData *td, EditMesh *em, EditVert } } +#if 0 static void createTransBMeshVerts(TransInfo *t, BME_Mesh *bm, BME_TransData_Head *td) { BME_Vert *v; BME_TransData *vtd; @@ -1965,6 +1966,7 @@ static void createTransBMeshVerts(TransInfo *t, BME_Mesh *bm, BME_TransData_Head * (i.e. we can't depend on td->len to determine the number of actual elements) */ t->total = i; } +#endif static void createTransEditVerts(bContext *C, TransInfo *t) { diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 3d9eaa0b141..0c7a300d942 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -1875,7 +1875,7 @@ static void rna_def_texture_slots(BlenderRNA *brna, PropertyRNA *cprop, const ch func= RNA_def_function(srna, "clear", "rna_mtex_texture_slots_clear"); RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_NO_SELF|FUNC_USE_CONTEXT|FUNC_USE_REPORTS); - parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to clar.", 0, INT_MAX); + parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to clear.", 0, INT_MAX); RNA_def_property_flag(parm, PROP_REQUIRED); } |