Comments (10)
Should be fixed by 1474295
from sourceio.
Please test and close issue if resolved
from sourceio.
I tested commit 1474295. Unfortunately, the issue has not been resolved yet.
MDL v4 Import Error Code w/ hsarge.mdl
Python: Traceback (most recent call last):
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\operators\source1_operators.py", line 53, in execute
model_container = import_model(mdl_path, f, content_manager, self, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\__init__.py", line 30, in import_model
container = handler(model_path, buffer, content_manager, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl4\__init__.py", line 14, in import_mdl4
return import_model(model_path.stem, buffer, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl4\import_mdl.py", line 90, in import_model
model_vertices = model.vertices * options.scale
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
numpy.core._exceptions._UFuncNoLoopError: ufunc 'multiply' did not contain a loop with signature matching types (dtype([('id', '<u4', (1,)), ('pos', '<f4', (3,))]), dtype('float64')) -> None
MDL v6 Import Error Code w/ hgrunt.mdl
Python: Traceback (most recent call last):
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\operators\source1_operators.py", line 53, in execute
model_container = import_model(mdl_path, f, content_manager, self, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\__init__.py", line 30, in import_model
container = handler(model_path, buffer, content_manager, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl4\__init__.py", line 14, in import_mdl4
return import_model(model_path.stem, buffer, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl4\import_mdl.py", line 90, in import_model
model_vertices = model.vertices * options.scale
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
numpy.core._exceptions._UFuncNoLoopError: ufunc 'multiply' did not contain a loop with signature matching types (dtype([('id', '<u4', (1,)), ('pos', '<f4', (3,))]), dtype('float64')) -> None
from sourceio.
c1f9af3 Should fix that, please try again
from sourceio.
Tried c1f9af3, still does not work.
Error code for MDL V6, hgrunt.mdl
Python: Traceback (most recent call last):
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\operators\source1_operators.py", line 53, in execute
model_container = import_model(mdl_path, f, content_manager, self, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\__init__.py", line 30, in import_model
container = handler(model_path, buffer, content_manager, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl6\__init__.py", line 17, in import_mdl6
return import_model(buffer, texture_mdl, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl6\import_mdl.py", line 66, in import_model
mdl = Mdl.from_buffer(mdl_file)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\library\models\mdl\v6\mdl_file.py", line 30, in from_buffer
sequences = buffer.read_structure_array(header.sequence_offset, header.sequence_count, StudioSequence)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\library\utils\file_utils.py", line 208, in read_structure_array
obj = data_class.from_buffer(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\library\models\mdl\v6\structs\sequence.py", line 37, in from_buffer
) = buffer.read_fmt('<fI9I')
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\library\utils\file_utils.py", line 70, in read_fmt
return unpack(self._endian + fmt, self.read(calcsize(self._endian + fmt)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: bad char in struct format
Error code for MDL v4, hsarge.mdl
Python: Traceback (most recent call last):
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\operators\source1_operators.py", line 53, in execute
model_container = import_model(mdl_path, f, content_manager, self, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\__init__.py", line 30, in import_model
container = handler(model_path, buffer, content_manager, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl4\__init__.py", line 14, in import_mdl4
return import_model(model_path.stem, buffer, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl4\import_mdl.py", line 119, in import_model
remap[model_material_index] = load_material(model_name, model_material_index, model_texture_info,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl4\import_mdl.py", line 153, in load_material
bpy_material.create_nodes(material)
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\material_loader\shaders\goldsrc_shaders\goldsrc_shader.py", line 29, in create_nodes
if self._valve_material.flags & MdlTextureFlag.CHROME:
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'StudioTexture' object has no attribute 'flags'
from sourceio.
Try now
from sourceio.
Same error messages as before. Interestingly, I took a look at some older versions of the addon and found that they also can't import these older MDL files into the newest version of Blender anymore — it only imports their skeletons.
MDL V6
Python: Traceback (most recent call last):
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\operators\source1_operators.py", line 53, in execute
model_container = import_model(mdl_path, f, content_manager, self, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\__init__.py", line 30, in import_model
container = handler(model_path, buffer, content_manager, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl6\__init__.py", line 17, in import_mdl6
return import_model(buffer, texture_mdl, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl6\import_mdl.py", line 66, in import_model
mdl = Mdl.from_buffer(mdl_file)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\library\models\mdl\v6\mdl_file.py", line 30, in from_buffer
sequences = buffer.read_structure_array(header.sequence_offset, header.sequence_count, StudioSequence)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\library\utils\file_utils.py", line 208, in read_structure_array
obj = data_class.from_buffer(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\library\models\mdl\v6\structs\sequence.py", line 37, in from_buffer
) = buffer.read_fmt('<fI9I')
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\library\utils\file_utils.py", line 70, in read_fmt
return unpack(self._endian + fmt, self.read(calcsize(self._endian + fmt)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: bad char in struct format
MDL V4
Python: Traceback (most recent call last):
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\operators\source1_operators.py", line 53, in execute
model_container = import_model(mdl_path, f, content_manager, self, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\__init__.py", line 30, in import_model
container = handler(model_path, buffer, content_manager, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl4\__init__.py", line 14, in import_mdl4
return import_model(model_path.stem, buffer, options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl4\import_mdl.py", line 119, in import_model
remap[model_material_index] = load_material(model_name, model_material_index, model_texture_info,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\models\mdl4\import_mdl.py", line 153, in load_material
bpy_material.create_nodes(material)
File "C:\Users\teajai\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\SourceIO-master\blender_bindings\material_loader\shaders\goldsrc_shaders\goldsrc_shader.py", line 29, in create_nodes
if self._valve_material.flags & MdlTextureFlag.CHROME:
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'StudioTexture' object has no attribute 'flags'
from sourceio.
Can you just drop me mdl v4 and v6 so I can test locally?
from sourceio.
Sure thing, here you go.
0.52 Alpha Models.zip
In addition, here's a link to a copy of the 0.52 Prototype these files originate from, if that might be of help to you.
from sourceio.
4cdd1d6 should fix your issues
from sourceio.
Related Issues (20)
- Readme shows outdated Blender version support HOT 1
- help HOT 1
- World scale is behaving strangely HOT 2
- IndexError: list index out of range HOT 2
- "IndexError: list index out of range" error when importing custom maps HOT 8
- Last version (5.4) does not import meshes with skeletons? HOT 6
- Mesh Auto smooth error HOT 2
- detect corrupt map HOT 7
- Source 1 displacement UVs are ~2 times bigger after import HOT 1
- Trying to import cs_office.vpk but the textures say "error creating file" when trying to unpack them HOT 6
- Importing models into Blender 4.2 are metallic for some reason HOT 3
- Importing Portal 2 mdls are metallic and messed up textures HOT 11
- cannot import name 'load_vtf_texturem' from 'SourceIO.library.utils.rustlib.linux_x64.rustlib' HOT 2
- Not working in blender 4.2 (release candidate) HOT 1
- Blender 4.2 crashing when trying to dissolve/delete vertices, faces, edges HOT 2
- Static_props/dynamic_props problems with bones. HOT 4
- Static/dynamic props dont have textures if i export a model to other programs with embedded textures. HOT 5
- Python error while importing mdl file HOT 1
- Issues with props while importing maps from cs2 HOT 1
- What is the proper way to edit Master Instances? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sourceio.