@staticmethod
def get(anim_data, data_path, num_indices, sequences, scale=1):
curves = {}
logging.debug('data_path = %s' % data_path)
if anim_data and anim_data.action:
logging.debug('anim_data.action.fcurves = %s' % anim_data.action.fcurves)
for index in range(num_indices):
logging.debug('anim_data.action.fcurves[%d].data_path = %s' % (index, anim_data.action.fcurves[index].data_path))
curve = anim_data.action.fcurves.find(data_path, index=index)
if curve is not None:
logging.debug('curve = %s' % curve)
curves[(data_path.split('.')[-1], index)] = curve # For now, i'm just interested in the type, not the whole data path. Hence, the split returns the name after the last dot.
logging.debug('curves = %s' % curves)
if len(curves):
return War3AnimationCurve(curves, data_path, sequences, scale)
return None
DEBUG:root:data_path = nodes["Colours"].inputs["Location"].default_value
DEBUG:root:anim_data.action.fcurves = <bpy_collection[3], ActionFCurves>
DEBUG:root:anim_data.action.fcurves[0].data_path = nodes["Colours"].inputs[1].default_value
DEBUG:root:anim_data.action.fcurves[1].data_path = nodes["Colours"].inputs[1].default_value
DEBUG:root:anim_data.action.fcurves[2].data_path = nodes["Colours"].inputs[1].default_value
DEBUG:root:curves = {}
this is the "front" in blender, u might want to rotate it by -90 degreeOk, thanks. Until now i have 2 issues with this exporter.
The exported model its not facing front direction, but facing left angle, in blender my model it is facing front, perhaps viewport issues?
Cant export animations right, they appear diferently when i preview them with magos, even with custom fps, my animations are fast and dont have long keyframes, thats maybe the problem?
I suppose technically nothing, but it is kind of a pain when reading it in textpad when none of the bones are in any consistent order.What technical significance does bone order have in the file?
I suppose technically nothing, but it is kind of a pain when reading it in textpad when none of the bones are in any consistent order.
Since no tool is perfect sometimes copy/pasting bone information manually has to happen and a lot of the time with this exporter it boils down to Ctrl-F the bone names.
@Fingolfin
Hi! Imported FBX model to Blender, added "Markers" in animation timeline. Then exported model to a MDL via your plugin, then i've got this result:
On the left side you can see the model i've got after exporting from Blender, it have problems with storing vertices connected properly to bones.
On the right side you can see reference model that does not have that problem (but have a lot of other problems haha, but that is not a case now).
So, i am thinking that there is somewhere problem in code.
Also you can look at those screenshots and video below:
And, i've sent you a .blend file in PM.
![]()
I see they're both the war3 models, so it must be problem in your code, or blenderUnfortunately, Warcraft has some limitations on bones which can reduce the quality of animations. Most significantly, it doesn't support bone weights at all - you can only have a set of max 3 bones per vertex, which will all have an equal influence. Since all bones will get the same influence regardless of weight, the exporter will filter out those weighted less than 0.25. You might need to tweak the weights to get good looking animations.
thanks a lot <3I get this request a lot, i haven't worked on this plugin for a while, but if i ever get back to it i will give it a try.
Hi, Can you take a look at this problem
View attachment 399027
I have the same problemI've been using this plugin to make some models.
I've noticed that when I add a few vertices in Blender, the MDL file produced has way more vertices in it.
I have attached two models. "SpiritLantern_MyriadFungiForHive.mdx" is the model before I added more vertices, and "SpiritLantern_MyriadFungiForHive_more_vertices.mdx" is after I added some more vertices. I added 18 vertices to the model in Blender, and the MDL has over 100 more vertices than before. Am I doing something wrong?
I am using Blender 2.8.3. I am using a version of the plugin from 2020. I downloaded it in August 3, 2020, so it's probably revision 939afdfeb70a0d926d8172607030b22781cd1d3d in the git repository.
I have attache the Blender file.
Please help me when you have time.
I've been using this plugin to make some models.
I've noticed that when I add a few vertices in Blender, the MDL file produced has way more vertices in it.
I have attached two models. "SpiritLantern_MyriadFungiForHive.mdx" is the model before I added more vertices, and "SpiritLantern_MyriadFungiForHive_more_vertices.mdx" is after I added some more vertices. I added 18 vertices to the model in Blender, and the MDL has over 100 more vertices than before. Am I doing something wrong?
I am using Blender 2.8.3. I am using a version of the plugin from 2020. I downloaded it in August 3, 2020, so it's probably revision 939afdfeb70a0d926d8172607030b22781cd1d3d in the git repository.
I have attached the Blender file.
Please help me when you have time.
this doesnt seem to work, still my model has a lot of vertices, and CTRL+M is not actually to merge, is to mirror, Alt+M is to merge, and "merge by distance" is called "remove doubles" in old blenderThis is not really a problem as much as an expected result. In Warcraft 3 models, each vertex has a normal, a UV coordinate, and a position, and if any of those values diverge (let's say two vertices have the same position but there's a UV seam, or a sharp edge), then the vertex must be split. But Blender has a much more efficient way of dealing with vertices, where UVs and normals are stored in "loops", which are defined by the boundary of the polygon. So it's a technicall difference between Wc3 and Blender that causes this.
One thing you can do is to merge vertices (select all vertices, then CTRL+M > by distance), and then use auto smooth in the vertex data settings to get the right edges. If your model is set to use "shade flat", then all vertices will be split - this would cause a lot of extra vertices.
It works normally on 3.4.Hey, does the plugin work with the latest version of Blender on Steam? Version 3.6.
Ty, all roads lead to Retera. Do you have discord inv?Some code adjustments are required for blender 4.x and tbh I have not really used this plugin for a while and cannot answer regarding how good any of these plugins are or how they work on various different blander versions (was a few years ago I did anything with blender).
In the Retera Model Studio discord I saw this from twilac's fork of the plugin:
Blender Importer/Exporter
GitHub - tw1lac/mdl-exporter at 3.4
- Should now work in Blender 4.0
- Fixed not being able to export cameras when choosing "Use SkinWeights"
- Added safety check to not calculate tangents when mesh got no UVs (not sure if it will catch all cases)
Might work...
Click here to join Retera's Model Studio Users Group.Ty, all roads lead to Retera. Do you have discord inv?