blob: 771f335a8dba5e8e02132d32ab7b5d6fe2678380 [file] [log] [blame]
#include "rive/importers/backboard_importer.hpp"
#include "rive/importers/import_stack.hpp"
#include "rive/importers/scripted_object_importer.hpp"
#include "rive/scripted/scripted_drawable.hpp"
#include "rive/script_input_string.hpp"
using namespace rive;
StatusCode ScriptInputString::import(ImportStack& importStack)
{
auto importer =
importStack.latest<ScriptedObjectImporter>(ScriptedDrawable::typeKey);
if (importer == nullptr)
{
return StatusCode::MissingObject;
}
importer->addInput(this);
auto obj = scriptedObject();
if (obj && obj->component() != nullptr)
{
// If the ScriptedObject is a Component, we need the ArtboardImporter
// to add it as a Component, otherwise, return Ok
return Super::import(importStack);
}
return StatusCode::Ok;
}