mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
work around static init failure on windows
This commit is contained in:
parent
cd45731ce7
commit
61008f86b7
@ -35,12 +35,12 @@ ConfigureFn(config_mayaegg) {
|
||||
|
||||
// Should we respect the Maya double-sided flag (true) or ignore it
|
||||
// and assume everything is single-sided (false)?
|
||||
const bool maya_default_double_sided = config_mayaegg.GetBool("maya-default-double-sided", false);
|
||||
bool maya_default_double_sided;
|
||||
|
||||
// Should we apply vertex color even when a texture is applied (true)
|
||||
// or only when no texture is applied or the vertex-color egg flag is
|
||||
// set (false)?
|
||||
const bool maya_default_vertex_color = config_mayaegg.GetBool("maya-default-vertex-color", true);
|
||||
bool maya_default_vertex_color;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libmayaegg
|
||||
@ -60,5 +60,12 @@ init_libmayaegg() {
|
||||
|
||||
MayaEggGroupUserData::init_type();
|
||||
MayaNodeDesc::init_type();
|
||||
|
||||
// For some reason, static init is not reliably running when this is
|
||||
// loaded as a plug-in of a plug-in. Initialize these explicitly
|
||||
// here.
|
||||
maya_default_double_sided = config_mayaegg.GetBool("maya-default-double-sided", false);
|
||||
maya_default_vertex_color = config_mayaegg.GetBool("maya-default-vertex-color", true);
|
||||
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
NotifyCategoryDeclNoExport(mayaegg);
|
||||
|
||||
extern const bool maya_default_double_sided;
|
||||
extern const bool maya_default_vertex_color;
|
||||
extern bool maya_default_double_sided;
|
||||
extern bool maya_default_vertex_color;
|
||||
|
||||
extern void init_libmayaegg();
|
||||
|
||||
|
@ -84,6 +84,9 @@ MayaToEggConverter::
|
||||
MayaToEggConverter(const string &program_name) :
|
||||
_program_name(program_name)
|
||||
{
|
||||
// Make sure the library is properly initialized.
|
||||
init_libmayaegg();
|
||||
|
||||
_from_selection = false;
|
||||
_polygon_output = false;
|
||||
_polygon_tolerance = 0.01;
|
||||
|
Loading…
x
Reference in New Issue
Block a user