I fixed some gernal issues with exporting multiple particle sytems. The smoke particles of the medivac model should spawn now for both sides. One thing to note is that the model contains some features which aren't supported yet. Like forces, ribbons and lights.
I also did some big internal changes on how the addon stores the values of unanimated properties.This big internal change makes it possible to export only the attributes that derivate from the unanimated default value. I hoped that this would fix the global loop problem, but it didn't. It is however a good step in the right direction and makes exported files a little bit smaller again.
Is it at a place where you would expect a sharp edge? Currently the importer does not connect vertices that have different normals in order to preserve the sharp edges.
Well the edge wasn't really sharp and when I merged it, it looks fine.
It may be cause of the animations or that the model is constructed this way but i don't really know.
If you want, you can check the model for yourself. and determine if the edge is a sharp one or some other thing
Hey, I opened SM_MikeLiberty.m3 added a bone, called it CameraPortrait then set the camera and exported. When I import it to the editor it stops responding and I have to finalize the process. Am I doing something wrong?
EDIT: nevermind I forgot to set the parent for the bone... noob mistakes.
classNIF_NODE_TO_ADD(bpy.types.Operator):bl_idname='nif.node_add'bl_label="Add Node property"bl_description="Adds a node to the nif file"defaultnode=bpy.props.EnumProperty(items=NodeTypeList,options=set(),default="BSFADENODE")name=bpy.props.StringProperty(name="Name",default="",options=set())definvoke(self,context,event):scene=context.scenecontext.window_manager.invoke_props_dialog(self,width=300,)return{'RUNNING_MODAL'}defdraw(self,context):scene=context.scenelayout=self.layoutlayout.prop(self,"name")layout.prop(self,"defaultnode")layout.separator()defexecute(self,context):scene=context.scenenode=scene.nif_node_list.add()found=Falseifself.defaultnode=="BSFADENODE":print(self.defaultnode)foriinrange(0,len(scene.nif_string)):print(scene.nif_string[i].name)ifscene.nif_string[i].name==self.name:found=Truebreakelse:found=Falseiffound==Falseandlen(self.name)>0:scene.nif_string.add()scene.nif_string_index=len(scene.nif_string)-1scene.nif_string[scene.nif_string_index].name=self.namenode.name=self.namescene.nif_node_index=len(scene.nif_node_list)-1return{'FINISHED'}
But all i get is an empty dialog
what can I be doing wrong, I have checked all over the net but I find nothing to help
My guess is the draw method cause removing it makes no difference
I have also checked in your plugin how you did it but no success
The NodeList looks like this:
NodeTypeList=[("BSFADENODE","BSFadeNode","Usually the root node"),("NINODE","NiNode","Can be used as root node or have a parent"),("BSXFLAG","BSXFlag","This node must have a Name of BSX else model will fail")]
Tested with the "name" attribute as a normal string prop and not a string_search prop but no change
Also tested the most things you would test to verify the cause to this error
I can upload the files if you like to check them.
And I also like your plugin Great Work!
EDIT: Found that I made a Class with the same name as the list, but changed that and still don't get a working dialog
Disabled the defaultNode and now I get the string property
TypeError: EnumProperty(...): expected a tuple containing (identifier, name, description) and optionally a unique number
ValueError: bpy_struct "NIF_OT_node_add" registration error: defaultNode could not register
@println: Go Ohhh thanks, I created the bone first, renamed it, then created the camera.
EDIT: Some materials are not visible when exported. As one example the Shrapnel Meat material from CastanarUltraliskSevered models are giving me problems.
@println: Go Thanks for fixing the Mothership, I just uploaded a Mothership Core to mapster. But the CastanarUltraliskSevered_02 still lacks the blood when I import it back to the editor.
How can I use parts from different models? Importing one when there's already one opened causes a few issues. And how's the ribbon system going?
I just added a very important feature: Shapes for hit tests. There are now two new panels "M3 Tight Hit Test" and "M3 Fuzzy Hit Tests".
The shape of the "tight" hit test gets used when SC2 checks if an unit is within the cursor selection box or not.
When a "fuzzy" hit test shape is specified then SC2 will use it for checking, if a mouse click hit the unit or not. Not specifing "fuzzy" hit test shapes can be bad for the perforamnce. Thus it's a good idea to specifiy at least one "fuzzy" hit test shape that has about the same size like the unit.
Edit:
About importing only parts of a model: Not possible via UI yet, but planned.
If you are interested about the ribbon progress, just have a look at the changelog or the structure.xml file.
I will be away for a week, so don't wonder if I don't reply.
@println: Go I know you may not read it within this week, but the new version with fuzzy and tight can't import m3 models made with previous versions. I get an error and the model looses it's meshes and materials, leaving only the bones. I hope you can fix it, otherwise I wont be able to fix my models.
@Leruster: Go Thanks, there are 5 models I've tried to open so far, here they are. I really don't want to start all over again.The others are doodads so fuzy and tight hit tests are not important.
@SoulFilcher: Go
I fixed some gernal issues with exporting multiple particle sytems. The smoke particles of the medivac model should spawn now for both sides. One thing to note is that the model contains some features which aren't supported yet. Like forces, ribbons and lights.
I also did some big internal changes on how the addon stores the values of unanimated properties.This big internal change makes it possible to export only the attributes that derivate from the unanimated default value. I hoped that this would fix the global loop problem, but it didn't. It is however a good step in the right direction and makes exported files a little bit smaller again.
I have big issues with the plugin: (flo-m3addon-51b88a2)
It will not import the model and I get an Attribute-Error: 'Mesh' object has no attribute 'tessfaces' what can cause this?
I need help
i have tested the marine.m3 (never checked before) and tank.m3 (never checked before) and colossi.m3 (worked before) and zergling.m3 (also worked)
another question what is the "lens" of m3 camera the inner or the outer connection pin?? so it will have the right facing
EDIT:
Tried to do the coin and export and this also failed giving me an error with attribute
uvCoordinatesPerVertex = max(uvCoordinatesPervertex, len(mesh.tessface_uv_textures))
AttributeError: 'Mesh' object has no attribute 'tessface_uv_textures'
@chaos2night: Go
Your error messages sounds like you are using Blender 2.62 instead of 2.63.
@println: Go
That was an easy fix thx.
I started to edit the marine.m3 and some of the vertexes was not connected to all of it's surroundings see image
is it supposed to bee like this or is this some sort of bug with the importer
@chaos2night: Go
Is it at a place where you would expect a sharp edge? Currently the importer does not connect vertices that have different normals in order to preserve the sharp edges.
@println: Go
Well the edge wasn't really sharp and when I merged it, it looks fine.
It may be cause of the animations or that the model is constructed this way but i don't really know. If you want, you can check the model for yourself. and determine if the edge is a sharp one or some other thing
Hey, I opened SM_MikeLiberty.m3 added a bone, called it CameraPortrait then set the camera and exported. When I import it to the editor it stops responding and I have to finalize the process. Am I doing something wrong?
EDIT: nevermind I forgot to set the parent for the bone... noob mistakes.
Hey again
I have a question about the plugin and how you manage to use
context.window_manager.invoke_props_dialog(self, width=250)
This is how my code looks like:
But all i get is an empty dialog
what can I be doing wrong, I have checked all over the net but I find nothing to help
My guess is the draw method cause removing it makes no difference
I have also checked in your plugin how you did it but no success
The NodeList looks like this:
Tested with the "name" attribute as a normal string prop and not a string_search prop but no change
Also tested the most things you would test to verify the cause to this error
I can upload the files if you like to check them.
And I also like your plugin Great Work!
EDIT: Found that I made a Class with the same name as the list, but changed that and still don't get a working dialog
Disabled the defaultNode and now I get the string property
TypeError: EnumProperty(...): expected a tuple containing (identifier, name, description) and optionally a unique number ValueError: bpy_struct "NIF_OT_node_add" registration error: defaultNode could not register
PROBLEM SOLVED
@SoulFilcher: Go
When you add the camera via "+" button of the "M3 Cameras" button Blender should automatically create and select the corresponding bone.
How did you create the camera?
@println: Go Ohhh thanks, I created the bone first, renamed it, then created the camera.
EDIT: Some materials are not visible when exported. As one example the Shrapnel Meat material from CastanarUltraliskSevered models are giving me problems.
A bug report when I tried to help SoulFilcher:
I assumed that it was the ultralisk.m3 model that had the material problem.
So I decided to open it and check but I got this error:
raise Exception("SEQSV1.unknown5 has value %s instead of the expected value
int(0)" % self.unknown5)
Exception: SEQSV1.unknown5 has value 7 instead of the expected value int(0)
location:<unknown location>:-1
location:<unknown location>:-1
Is it a custom model you made SoulFilcher or does it exist in SC2 ??
@chaos2night: Go It's a doodad model I exported from SC2. There are variations but I think I tried with CastanarUltraliskSevered_02.m3
Also as you see I cant import Ultralisk.m3 to blender or Mothership.m3.
@SoulFilcher: Go
The import of the ultralisk and mothership should work now.
EDIT: The CastanarUltraliskSevered_02 model looks to me identical to the original after reexporting with my graphic settings.
@println: Go Thanks for fixing the Mothership, I just uploaded a Mothership Core to mapster. But the CastanarUltraliskSevered_02 still lacks the blood when I import it back to the editor.
How can I use parts from different models? Importing one when there's already one opened causes a few issues. And how's the ribbon system going?
I just added a very important feature: Shapes for hit tests. There are now two new panels "M3 Tight Hit Test" and "M3 Fuzzy Hit Tests". The shape of the "tight" hit test gets used when SC2 checks if an unit is within the cursor selection box or not. When a "fuzzy" hit test shape is specified then SC2 will use it for checking, if a mouse click hit the unit or not. Not specifing "fuzzy" hit test shapes can be bad for the perforamnce. Thus it's a good idea to specifiy at least one "fuzzy" hit test shape that has about the same size like the unit.
Edit:
About importing only parts of a model: Not possible via UI yet, but planned.
If you are interested about the ribbon progress, just have a look at the changelog or the structure.xml file.
I will be away for a week, so don't wonder if I don't reply.
@println: Go I know you may not read it within this week, but the new version with fuzzy and tight can't import m3 models made with previous versions. I get an error and the model looses it's meshes and materials, leaving only the bones. I hope you can fix it, otherwise I wont be able to fix my models.
@SoulFilcher: Go
Try to decompose the models into xml's and back to m3 and then import them to Blender. It might be due to added structures which can't be found.
EDIT: on second thought... that might not work too. Could you attach one m3 file? Maybe I can help with it.
@Leruster: Go Thanks, there are 5 models I've tried to open so far, here they are. I really don't want to start all over again.The others are doodads so fuzy and tight hit tests are not important.
Ok so println has to look at this :/ I thought it has something to do with the matrices he added but it's more than that apparently.
Sorry.