mirror of https://github.com/AxioDL/metaforce.git
Update libSpecter
This commit is contained in:
parent
dd75a37b66
commit
10b7c624f2
|
@ -289,7 +289,10 @@ bool FRME::Extract(const SpecBase &dataSpec, PAKEntryReadStream &rs, const HECL:
|
||||||
" bpy.context.scene.objects.unlink(ob)\n"
|
" bpy.context.scene.objects.unlink(ob)\n"
|
||||||
" bpy.data.objects.remove(ob)\n";
|
" bpy.data.objects.remove(ob)\n";
|
||||||
|
|
||||||
os.format("bpy.context.scene.name = 'FRME_%s'\n",
|
os.format("bpy.context.scene.name = 'FRME_%s'\n"
|
||||||
|
"bpy.context.scene.render.resolution_x = 640\n"
|
||||||
|
"bpy.context.scene.render.resolution_y = 480\n"
|
||||||
|
"bpy.context.scene.render.engine = 'BLENDER_GAME'\n",
|
||||||
entry.id.toString().c_str());
|
entry.id.toString().c_str());
|
||||||
|
|
||||||
for (const FRME::Widget& w : frme.widgets)
|
for (const FRME::Widget& w : frme.widgets)
|
||||||
|
@ -316,17 +319,20 @@ bool FRME::Extract(const SpecBase &dataSpec, PAKEntryReadStream &rs, const HECL:
|
||||||
"cam.lens_unit = 'FOV'\n"
|
"cam.lens_unit = 'FOV'\n"
|
||||||
"cam.angle = math.radians(%f)\n"
|
"cam.angle = math.radians(%f)\n"
|
||||||
"cam.clip_start = %f\n"
|
"cam.clip_start = %f\n"
|
||||||
"cam.clip_end = %f\n",
|
"cam.clip_end = %f\n"
|
||||||
proj->fov, proj->znear, proj->zfar);
|
"bpy.context.scene.render.pixel_aspect_x = %f\n"
|
||||||
|
"bpy.context.scene.render.pixel_aspect_y = bpy.context.scene.render.pixel_aspect_x\n",
|
||||||
|
proj->fov, proj->znear, proj->zfar, proj->aspect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
os << "angle = Quaternion((1.0, 0.0, 0.0), math.radians(90.0))\n";
|
os << "angle = Quaternion((1.0, 0.0, 0.0), math.radians(90.0))\n";
|
||||||
}
|
}
|
||||||
else if (w.type == SBIG('LITE'))
|
else if (w.type == SBIG('LITE'))
|
||||||
os.format("lite = bpy.data.lamps.new(name='%s', type='POINT')\n"
|
os.format("lite = bpy.data.lamps.new(name='%s', type='POINT')\n"
|
||||||
|
"lite.color = (%f, %f, %f)\n"
|
||||||
"binding = lite\n",
|
"binding = lite\n",
|
||||||
w.header.name.c_str());
|
w.header.name.c_str(),
|
||||||
|
w.header.color.vec[0], w.header.color.vec[1], w.header.color.vec[2]);
|
||||||
|
|
||||||
os.format("frme_obj = bpy.data.objects.new(name='%s', object_data=binding)\n"
|
os.format("frme_obj = bpy.data.objects.new(name='%s', object_data=binding)\n"
|
||||||
"frme_obj.retro_widget_type = '%s'\n"
|
"frme_obj.retro_widget_type = '%s'\n"
|
||||||
|
|
|
@ -105,6 +105,14 @@ struct FRME : BigDNA
|
||||||
{
|
{
|
||||||
DECL_DNA
|
DECL_DNA
|
||||||
UniqueID32 model;
|
UniqueID32 model;
|
||||||
|
enum class BlendMode
|
||||||
|
{
|
||||||
|
Unknown0,
|
||||||
|
Unknown1,
|
||||||
|
Unknown2,
|
||||||
|
Additive
|
||||||
|
};
|
||||||
|
|
||||||
Value<atUint32> blendMode;
|
Value<atUint32> blendMode;
|
||||||
Value<atUint32> lightMode;
|
Value<atUint32> lightMode;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
namespace URDE
|
namespace URDE
|
||||||
{
|
{
|
||||||
class ModelViewer : public Space
|
class ModelViewer : public ViewerSpace
|
||||||
{
|
{
|
||||||
struct State : Space::State
|
struct State : Space::State
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ class ModelViewer : public Space
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ModelViewer(ViewManager& vm, Space* parent)
|
ModelViewer(ViewManager& vm, Space* parent)
|
||||||
: Space(vm, Class::ModelViewer, parent)
|
: ViewerSpace(vm, Class::ModelViewer, parent)
|
||||||
{
|
{
|
||||||
reloadState();
|
reloadState();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue