Cleanup: remove script ID-types

Unused since 2.4x and unlikely to be reintroduced as ID-types.
This commit is contained in:
Campbell Barton 2015-10-23 01:20:01 +11:00
parent e7cd64dc97
commit e6c943c917
10 changed files with 1 additions and 53 deletions

View File

@ -76,7 +76,7 @@ void id_clear_lib_data(struct Main *bmain, struct ID *id);
struct ListBase *which_libbase(struct Main *mainlib, short type);
#define MAX_LIBARRAY 35
#define MAX_LIBARRAY 34
int set_listbasepointers(struct Main *main, struct ListBase *lb[MAX_LIBARRAY]);
void BKE_libblock_free(struct Main *bmain, void *idv);

View File

@ -85,7 +85,6 @@ typedef struct Main {
ListBase key;
ListBase world;
ListBase screen;
ListBase script;
ListBase vfont;
ListBase text;
ListBase speaker;

View File

@ -256,7 +256,6 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
/* comes from readfile.c */
SWAP(ListBase, G.main->wm, bfd->main->wm);
SWAP(ListBase, G.main->screen, bfd->main->screen);
SWAP(ListBase, G.main->script, bfd->main->script);
/* we re-use current screen */
curscreen = CTX_wm_screen(C);

View File

@ -264,8 +264,6 @@ bool id_make_local(ID *id, bool test)
return false; /* not implemented */
case ID_TXT:
return false; /* not implemented */
case ID_SCRIPT:
return false; /* deprecated */
case ID_SO:
return false; /* not implemented */
case ID_GR:
@ -360,8 +358,6 @@ bool id_copy(ID *id, ID **newid, bool test)
case ID_TXT:
if (!test) *newid = (ID *)BKE_text_copy(G.main, (Text *)id);
return true;
case ID_SCRIPT:
return false; /* deprecated */
case ID_SO:
return false; /* not implemented */
case ID_GR:
@ -496,8 +492,6 @@ ListBase *which_libbase(Main *mainlib, short type)
return &(mainlib->vfont);
case ID_TXT:
return &(mainlib->text);
case ID_SCRIPT:
return &(mainlib->script);
case ID_SPK:
return &(mainlib->speaker);
case ID_SO:
@ -614,7 +608,6 @@ int set_listbasepointers(Main *main, ListBase **lb)
lb[a++] = &(main->palettes);
lb[a++] = &(main->paintcurves);
lb[a++] = &(main->brush);
lb[a++] = &(main->script);
lb[a++] = &(main->particle);
lb[a++] = &(main->speaker);
@ -708,9 +701,6 @@ void *BKE_libblock_alloc_notest(short type)
case ID_TXT:
id = MEM_callocN(sizeof(Text), "text");
break;
case ID_SCRIPT:
//XXX id = MEM_callocN(sizeof(Script), "script");
break;
case ID_SPK:
id = MEM_callocN(sizeof(Speaker), "speaker");
break;
@ -858,9 +848,6 @@ void BKE_libblock_init_empty(ID *id)
case ID_TXT:
BKE_text_init((Text *)id);
break;
case ID_SCRIPT:
BLI_assert(0);
break;
case ID_SO:
/* Another fuzzy case, think NULLified content is OK here... */
break;
@ -1135,9 +1122,6 @@ void BKE_libblock_free_ex(Main *bmain, void *idv, bool do_id_user)
case ID_TXT:
BKE_text_free((Text *)id);
break;
case ID_SCRIPT:
/* deprecated */
break;
case ID_SPK:
BKE_speaker_free((Speaker *)id);
break;

View File

@ -2220,14 +2220,6 @@ static void direct_link_paint_curve(FileData *fd, PaintCurve *pc)
pc->points = newdataadr(fd, pc->points);
}
static void direct_link_script(FileData *UNUSED(fd), Script *script)
{
script->id.us = 1;
SCRIPT_SET_NULL(script);
}
/* ************ READ PACKEDFILE *************** */
static PackedFile *direct_link_packedfile(FileData *fd, PackedFile *oldpf)
@ -8035,9 +8027,6 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, int flag, ID
case ID_PA:
direct_link_particlesettings(fd, (ParticleSettings*)id);
break;
case ID_SCRIPT:
direct_link_script(fd, (Script*)id);
break;
case ID_GD:
direct_link_gpencil(fd, (bGPdata *)id);
break;

