mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
3833a35fa9
3
direct/src/dist/FreezeTool.py
vendored
3
direct/src/dist/FreezeTool.py
vendored
@ -1948,6 +1948,9 @@ class Freezer:
|
|||||||
if self.platform.startswith('win'):
|
if self.platform.startswith('win'):
|
||||||
# We don't use mmap on Windows. Align just for good measure.
|
# We don't use mmap on Windows. Align just for good measure.
|
||||||
blob_align = 32
|
blob_align = 32
|
||||||
|
elif self.platform.endswith('_aarch64') or self.platform.endswith('_arm64'):
|
||||||
|
# Most arm64 operating systems are configured with 16 KiB pages.
|
||||||
|
blob_align = 16384
|
||||||
else:
|
else:
|
||||||
# Align to page size, so that it can be mmapped.
|
# Align to page size, so that it can be mmapped.
|
||||||
blob_align = 4096
|
blob_align = 4096
|
||||||
|
@ -16,7 +16,7 @@ class WxSlider(wx.Slider):
|
|||||||
|
|
||||||
self.maxValue = maxValue
|
self.maxValue = maxValue
|
||||||
self.minValue = minValue
|
self.minValue = minValue
|
||||||
intVal = 100.0 / (self.maxValue - self.minValue) * (value - self.minValue)
|
intVal = int(100.0 / (self.maxValue - self.minValue) * (value - self.minValue))
|
||||||
|
|
||||||
intMin = 0
|
intMin = 0
|
||||||
intMax = 100
|
intMax = 100
|
||||||
@ -35,33 +35,37 @@ class WxSlider(wx.Slider):
|
|||||||
textSize, wx.TE_CENTER | wx.TE_PROCESS_ENTER)
|
textSize, wx.TE_CENTER | wx.TE_PROCESS_ENTER)
|
||||||
|
|
||||||
self.textValue.Disable()
|
self.textValue.Disable()
|
||||||
newPos = (pos[0], pos[1] + 20)
|
pos = (pos[0], pos[1] + 20)
|
||||||
else:
|
else:
|
||||||
newStyle = wx.SL_VERTICAL
|
newStyle = wx.SL_VERTICAL
|
||||||
newPos = (pos[0], pos[1] + 40)
|
pos = (pos[0], pos[1] + 40)
|
||||||
|
|
||||||
if style & wx.SL_AUTOTICKS:
|
if style & wx.SL_AUTOTICKS:
|
||||||
newStyle |= wx.SL_AUTOTICKS
|
newStyle |= wx.SL_AUTOTICKS
|
||||||
|
|
||||||
wx.Slider.__init__(self, parent, id, intVal, intMin, intMax, newPos, size, style=newStyle)
|
wx.Slider.__init__(self, parent, id, intVal, intMin, intMax, pos, size, style=newStyle)
|
||||||
self.Disable()
|
self.Disable()
|
||||||
|
|
||||||
def GetValue(self):
|
def GetValue(self):
|
||||||
# overriding wx.Slider.GetValue()
|
# overriding wx.Slider.GetValue()
|
||||||
#return (wx.Slider.GetValue(self) * (self.maxValue - self.minValue) / 100.0 + self.minValue)
|
if self.textValue is not None: # Horizontal with labels
|
||||||
return float(self.textValue.GetValue()) # [gjeon] since the value from the slider is not as precise as the value entered by the user
|
return float(self.textValue.GetValue()) # [gjeon] since the value from the slider is not as precise as the value entered by the user
|
||||||
|
else:
|
||||||
|
return (wx.Slider.GetValue(self) * (self.maxValue - self.minValue) / 100.0 + self.minValue)
|
||||||
|
|
||||||
def SetValue(self, value):
|
def SetValue(self, value):
|
||||||
# overriding wx.Slider.SetValue()
|
# overriding wx.Slider.SetValue()
|
||||||
self.textValue.SetValue("%.2f" % value)
|
if self.textValue is not None:
|
||||||
|
self.textValue.SetValue("%.2f" % value)
|
||||||
intVal = 100.0 / (self.maxValue - self.minValue) * (value - self.minValue)
|
intVal = 100.0 / (self.maxValue - self.minValue) * (value - self.minValue)
|
||||||
wx.Slider.SetValue(self, intVal)
|
wx.Slider.SetValue(self, intVal)
|
||||||
|
|
||||||
def onChange(self, event):
|
def onChange(self, event):
|
||||||
# update textValue from slider
|
# update textValue from slider
|
||||||
self.textValue.Clear()
|
if self.textValue is not None:
|
||||||
floatVal = wx.Slider.GetValue(self) * (self.maxValue - self.minValue) / 100.0 + self.minValue
|
self.textValue.Clear()
|
||||||
self.textValue.WriteText("%.2f" % floatVal)
|
floatVal = wx.Slider.GetValue(self) * (self.maxValue - self.minValue) / 100.0 + self.minValue
|
||||||
|
self.textValue.WriteText("%.2f" % floatVal)
|
||||||
if self.updateCB: # callback function sould receive event as the argument
|
if self.updateCB: # callback function sould receive event as the argument
|
||||||
self.updateCB(event)
|
self.updateCB(event)
|
||||||
event.Skip()
|
event.Skip()
|
||||||
@ -82,13 +86,14 @@ class WxSlider(wx.Slider):
|
|||||||
def Disable(self):
|
def Disable(self):
|
||||||
# overriding wx.Slider.Disable()
|
# overriding wx.Slider.Disable()
|
||||||
wx.Slider.Disable(self)
|
wx.Slider.Disable(self)
|
||||||
self.textValue.Disable()
|
if self.textValue is not None:
|
||||||
|
self.textValue.Disable()
|
||||||
|
|
||||||
def Enable(self):
|
def Enable(self):
|
||||||
# overriding wx.Slider.Enable()
|
# overriding wx.Slider.Enable()
|
||||||
wx.Slider.Enable(self)
|
wx.Slider.Enable(self)
|
||||||
self.Bind(wx.EVT_SLIDER, self.onChange)
|
self.Bind(wx.EVT_SLIDER, self.onChange)
|
||||||
|
|
||||||
if not self.textValue is None:
|
if self.textValue is not None:
|
||||||
self.textValue.Enable()
|
self.textValue.Enable()
|
||||||
self.textValue.Bind(wx.EVT_TEXT_ENTER, self.onEnter)
|
self.textValue.Bind(wx.EVT_TEXT_ENTER, self.onEnter)
|
||||||
|
@ -105,11 +105,19 @@ load_display_information() {
|
|||||||
&kCFCopyStringDictionaryKeyCallBacks,
|
&kCFCopyStringDictionaryKeyCallBacks,
|
||||||
&kCFTypeDictionaryValueCallBacks);
|
&kCFTypeDictionaryValueCallBacks);
|
||||||
size_t num_modes = 0;
|
size_t num_modes = 0;
|
||||||
|
int32_t current_mode_id = -1;
|
||||||
CFArrayRef modes = CGDisplayCopyAllDisplayModes(_display, options);
|
CFArrayRef modes = CGDisplayCopyAllDisplayModes(_display, options);
|
||||||
if (modes != NULL) {
|
if (modes != NULL) {
|
||||||
num_modes = CFArrayGetCount(modes);
|
num_modes = CFArrayGetCount(modes);
|
||||||
_display_information->_total_display_modes = num_modes;
|
_display_information->_total_display_modes = num_modes;
|
||||||
_display_information->_display_mode_array = new DisplayMode[num_modes];
|
_display_information->_display_mode_array = new DisplayMode[num_modes];
|
||||||
|
|
||||||
|
// Get information about the current mode.
|
||||||
|
CGDisplayModeRef mode = CGDisplayCopyDisplayMode(_display);
|
||||||
|
if (mode) {
|
||||||
|
current_mode_id = CGDisplayModeGetIODisplayModeID(mode);
|
||||||
|
CGDisplayModeRelease(mode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (options != NULL) {
|
if (options != NULL) {
|
||||||
CFRelease(options);
|
CFRelease(options);
|
||||||
@ -153,6 +161,14 @@ load_display_information() {
|
|||||||
// pixel can be deduced from the string length. Nifty!
|
// pixel can be deduced from the string length. Nifty!
|
||||||
_display_information->_display_mode_array[i].bits_per_pixel = CFStringGetLength(encoding);
|
_display_information->_display_mode_array[i].bits_per_pixel = CFStringGetLength(encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (current_mode_id >= 0 && current_mode_id == CGDisplayModeGetIODisplayModeID(mode)) {
|
||||||
|
_display_information->_current_display_mode_index = i;
|
||||||
|
|
||||||
|
// Stop checking
|
||||||
|
current_mode_id = -1;
|
||||||
|
}
|
||||||
|
|
||||||
CFRelease(encoding);
|
CFRelease(encoding);
|
||||||
}
|
}
|
||||||
if (modes != nullptr) {
|
if (modes != nullptr) {
|
||||||
|
@ -75,7 +75,6 @@ DisplayInformation::
|
|||||||
DisplayInformation::
|
DisplayInformation::
|
||||||
DisplayInformation() {
|
DisplayInformation() {
|
||||||
DisplayInformation::DetectionState state;
|
DisplayInformation::DetectionState state;
|
||||||
int get_adapter_display_mode_state;
|
|
||||||
int get_device_caps_state;
|
int get_device_caps_state;
|
||||||
int window_width;
|
int window_width;
|
||||||
int window_height;
|
int window_height;
|
||||||
@ -88,7 +87,6 @@ DisplayInformation() {
|
|||||||
uint64_t available_physical_memory;
|
uint64_t available_physical_memory;
|
||||||
|
|
||||||
state = DisplayInformation::DS_unknown;
|
state = DisplayInformation::DS_unknown;
|
||||||
get_adapter_display_mode_state = false;
|
|
||||||
get_device_caps_state = false;
|
get_device_caps_state = false;
|
||||||
window_width = 0;
|
window_width = 0;
|
||||||
window_height = 0;
|
window_height = 0;
|
||||||
@ -101,7 +99,7 @@ DisplayInformation() {
|
|||||||
available_physical_memory = 0;
|
available_physical_memory = 0;
|
||||||
|
|
||||||
_state = state;
|
_state = state;
|
||||||
_get_adapter_display_mode_state = get_adapter_display_mode_state;
|
_current_display_mode_index = -1;
|
||||||
_get_device_caps_state = get_device_caps_state;
|
_get_device_caps_state = get_device_caps_state;
|
||||||
_maximum_window_width = window_width;
|
_maximum_window_width = window_width;
|
||||||
_maximum_window_height = window_height;
|
_maximum_window_height = window_height;
|
||||||
@ -209,6 +207,16 @@ get_display_mode(int display_index) {
|
|||||||
return _display_mode_array[display_index];
|
return _display_mode_array[display_index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the index of the current display mode (determined at the time of
|
||||||
|
* application start) in the display mode array, or -1 if this could not be
|
||||||
|
* determined.
|
||||||
|
*/
|
||||||
|
int DisplayInformation::
|
||||||
|
get_current_display_mode_index() const {
|
||||||
|
return _current_display_mode_index;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated use get_display_mode instead.
|
* @deprecated use get_display_mode instead.
|
||||||
*/
|
*/
|
||||||
|
@ -56,6 +56,8 @@ PUBLISHED:
|
|||||||
const DisplayMode &get_display_mode(int display_index);
|
const DisplayMode &get_display_mode(int display_index);
|
||||||
MAKE_SEQ(get_display_modes, get_total_display_modes, get_display_mode);
|
MAKE_SEQ(get_display_modes, get_total_display_modes, get_display_mode);
|
||||||
|
|
||||||
|
int get_current_display_mode_index() const;
|
||||||
|
|
||||||
// Older interface for display modes.
|
// Older interface for display modes.
|
||||||
int get_display_mode_width(int display_index);
|
int get_display_mode_width(int display_index);
|
||||||
int get_display_mode_height(int display_index);
|
int get_display_mode_height(int display_index);
|
||||||
@ -115,7 +117,7 @@ PUBLISHED:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DetectionState _state;
|
DetectionState _state;
|
||||||
int _get_adapter_display_mode_state;
|
int _current_display_mode_index;
|
||||||
int _get_device_caps_state;
|
int _get_device_caps_state;
|
||||||
int _maximum_window_width;
|
int _maximum_window_width;
|
||||||
int _maximum_window_height;
|
int _maximum_window_height;
|
||||||
|
@ -99,7 +99,6 @@ static int get_display_information (DisplaySearchParameters &display_search_para
|
|||||||
|
|
||||||
int success;
|
int success;
|
||||||
DisplayInformation::DetectionState state;
|
DisplayInformation::DetectionState state;
|
||||||
int get_adapter_display_mode_state;
|
|
||||||
int get_device_caps_state;
|
int get_device_caps_state;
|
||||||
|
|
||||||
GraphicsStateGuardian::ShaderModel shader_model;
|
GraphicsStateGuardian::ShaderModel shader_model;
|
||||||
@ -117,6 +116,7 @@ static int get_display_information (DisplaySearchParameters &display_search_para
|
|||||||
int window_height;
|
int window_height;
|
||||||
int window_bits_per_pixel;
|
int window_bits_per_pixel;
|
||||||
int total_display_modes;
|
int total_display_modes;
|
||||||
|
int current_display_mode_index;
|
||||||
DisplayMode *display_mode_array;
|
DisplayMode *display_mode_array;
|
||||||
|
|
||||||
uint64_t physical_memory;
|
uint64_t physical_memory;
|
||||||
@ -139,6 +139,7 @@ static int get_display_information (DisplaySearchParameters &display_search_para
|
|||||||
window_height = 0;
|
window_height = 0;
|
||||||
window_bits_per_pixel = 0;
|
window_bits_per_pixel = 0;
|
||||||
total_display_modes = 0;
|
total_display_modes = 0;
|
||||||
|
current_display_mode_index = -1;
|
||||||
display_mode_array = nullptr;
|
display_mode_array = nullptr;
|
||||||
|
|
||||||
minimum_width = display_search_parameters._minimum_width;
|
minimum_width = display_search_parameters._minimum_width;
|
||||||
@ -153,7 +154,6 @@ static int get_display_information (DisplaySearchParameters &display_search_para
|
|||||||
texture_memory = 0;
|
texture_memory = 0;
|
||||||
|
|
||||||
state = DisplayInformation::DS_unknown;
|
state = DisplayInformation::DS_unknown;
|
||||||
get_adapter_display_mode_state = false;
|
|
||||||
get_device_caps_state = false;
|
get_device_caps_state = false;
|
||||||
|
|
||||||
physical_memory = 0;
|
physical_memory = 0;
|
||||||
@ -193,6 +193,7 @@ static int get_display_information (DisplaySearchParameters &display_search_para
|
|||||||
device_type = D3DDEVTYPE_HAL;
|
device_type = D3DDEVTYPE_HAL;
|
||||||
|
|
||||||
// windowed mode max res and format
|
// windowed mode max res and format
|
||||||
|
bool get_adapter_display_mode_state = false;
|
||||||
if (direct_3d -> GetAdapterDisplayMode (adapter, ¤t_d3d_display_mode) == D3D_OK) {
|
if (direct_3d -> GetAdapterDisplayMode (adapter, ¤t_d3d_display_mode) == D3D_OK) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
printf ("current mode w = %d h = %d r = %d f = %d \n",
|
printf ("current mode w = %d h = %d r = %d f = %d \n",
|
||||||
@ -428,6 +429,14 @@ static int get_display_information (DisplaySearchParameters &display_search_para
|
|||||||
display_mode -> refresh_rate = d3d_display_mode.RefreshRate;
|
display_mode -> refresh_rate = d3d_display_mode.RefreshRate;
|
||||||
display_mode -> fullscreen_only = display_format_array [format_index].fullscreen_only;
|
display_mode -> fullscreen_only = display_format_array [format_index].fullscreen_only;
|
||||||
|
|
||||||
|
if (get_adapter_display_mode_state &&
|
||||||
|
d3d_display_mode.Width == current_d3d_display_mode.Width &&
|
||||||
|
d3d_display_mode.Height == current_d3d_display_mode.Height &&
|
||||||
|
d3d_display_mode.RefreshRate == current_d3d_display_mode.RefreshRate &&
|
||||||
|
d3d_display_mode.Format == current_d3d_display_mode.Format) {
|
||||||
|
current_display_mode_index = total_display_modes;
|
||||||
|
}
|
||||||
|
|
||||||
total_display_modes++;
|
total_display_modes++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -587,7 +596,7 @@ static int get_display_information (DisplaySearchParameters &display_search_para
|
|||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
display_information -> _state = state;
|
display_information -> _state = state;
|
||||||
display_information -> _get_adapter_display_mode_state = get_adapter_display_mode_state;
|
display_information -> _current_display_mode_index = current_display_mode_index;
|
||||||
display_information -> _get_device_caps_state = get_device_caps_state;
|
display_information -> _get_device_caps_state = get_device_caps_state;
|
||||||
display_information -> _maximum_window_width = window_width;
|
display_information -> _maximum_window_width = window_width;
|
||||||
display_information -> _maximum_window_height = window_height;
|
display_information -> _maximum_window_height = window_height;
|
||||||
|
@ -328,9 +328,21 @@ WinGraphicsPipe() {
|
|||||||
if (windisplay_cat.is_debug()) {
|
if (windisplay_cat.is_debug()) {
|
||||||
windisplay_cat.debug() << "Using EnumDisplaySettings to fetch display information.\n";
|
windisplay_cat.debug() << "Using EnumDisplaySettings to fetch display information.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
pvector<DisplayMode> display_modes;
|
pvector<DisplayMode> display_modes;
|
||||||
|
DisplayMode current_mode = {0};
|
||||||
|
int current_mode_index = -1;
|
||||||
DEVMODE dm{};
|
DEVMODE dm{};
|
||||||
dm.dmSize = sizeof(dm);
|
dm.dmSize = sizeof(dm);
|
||||||
|
|
||||||
|
if (EnumDisplaySettings(nullptr, ENUM_CURRENT_SETTINGS, &dm) != 0) {
|
||||||
|
current_mode.width = dm.dmPelsWidth;
|
||||||
|
current_mode.height = dm.dmPelsHeight;
|
||||||
|
current_mode.bits_per_pixel = dm.dmBitsPerPel;
|
||||||
|
current_mode.refresh_rate = dm.dmDisplayFrequency;
|
||||||
|
current_mode.fullscreen_only = 0;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; EnumDisplaySettings(nullptr, i, &dm) != 0; ++i) {
|
for (int i = 0; EnumDisplaySettings(nullptr, i, &dm) != 0; ++i) {
|
||||||
DisplayMode mode;
|
DisplayMode mode;
|
||||||
mode.width = dm.dmPelsWidth;
|
mode.width = dm.dmPelsWidth;
|
||||||
@ -339,6 +351,9 @@ WinGraphicsPipe() {
|
|||||||
mode.refresh_rate = dm.dmDisplayFrequency;
|
mode.refresh_rate = dm.dmDisplayFrequency;
|
||||||
mode.fullscreen_only = 0;
|
mode.fullscreen_only = 0;
|
||||||
if (i == 0 || mode != display_modes.back()) {
|
if (i == 0 || mode != display_modes.back()) {
|
||||||
|
if (current_mode_index < 0 && mode == current_mode) {
|
||||||
|
current_mode_index = (int)display_modes.size();
|
||||||
|
}
|
||||||
display_modes.push_back(mode);
|
display_modes.push_back(mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -346,6 +361,7 @@ WinGraphicsPipe() {
|
|||||||
// Copy this information to the DisplayInformation object.
|
// Copy this information to the DisplayInformation object.
|
||||||
_display_information->_total_display_modes = display_modes.size();
|
_display_information->_total_display_modes = display_modes.size();
|
||||||
if (!display_modes.empty()) {
|
if (!display_modes.empty()) {
|
||||||
|
_display_information->_current_display_mode_index = current_mode_index;
|
||||||
_display_information->_display_mode_array = new DisplayMode[display_modes.size()];
|
_display_information->_display_mode_array = new DisplayMode[display_modes.size()];
|
||||||
std::copy(display_modes.begin(), display_modes.end(),
|
std::copy(display_modes.begin(), display_modes.end(),
|
||||||
_display_information->_display_mode_array);
|
_display_information->_display_mode_array);
|
||||||
|
@ -283,11 +283,25 @@ x11GraphicsPipe(const std::string &display) :
|
|||||||
x11display_cat.debug()
|
x11display_cat.debug()
|
||||||
<< "Using XRRScreenResources to obtain display modes\n";
|
<< "Using XRRScreenResources to obtain display modes\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Query current configuration, we just grab the first CRTC for now,
|
||||||
|
// since we don't have a way to represent multiple monitors.
|
||||||
|
RRMode current_mode_id = 0;
|
||||||
|
if (res->ncrtc > 0) {
|
||||||
|
if (auto info = get_crtc_info(res.get(), res->crtcs[0])) {
|
||||||
|
current_mode_id = info->mode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_display_information->_total_display_modes = res->nmode;
|
_display_information->_total_display_modes = res->nmode;
|
||||||
_display_information->_display_mode_array = new DisplayMode[res->nmode];
|
_display_information->_display_mode_array = new DisplayMode[res->nmode];
|
||||||
for (int i = 0; i < res->nmode; ++i) {
|
for (int i = 0; i < res->nmode; ++i) {
|
||||||
XRRModeInfo &mode = res->modes[i];
|
XRRModeInfo &mode = res->modes[i];
|
||||||
|
|
||||||
|
if (mode.id == current_mode_id) {
|
||||||
|
_display_information->_current_display_mode_index = i;
|
||||||
|
}
|
||||||
|
|
||||||
DisplayMode *dm = _display_information->_display_mode_array + i;
|
DisplayMode *dm = _display_information->_display_mode_array + i;
|
||||||
dm->width = mode.width;
|
dm->width = mode.width;
|
||||||
dm->height = mode.height;
|
dm->height = mode.height;
|
||||||
|
@ -57,22 +57,49 @@ get_extension() const {
|
|||||||
*/
|
*/
|
||||||
string LoaderFileTypeAssimp::
|
string LoaderFileTypeAssimp::
|
||||||
get_additional_extensions() const {
|
get_additional_extensions() const {
|
||||||
|
// This may be called at static init time, so ensure it is constructed now.
|
||||||
|
static ConfigVariableString assimp_disable_extensions
|
||||||
|
("assimp-disable-extensions", "",
|
||||||
|
PRC_DESC("A list of extensions (without preceding dot) that should not be "
|
||||||
|
"loaded via the Assimp loader, even if Assimp supports these "
|
||||||
|
"formats. It is useful to set this for eg. gltf and glb files "
|
||||||
|
"to prevent them from being accidentally loaded via the Assimp "
|
||||||
|
"plug-in instead of via a superior plug-in like panda3d-gltf."));
|
||||||
|
|
||||||
|
bool has_disabled_exts = !assimp_disable_extensions.empty();
|
||||||
|
|
||||||
aiString aexts;
|
aiString aexts;
|
||||||
aiGetExtensionList(&aexts);
|
aiGetExtensionList(&aexts);
|
||||||
|
|
||||||
|
char *buffer = (char *)alloca(aexts.length + 2);
|
||||||
|
char *p = buffer;
|
||||||
|
|
||||||
// The format is like: *.mdc;*.mdl;*.mesh.xml;*.mot
|
// The format is like: *.mdc;*.mdl;*.mesh.xml;*.mot
|
||||||
std::string ext;
|
|
||||||
char *sub = strtok(aexts.data, ";");
|
char *sub = strtok(aexts.data, ";");
|
||||||
while (sub != nullptr) {
|
while (sub != nullptr) {
|
||||||
ext += sub + 2;
|
bool enabled = true;
|
||||||
sub = strtok(nullptr, ";");
|
if (has_disabled_exts) {
|
||||||
|
for (size_t i = 0; i < assimp_disable_extensions.get_num_words(); ++i) {
|
||||||
if (sub != nullptr) {
|
std::string disabled_ext = assimp_disable_extensions.get_word(i);
|
||||||
ext += ' ';
|
if (strcmp(sub + 2, disabled_ext.c_str()) == 0) {
|
||||||
|
enabled = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (enabled) {
|
||||||
|
*(p++) = ' ';
|
||||||
|
size_t len = strlen(sub + 2);
|
||||||
|
memcpy(p, sub + 2, len);
|
||||||
|
p += len;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub = strtok(nullptr, ";");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ext;
|
// Strip first space
|
||||||
|
++buffer;
|
||||||
|
return std::string(buffer, p - buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user