Merge branch 'master' into optimize_3mf_strings

pull/3882/head
Kim Kulling 2021-05-05 15:12:06 +02:00 committed by GitHub
commit 5325b327c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 7 deletions

View File

@ -1789,13 +1789,13 @@ void FBXExporter::WriteObjects ()
blendchannel_uid, blendshape_name + FBX::SEPARATOR + "SubDeformer", "BlendShapeChannel"
);
sdnode.AddChild("Version", int32_t(100));
sdnode.AddChild("DeformPercent", int32_t(100));
sdnode.AddChild("DeformPercent", float_t(0.0));
FBX::Node p("Properties70");
p.AddP70numberA("DeformPercent", 100.);
p.AddP70numberA("DeformPercent", 0.0);
sdnode.AddChild(p);
// TODO: Normally just one weight per channel, adding stub for later development
std::vector<float>fFullWeights;
fFullWeights.push_back(0.);
fFullWeights.push_back(100.);
sdnode.AddChild("FullWeights", fFullWeights);
sdnode.Dump(outstream, binary, indent);

View File

@ -48,6 +48,7 @@ corresponding preprocessor flag to selectively disable formats.
#include <assimp/BaseImporter.h>
#include <vector>
#include <cstdlib>
// ------------------------------------------------------------------------------------------------
// Importers
@ -204,7 +205,17 @@ corresponding preprocessor flag to selectively disable formats.
namespace Assimp {
// ------------------------------------------------------------------------------------------------
void GetImporterInstanceList(std::vector<BaseImporter *> &out) {
void GetImporterInstanceList(std::vector<BaseImporter *> &out) {
// Some importers may be unimplemented or otherwise unsuitable for general use
// in their current state. Devs can set ASSIMP_ENABLE_DEV_IMPORTERS in their
// local environment to enable them, otherwise they're left out of the registry.
const char *envStr = std::getenv("ASSIMP_ENABLE_DEV_IMPORTERS");
bool devImportersEnabled = envStr && strcmp(envStr, "0");
// Ensure no unused var warnings if all uses are #ifndef'd away below:
(void)devImportersEnabled;
// ----------------------------------------------------------------------------
// Add an instance of each worker class here
// (register_new_importers_here)
@ -354,7 +365,9 @@ void GetImporterInstanceList(std::vector<BaseImporter *> &out) {
out.push_back(new D3MFImporter());
#endif
#ifndef ASSIMP_BUILD_NO_X3D_IMPORTER
out.push_back(new X3DImporter());
if (devImportersEnabled) { // https://github.com/assimp/assimp/issues/3647
out.push_back(new X3DImporter());
}
#endif
#ifndef ASSIMP_BUILD_NO_MMD_IMPORTER
out.push_back(new MMDImporter());

View File

@ -1,6 +1,6 @@
#-*- coding: utf-8 -*-
from ctypes import POINTER, c_void_p, c_uint, c_char, c_float, Structure, c_char_p, c_double, c_ubyte, c_size_t, c_uint32
from ctypes import POINTER, c_void_p, c_uint, c_char, c_float, Structure, c_double, c_ubyte, c_size_t, c_uint32
class Vector2D(Structure):
@ -1121,7 +1121,7 @@ class Scene(Structure):
("mMetadata", POINTER(Metadata)),
# Internal data, do not touch
("mPrivate", c_char_p),
("mPrivate", POINTER(c_char)),
]
assimp_structs_as_tuple = (Matrix4x4,