remove unused code from object convert and indent.
This commit is contained in:
@@ -2624,10 +2624,6 @@ void txt_indent(Text *text)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!text) return;
|
|
||||||
if (!text->curl) return;
|
|
||||||
if (!text->sell) return;
|
|
||||||
|
|
||||||
/* insert spaces rather than tabs */
|
/* insert spaces rather than tabs */
|
||||||
if (text->flags & TXT_TABSTOSPACES) {
|
if (text->flags & TXT_TABSTOSPACES) {
|
||||||
add = tab_to_spaces;
|
add = tab_to_spaces;
|
||||||
@@ -2687,9 +2683,9 @@ void txt_unindent(Text *text)
|
|||||||
/* hardcoded: TXT_TABSIZE = 4 spaces: */
|
/* hardcoded: TXT_TABSIZE = 4 spaces: */
|
||||||
int spaceslen = TXT_TABSIZE;
|
int spaceslen = TXT_TABSIZE;
|
||||||
|
|
||||||
if (!text) return;
|
if (ELEM3(NULL, text, text->curl, text->sell)) {
|
||||||
if (!text->curl) return;
|
return;
|
||||||
if (!text->sell) return;
|
}
|
||||||
|
|
||||||
/* insert spaces rather than tabs */
|
/* insert spaces rather than tabs */
|
||||||
if (text->flags & TXT_TABSTOSPACES) {
|
if (text->flags & TXT_TABSTOSPACES) {
|
||||||
|
|||||||
@@ -1431,7 +1431,7 @@ static int convert_exec(bContext *C, wmOperator *op)
|
|||||||
{
|
{
|
||||||
Main *bmain = CTX_data_main(C);
|
Main *bmain = CTX_data_main(C);
|
||||||
Scene *scene = CTX_data_scene(C);
|
Scene *scene = CTX_data_scene(C);
|
||||||
Base *basen = NULL, *basact = NULL, *basedel = NULL;
|
Base *basen = NULL, *basact = NULL;
|
||||||
Object *ob, *ob1, *newob, *obact = CTX_data_active_object(C);
|
Object *ob, *ob1, *newob, *obact = CTX_data_active_object(C);
|
||||||
DerivedMesh *dm;
|
DerivedMesh *dm;
|
||||||
Curve *cu;
|
Curve *cu;
|
||||||
@@ -1687,14 +1687,6 @@ static int convert_exec(bContext *C, wmOperator *op)
|
|||||||
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||||
((ID *)ob->data)->flag &= ~LIB_DOIT; /* flag not to convert this datablock again */
|
((ID *)ob->data)->flag &= ~LIB_DOIT; /* flag not to convert this datablock again */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* delete original if needed */
|
|
||||||
if (basedel) {
|
|
||||||
if (!keep_original)
|
|
||||||
ED_base_object_free_and_unlink(bmain, scene, basedel);
|
|
||||||
|
|
||||||
basedel = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
CTX_DATA_END;
|
CTX_DATA_END;
|
||||||
|
|
||||||
|
|||||||
@@ -1140,7 +1140,7 @@ static int need_add_seq_dup(Sequence *seq)
|
|||||||
*/
|
*/
|
||||||
p = seq->prev;
|
p = seq->prev;
|
||||||
while (p) {
|
while (p) {
|
||||||
if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
|
if ((!p->strip) || (!p->strip->stripdata)) {
|
||||||
p = p->prev;
|
p = p->prev;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -1152,7 +1152,7 @@ static int need_add_seq_dup(Sequence *seq)
|
|||||||
|
|
||||||
p = seq->next;
|
p = seq->next;
|
||||||
while (p) {
|
while (p) {
|
||||||
if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
|
if ((!p->strip) || (!p->strip->stripdata)) {
|
||||||
p = p->next;
|
p = p->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user