Blenloader: access report list via api
This commit is contained in:
@@ -55,6 +55,7 @@ typedef struct BlendLibReader BlendLibReader;
|
|||||||
typedef struct BlendWriter BlendWriter;
|
typedef struct BlendWriter BlendWriter;
|
||||||
|
|
||||||
struct Main;
|
struct Main;
|
||||||
|
struct ReportList;
|
||||||
|
|
||||||
/* Blend Write API
|
/* Blend Write API
|
||||||
* ===============
|
* ===============
|
||||||
@@ -214,6 +215,7 @@ bool BLO_read_requires_endian_switch(BlendDataReader *reader);
|
|||||||
bool BLO_read_data_is_undo(BlendDataReader *reader);
|
bool BLO_read_data_is_undo(BlendDataReader *reader);
|
||||||
void BLO_read_data_globmap_add(BlendDataReader *reader, void *oldaddr, void *newaddr);
|
void BLO_read_data_globmap_add(BlendDataReader *reader, void *oldaddr, void *newaddr);
|
||||||
void BLO_read_glob_list(BlendDataReader *reader, struct ListBase *list);
|
void BLO_read_glob_list(BlendDataReader *reader, struct ListBase *list);
|
||||||
|
struct ReportList *BLO_read_data_reports(BlendDataReader *reader);
|
||||||
|
|
||||||
/* Blend Read Lib API
|
/* Blend Read Lib API
|
||||||
* ===================
|
* ===================
|
||||||
@@ -230,6 +232,7 @@ ID *BLO_read_get_new_id_address(BlendLibReader *reader, struct Library *lib, str
|
|||||||
/* Misc. */
|
/* Misc. */
|
||||||
bool BLO_read_lib_is_undo(BlendLibReader *reader);
|
bool BLO_read_lib_is_undo(BlendLibReader *reader);
|
||||||
struct Main *BLO_read_lib_get_main(BlendLibReader *reader);
|
struct Main *BLO_read_lib_get_main(BlendLibReader *reader);
|
||||||
|
struct ReportList *BLO_read_lib_reports(BlendLibReader *reader);
|
||||||
|
|
||||||
/* Blend Expand API
|
/* Blend Expand API
|
||||||
* ===================
|
* ===================
|
||||||
|
@@ -2948,7 +2948,7 @@ static void lib_link_object(BlendLibReader *reader, Object *ob)
|
|||||||
else {
|
else {
|
||||||
if (ob->instance_collection != NULL) {
|
if (ob->instance_collection != NULL) {
|
||||||
ID *id = BLO_read_get_new_id_address(reader, ob->id.lib, &ob->instance_collection->id);
|
ID *id = BLO_read_get_new_id_address(reader, ob->id.lib, &ob->instance_collection->id);
|
||||||
BLO_reportf_wrap(reader->fd->reports,
|
BLO_reportf_wrap(BLO_read_lib_reports(reader),
|
||||||
RPT_WARNING,
|
RPT_WARNING,
|
||||||
TIP_("Non-Empty object '%s' cannot duplicate collection '%s' "
|
TIP_("Non-Empty object '%s' cannot duplicate collection '%s' "
|
||||||
"anymore in Blender 2.80, removed instancing"),
|
"anymore in Blender 2.80, removed instancing"),
|
||||||
@@ -3289,7 +3289,7 @@ static void direct_link_modifiers(BlendDataReader *reader, ListBase *lb, Object
|
|||||||
|
|
||||||
if (md->type == eModifierType_Fluidsim) {
|
if (md->type == eModifierType_Fluidsim) {
|
||||||
BLO_reportf_wrap(
|
BLO_reportf_wrap(
|
||||||
reader->fd->reports,
|
BLO_read_data_reports(reader),
|
||||||
RPT_WARNING,
|
RPT_WARNING,
|
||||||
TIP_("Possible data loss when saving this file! %s modifier is deprecated (Object: %s)"),
|
TIP_("Possible data loss when saving this file! %s modifier is deprecated (Object: %s)"),
|
||||||
md->name,
|
md->name,
|
||||||
@@ -3299,7 +3299,7 @@ static void direct_link_modifiers(BlendDataReader *reader, ListBase *lb, Object
|
|||||||
}
|
}
|
||||||
else if (md->type == eModifierType_Smoke) {
|
else if (md->type == eModifierType_Smoke) {
|
||||||
BLO_reportf_wrap(
|
BLO_reportf_wrap(
|
||||||
reader->fd->reports,
|
BLO_read_data_reports(reader),
|
||||||
RPT_WARNING,
|
RPT_WARNING,
|
||||||
TIP_("Possible data loss when saving this file! %s modifier is deprecated (Object: %s)"),
|
TIP_("Possible data loss when saving this file! %s modifier is deprecated (Object: %s)"),
|
||||||
md->name,
|
md->name,
|
||||||
@@ -3874,7 +3874,7 @@ static void lib_link_scene(BlendLibReader *reader, Scene *sce)
|
|||||||
BLO_read_id_address(reader, sce->id.lib, &base_legacy->object);
|
BLO_read_id_address(reader, sce->id.lib, &base_legacy->object);
|
||||||
|
|
||||||
if (base_legacy->object == NULL) {
|
if (base_legacy->object == NULL) {
|
||||||
BLO_reportf_wrap(reader->fd->reports,
|
BLO_reportf_wrap(BLO_read_lib_reports(reader),
|
||||||
RPT_WARNING,
|
RPT_WARNING,
|
||||||
TIP_("LIB: object lost from scene: '%s'"),
|
TIP_("LIB: object lost from scene: '%s'"),
|
||||||
sce->id.name + 2);
|
sce->id.name + 2);
|
||||||
@@ -7488,6 +7488,11 @@ void BLO_read_glob_list(BlendDataReader *reader, ListBase *list)
|
|||||||
link_glob_list(reader->fd, list);
|
link_glob_list(reader->fd, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReportList *BLO_read_data_reports(BlendDataReader *reader)
|
||||||
|
{
|
||||||
|
return reader->fd->reports;
|
||||||
|
}
|
||||||
|
|
||||||
bool BLO_read_lib_is_undo(BlendLibReader *reader)
|
bool BLO_read_lib_is_undo(BlendLibReader *reader)
|
||||||
{
|
{
|
||||||
return reader->fd->memfile != NULL;
|
return reader->fd->memfile != NULL;
|
||||||
@@ -7498,6 +7503,11 @@ Main *BLO_read_lib_get_main(BlendLibReader *reader)
|
|||||||
return reader->main;
|
return reader->main;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReportList *BLO_read_lib_reports(BlendLibReader *reader)
|
||||||
|
{
|
||||||
|
return reader->fd->reports;
|
||||||
|
}
|
||||||
|
|
||||||
void BLO_expand_id(BlendExpander *expander, ID *id)
|
void BLO_expand_id(BlendExpander *expander, ID *id)
|
||||||
{
|
{
|
||||||
expand_doit(expander->fd, expander->main, id);
|
expand_doit(expander->fd, expander->main, id);
|
||||||
|
Reference in New Issue
Block a user