blender_niftools_addon
blender_niftools_addon copied to clipboard
Multiple Collision Export Problems
@niftools/blender-nif-plugin-reviewer -
Before creating a new issue, ensure that
- [x] Read the user documentation.
- [x] Check that the issue hasn't already been reported.
- [x] Read through the list of
Helpful resources
links on the right-hand side. - [ ] Talk with the developers to ensure its a valid issue
The issue will get closed off immediately as invalid if
- [ ] Looking for support where the forums, chat or documentation is more appropriate.
- [ ] Goes off topic, loses focus or turns into a discussion.
- [ ] Removing parts of the template the issue.
Fill out the template below to the best of your ability, including .blend files, nifs, logs; help us to help you.
Issue Overview
It prevents all terrain export for Fallout 3 and New Vegas
Version Information
Blender Nif Plugin Version Info
2.6.0 officially, commit from roughly 14 days ago
Blender Version Info
2.83
Platform information
Windows 10 Home 1903
Context
Prevents export of terrain collision
Steps to Reproduce
Just Set A Collision Mesh to "Mesh" and export it and it will stop and say "type error element wise multiplication not supported between vector and matrix" #.
Expected Result
To export at least a broken file
Actual Result
Stop at error, no export
Possible Fix
Line 524 ,531 , and 534 in havok.py have an * were a @ should be, does not fix only pushes the problem back to "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\dependencies\pyffi\formats\nif_init_.py"
Screenshot
[If relevant, include a screenshot]
Logs and Files
[Provide logs file generated during the error as well as the blend and nif files are related to the issue]
Info Bar Output
[Output from the Info View, available at top of Blender viewport, drag to expand]
Console Output
[Set the logging level to 'Debug' and attach the output of the console. Enable via Window -> Toggle Console]
Traceback (most recent call last):
File "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\operators\nif_export_op.py", line 159, in execute
return nif_export.NifExport(self, context).execute()
File "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\nif_export.py", line 172, in execute
root_block = self.objecthelper.export_root_node(self.root_objects, filebase)
File "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\modules\nif_export\object\__init__.py", line 112, in export_root_node
n_root = self.export_node(b_obj, None)
File "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\modules\nif_export\object\__init__.py", line 218, in export_node
self.export_children(b_obj, node)
File "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\modules\nif_export\object\__init__.py", line 233, in export_children
self.export_node(b_child, n_parent)
File "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\modules\nif_export\object\__init__.py", line 173, in export_node
if self.export_collision(b_obj, n_parent):
File "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\modules\nif_export\object\__init__.py", line 254, in export_collision
self.bhk_helper.export_collision_helper(b_obj, node)
File "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\modules\nif_export\collision\havok.py", line 126, in export_collision_helper
self.export_collision_packed(b_obj, n_col_body, layer, n_havok_mat)
File "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\modules\nif_export\collision\havok.py", line 539, in export_collision_packed
n_col_shape.add_shape(triangles, normals, vertices, layer, havok_mat.material)
File "C:\Users\Jim\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\io_scene_nif\dependencies\pyffi\formats\nif\__init__.py", line 2997, in add_shape
self.sub_shapes[num_shapes].material.material = material
AttributeError: 'int' object has no attribute 'material'
location: <unknown location>:-1
Blend File
Here is a simple blend file with only a box with mesh collision, try to export to reproduce problem. New Compressed (zipped) Folder.zip
Nif File
This Can be recreated with any nif file with a mopp, but here is a nif file I made with blender 2.78c and a nif plugin from Jan 9, 2019, as the current plugin does not export but this does. New Compressed (zipped) Folder.zip Just Import then export to see what I mean.
Similar Known Issues
[Reference any known issues - https://github.com/niftools/blender_nif_plugin/issues]
Additional Information
[Anything else you feel is relevant]
Ok, So this is my first time using github, but this issue has been racking my mind as I found a partial solution. I was recently using the newest commit from github and tried to export a nif file with mopp collision, and it gave me an error. so I tried to look in the code to fix it, and I got a little ways by replacing * with @ at lines 524, 531, and 534 in the (io_scene_nif/modules/nif_export/collision/havok.py). But now I am getting the errors:
Weird thing is that it imports just fine, but I am not sure if I should have said this here.
Can you fill out the sections of the template as it enable us to reproduce the issue, thanks.
Again, I apologize, I am using blender 2.83 with the nif plug-in from roughly 14 days ago on Windows 10 Home 1903, and this particularly only happens when the collision is set to "mesh". Changing the lines I listed shifts the problem forward but it still does not export. Other collision types still export just fine(Well there are a few inconsistencies, but they still export). Again, I am new to this, please ask me more if you need more. All I am doing is importing nv_westjuniper03.nf From new vegas, the exporting it to test out how to export terrain.
Yeah, can you update the issue with all of the above, including providing attaching the nif in question.
This requires some updates to PyFFI in order to resolve the underlying problem.
Looks to be the same issue as https://github.com/niftools/blender_niftools_addon/issues/453.
This is fixed in newer code.