diff options
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 16 | ||||
-rw-r--r-- | source/blender/editors/object/object_lattice.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_select.c | 16 |
3 files changed, 20 insertions, 14 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index d9e0140c699..a077e9890b0 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -102,8 +102,8 @@ static void waitcursor(int UNUSED(val)) {} static int pupmenu(const char *UNUSED(msg)) {return 0;} /* port over here */ -static bContext *C; -static void error_libdata() {} +static bContext *evil_C; +static void error_libdata(void) {} /* find the correct active object per context @@ -1078,13 +1078,13 @@ static void copymenu_modifiers(Main *bmain, Scene *scene, View3D *v3d, Object *o for (base= FIRSTBASE; base; base= base->next) { if(base->object != ob) { if(TESTBASELIB(v3d, base)) { - ModifierData *md; base->object->recalc |= OB_RECALC_OB|OB_RECALC_DATA; if (base->object->type==ob->type) { /* copy all */ if (event==NUM_MODIFIER_TYPES) { + ModifierData *md; object_free_modifiers(base->object); for (md=ob->modifiers.first; md; md=md->next) { @@ -1805,7 +1805,7 @@ void ofs_timeoffs(Scene *scene, View3D *v3d) // XXX if(fbutton(&offset, -10000.0f, 10000.0f, 10, 10, "Offset")==0) return; /* make array of all bases, xco yco (screen) */ - CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) { + CTX_DATA_BEGIN(evil_C, Object*, ob, selected_editable_objects) { ob->sf += offset; if (ob->sf < -MAXFRAMEF) ob->sf = -MAXFRAMEF; else if (ob->sf > MAXFRAMEF) ob->sf = MAXFRAMEF; @@ -1818,17 +1818,17 @@ void ofs_timeoffs(Scene *scene, View3D *v3d) void rand_timeoffs(Scene *scene, View3D *v3d) { Base *base; - float rand=0.0f; + float rand_ofs=0.0f; if(BASACT==0 || v3d==NULL) return; -// XXX if(fbutton(&rand, 0.0f, 10000.0f, 10, 10, "Randomize")==0) return; +// XXX if(fbutton(&rand_ofs, 0.0f, 10000.0f, 10, 10, "Randomize")==0) return; - rand *= 2; + rand_ofs *= 2; for(base= FIRSTBASE; base; base= base->next) { if(TESTBASELIB(v3d, base)) { - base->object->sf += (BLI_drand()-0.5) * rand; + base->object->sf += (BLI_drand()-0.5) * rand_ofs; if (base->object->sf < -MAXFRAMEF) base->object->sf = -MAXFRAMEF; else if (base->object->sf > MAXFRAMEF) base->object->sf = MAXFRAMEF; } diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 5c68917a83a..22d1a2f6b9d 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -155,7 +155,7 @@ void load_editLatt(Object *obedit) } if(editlt->dvert) { - int tot= lt->pntsu*lt->pntsv*lt->pntsw; + tot= lt->pntsu*lt->pntsv*lt->pntsw; lt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert"); copy_dverts(lt->dvert, editlt->dvert, tot); diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index b131a358ae7..deda2ce0129 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -51,6 +51,7 @@ #include "BKE_property.h" #include "BKE_report.h" #include "BKE_scene.h" +#include "BKE_library.h" #include "BKE_deform.h" #include "WM_api.h" @@ -826,21 +827,26 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot) /**************************** Select Mirror ****************************/ static int object_select_mirror_exec(bContext *C, wmOperator *op) { + Scene *scene= CTX_data_scene(C); short extend; extend= RNA_boolean_get(op->ptr, "extend"); CTX_DATA_BEGIN(C, Base*, primbase, selected_bases) { - char tmpname[32]; + flip_side_name(tmpname, primbase->object->id.name+2, TRUE); + + if(strcmp(tmpname, primbase->object->id.name+2)!=0) { /* names differ */ + Object *ob= (Object *)find_id("OB", tmpname); + if(ob) { + Base *secbase= object_in_scene(ob, scene); - CTX_DATA_BEGIN(C, Base*, secbase, visible_bases) { - if(!strcmp(secbase->object->id.name+2, tmpname)) { - ED_base_object_select(secbase, BA_SELECT); + if(secbase) { + ED_base_object_select(secbase, BA_SELECT); + } } } - CTX_DATA_END; if (extend == 0) ED_base_object_select(primbase, BA_DESELECT); |