View File

@ -3246,7 +3246,6 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
idproperties_fix_group_lengths(main->key);
idproperties_fix_group_lengths(main->world);
idproperties_fix_group_lengths(main->screen);
idproperties_fix_group_lengths(main->script);
idproperties_fix_group_lengths(main->vfont);
idproperties_fix_group_lengths(main->text);
idproperties_fix_group_lengths(main->sound);

View File

@ -3214,18 +3214,6 @@ static void write_paintcurves(WriteData *wd, ListBase *idbase)
}
}
static void write_scripts(WriteData *wd, ListBase *idbase)
{
Script *script;
for (script=idbase->first; script; script= script->id.next) {
if (script->id.us>0 || wd->current) {
writestruct(wd, ID_SCRIPT, "Script", 1, script);
if (script->id.properties) IDP_WriteProperty(script->id.properties, wd);
}
}
}
static void write_movieTracks(WriteData *wd, ListBase *tracks)
{
MovieTrackingTrack *track;
@ -3762,7 +3750,6 @@ static int write_file_handle(
write_brushes (wd, &mainvar->brush);
write_palettes (wd, &mainvar->palettes);
write_paintcurves (wd, &mainvar->paintcurves);
write_scripts (wd, &mainvar->script);
write_gpencils (wd, &mainvar->gpencil);
write_linestyles(wd, &mainvar->linestyle);
write_libraries(wd, mainvar->next);

View File

@ -232,7 +232,6 @@ typedef struct PreviewImage {
#define ID_ID MAKE_ID2('I', 'D') /* (internal use only) */
#define ID_AR MAKE_ID2('A', 'R') /* bArmature */
#define ID_AC MAKE_ID2('A', 'C') /* bAction */
#define ID_SCRIPT MAKE_ID2('P', 'Y') /* Script (depreciated) */
#define ID_NT MAKE_ID2('N', 'T') /* bNodeTree */
#define ID_BR MAKE_ID2('B', 'R') /* Brush */
#define ID_PA MAKE_ID2('P', 'A') /* ParticleSettings */

View File

@ -185,12 +185,6 @@ static void rna_Main_screen_begin(CollectionPropertyIterator *iter, PointerRNA *
rna_iterator_listbase_begin(iter, &bmain->screen, NULL);
}
static void rna_Main_script_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Main *bmain = (Main *)ptr->data;
rna_iterator_listbase_begin(iter, &bmain->script, NULL);
}
static void rna_Main_font_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{
Main *bmain = (Main *)ptr->data;
@ -349,7 +343,6 @@ void RNA_def_main(BlenderRNA *brna)
{"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks", RNA_def_main_worlds},
{"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks", RNA_def_main_groups},
{"shape_keys", "Key", "rna_Main_key_begin", "Shape Keys", "Shape Key datablocks", NULL},
{"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks (DEPRECATED)", NULL},
{"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks", RNA_def_main_texts},
{"speakers", "Speaker", "rna_Main_speaker_begin", "Speakers", "Speaker datablocks", RNA_def_main_speakers},
{"sounds", "Sound", "rna_Main_sound_begin", "Sounds", "Sound datablocks", RNA_def_main_sounds},

View File

@ -790,7 +790,6 @@ static void rna_Main_brushes_tag(Main *bmain, int value) { BKE_main_id_tag_listb
static void rna_Main_worlds_tag(Main *bmain, int value) { BKE_main_id_tag_listbase(&bmain->world, value); }
static void rna_Main_groups_tag(Main *bmain, int value) { BKE_main_id_tag_listbase(&bmain->group, value); }
// static void rna_Main_shape_keys_tag(Main *bmain, int value) { BKE_main_id_tag_listbase(&bmain->key, value); }
// static void rna_Main_scripts_tag(Main *bmain, int value) { BKE_main_id_tag_listbase(&bmain->script, value); }
static void rna_Main_texts_tag(Main *bmain, int value) { BKE_main_id_tag_listbase(&bmain->text, value); }
static void rna_Main_speakers_tag(Main *bmain, int value) { BKE_main_id_tag_listbase(&bmain->speaker, value); }
static void rna_Main_sounds_tag(Main *bmain, int value) { BKE_main_id_tag_listbase(&bmain->sound, value); }