[#21436] Do not set BASACT to NULL when new base wasn't created in convert_exec
by Sergey Sharybin (nazgul) (from the patch) When new base wasn't created in convert_exec() function. BASACT will set to NULL, which is not convenient. For example, u can't enter edit mode after converting curve to mesh. Now BASACT changes only if base for active object was changed.
This commit is contained in:
@@ -819,7 +819,7 @@ static int ed_marker_select(bContext *C, wmEvent *evt, int extend, int camera)
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
Base *base;
|
||||
TimeMarker *marker;
|
||||
int sel;
|
||||
int sel= 0;
|
||||
|
||||
if (!extend)
|
||||
scene_deselect_all(scene);
|
||||
|
||||
@@ -1348,9 +1348,6 @@ static int convert_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
mball_to_mesh(&ob->disp, ob1->data);
|
||||
|
||||
/* So we can see the wireframe */
|
||||
BASACT= basen; // XXX hm
|
||||
}
|
||||
else
|
||||
continue;
|
||||
@@ -1362,7 +1359,9 @@ static int convert_exec(bContext *C, wmOperator *op)
|
||||
if(basen) {
|
||||
if(ob == obact) {
|
||||
ED_base_object_activate(C, basen);
|
||||
basact = basen;
|
||||
|
||||
/* store new active base to update BASACT */
|
||||
basact= basen;
|
||||
}
|
||||
|
||||
basen= NULL;
|
||||
@@ -1382,12 +1381,13 @@ static int convert_exec(bContext *C, wmOperator *op)
|
||||
if(!keep_original)
|
||||
DAG_scene_sort(scene);
|
||||
|
||||
/* texspace and normals */
|
||||
if(!basen) BASACT= NULL; // XXX base;
|
||||
|
||||
// XXX ED_object_enter_editmode(C, 0);
|
||||
// XXX exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR); /* freedata, but no undo */
|
||||
BASACT= basact;
|
||||
|
||||
if (basact) {
|
||||
/* active base was changed */
|
||||
BASACT= basact;
|
||||
}
|
||||
|
||||
DAG_scene_sort(scene);
|
||||
WM_event_add_notifier(C, NC_SCENE|NC_OBJECT|ND_DRAW, scene); /* is NC_SCENE needed ? */
|
||||
|
||||
Reference in New Issue
Block a user