If you are in college, you can earn a 3-years 3dsmax student license without much trouble.
EDIT: on topic, back in the THW i used to support the good old dexporter (I'm known as BlinkBoy there), I would really like to work on something similar for m3 format but my knowledge on blender is near nothing. If someone needs help writting the plugin, I could help.
BlinkHawk, I'd love to write a plugin for blender; I know how to use blender OK but my python and practical programming knowledge is pretty slim to none. If you PM me your IM (MSN, gtalk, or aim) then I'll contact you and see if something is possible.
Those descriptions appear in tooltips when you hover an property widget. You can find out which property a UI element represents by right clicking on it
and selecting "Edit Source". If you have an text editor open in blender it will show you the line in the source code which shows the UI element.
For example if you choose to view the source for "Init. Emiss. Speed" you will get the following line highlighted:
The second argument of layout.prop is the property name. So the property is called initEmissSpeed. If you search for that word in the file from
the beginning the first result is the following line:
initEmissSpeed=bpy.props.FloatProperty(name="init. emiss. speed",options={"ANIMATABLE"},default=0.0,description="The initial speed of the particles at emission.")
You can edit/add the property description and save the text document(ctrl+s will save the blend file but not the text file). Afterwards press F8 to reload the UI. This way you don't need to restart blender. After reloading the UI it should show you the new tooltip when you hover the edited property.
I don't seem to be able to enable the addon in blender's user preferences. I click the checkbox but it won't enable.
Using the latest official release of Blender 2.62
Can you try starting Blender with a command line window (which will propably show an error message when you enable it)?
e.g. Use the windows start button to call the program "cmd" and enter then the full path of the blender binary
Maybe it's visible by default in Windows, not sure.
Can you post the reported error here?
Edit: I just tried what happen what the m3.py file does not exist and I experienced the same problem. The m3.py file didn't get properly generated at the first initialization but only at reload. I fixed it and committed the changes. Thanks for your bug report!
"Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\modules\addon_utils.py", line 259, in enable
mod = import(module_name)
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\blendM3export\init.py", line 42, in (module)
from . import m3import
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\blendM3export\m3import.py", line 33, in (module)
from . import m3
ImportError: cannot import name m3
"
In case you still need it.
I'm new to git, using the GUI I rescanned but it didn't seem to pick up any changes or anything; how do I update the plugin?
With "Rescan" you let the UI search for new changes on your local disk since you started the program/refreshed last. So this option is not what you want.
In git you can download changes other people made without applying them.
In git terms you "fetch" the changes. I think it's possible trough the menu "Remote/Fetch from"Afterwards you can see the branch with my changes in the history. Just click the top of it and select "reset master branch to here". The top entry is currently "Removed a todo line that is done.". It will trow then all your changes away and give you the chosen state.
Alternatively you can "pull" changes too. Which means that you download and apply changes in one step.
To not lose any of your work by resetting I recommend you to google for more information about how git (gui) works once you get it running.
C:\Program Files\Blender Foundation\Blender>blender.exe
found bundled python: C:\Program Files\Blender Foundation\Blender\2.62\python
Load D:\StarCraft II Assets\Models\Exclamations and question marks\question.m3
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s
cripts\init.py", line 860, in execute
m3import.importFile(self.properties.filepath)
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s
cripts\m3import.py", line 990, in importFile
importer.importFile(filename)
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s
cripts\m3import.py", line 403, in importFile
self.model = m3.loadModel(filename)
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s
cripts\m3.py", line 10600, in loadModel
sections = loadSections(filename)
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s
cripts\m3.py", line 10577, in loadSections
section.determineContentField()
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s
cripts\m3.py", line 45, in determineContentField
self.content = self.contentClass.createInstances(rawBytes=self.rawBytes, cou
nt=indexEntry.repetitions)
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s
cripts\m3.py", line 5969, in createInstances
list.append(SEQSV1(rawBytes=rawBytes[startOffset:stopOffset]));
File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s
cripts\m3.py", line 5921, in init
raise Exception("SEQSV1.unknown1 has value %s instead of the expected value
int(-1)" % self.unknown1)
Exception: SEQSV1.unknown1 has value 1 instead of the expected value int(-1)
The scripts contain a lot of validation code. The interesting line of your log is the exception message:
SEQSV1.unknown1 has value 1 instead of the expected value int(-1)
So you found a model where the unknown1 field of a SEQS version 1 structure has not the value -1 but 1.
It fails because in the structures.xml file is specified that this particual field is expected to be -1:
The question of course is: what is so special about that animation sequence (SEQS speciefies one animation sequence) that
it has unknown set to 1 instead of -1.
Btw. the script has been written for python 3, it could be that causes trouble too.
The model was exported from max using Nintoxicated's script; it's possible that was the cause of the error. I'll have a play around with it in a couple of days when I have more time.
This error occour 2 more times with the values
offset 473776 tag=SRIB ver=0 rep=1 sectleng=272 unused=0 perentry=272.0
offset 474048 tag=IKJT ver=0 rep=4 sectleng=128 unused=0 perentry=32.0
script init.py line 860 in execute
m3import.importFile(self.properties.filepath)
script m3import.py line 1003 in importFile
importer.importFile(filename)
script m3import.py line 347 in importFile
self.model = m3.loadModel(filename)
script m3.py line 10598 in loadModel
sections = loadSections(filename)
script m3.py line 10588 in loadSections
raise Exception("There were %s unknown sections" % unknownSections)
Exception: There were 3 unknown sections
To load the collosi you have to specify in the structures.xml file the unknown sections.
guessedBytesPerEntry tells you how big the structure propably is.To fix the error about the unknown section RIB_ you could add the following structure:
You can insert the structure anywhere in the list of structures. I tried to order them in a way that structures are defined first before they are referenced by another structure.
When there are no more unknown structures the addon will complain:
Exception: Field MODLV23.ribData can be marked as a reference pointing to RIB_V6
To fix that you have to go to the definition of the structure MODL in version 23 and add a refTo attribute to the field "ribData":
By the way: The addon can export now static meshes. The mesh export functionallity is very basic right now: To export a mesh there must be exactly 1 mesh made out of triangles. That mesh also must have exactly 1 UV layer. Additionally there must be at least one animation and material.
what it told me to add and i did and the model was loaded....
just a bit screwed up look at pic
do i have to add a refTo to the Srib aswell??
if i have to what values do i add, cause it never complained and nothing interesting is showed up in the console
Btw i like the script and it was easy to modyfy the xml file so it would load the model
Are you sure you used the most current version of the script? I fixed a edit bone import bug recently and for me it loads fine!
I suggest that you create a github account. For logged in users the m3addon repository at github will show two buttons: "Watch" and "Fork".
With "Watch" you can get yourself informed about changes to the repository. If you are interested in helping me making the script you can click "Fork" to create a copy of my m3addon at github. You can then publish your changes (e.g. your structure.xml modifications) to that copy and send me a so called "Pull Request".
Trough that pull request I will know that you have changes for me and then I can integrate your changes into my version.
It worked better with the latast download but i get two miss shaped "foot/leg" on the colossi, any ideas
I assume i only have to edit something in the structure.xml or is that a part in the py scripting
it is the left front "foot" and it is twisted 90 deg towards the center
and the right front that is just a little twisted towards the center lik 10-20 deg
Thanks for your bug report. The roll value of the edit bones got calculated wrongly in some corner cases. I fixed the calculation and pushed the changes to my public repository.
Just tried out the export function and it worked...
Something in the script or the XML is wrong because i don't think it is supposed create a file that is 8x bigger than the normal file. The model i tested was colossi and the exported file is 4,3 MB big and original is 526 KB so... something is wrong :(
I tried to check the model data and it seams to add a lot of unnecessary data to the file cause of its size. And compared in blender the exported model is turned 90 deg right from the normal if you get my point. else it seams to wok. The animation menu get a lot of added unusable animations with the same name as the one that is working. This may be an issue.
used the latest plugin files.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
@Varine: Go
If you are in college, you can earn a 3-years 3dsmax student license without much trouble.
EDIT: on topic, back in the THW i used to support the good old dexporter (I'm known as BlinkBoy there), I would really like to work on something similar for m3 format but my knowledge on blender is near nothing. If someone needs help writting the plugin, I could help.
BlinkHawk, I'd love to write a plugin for blender; I know how to use blender OK but my python and practical programming knowledge is pretty slim to none. If you PM me your IM (MSN, gtalk, or aim) then I'll contact you and see if something is possible.
I wrote a python script which can convert a xml specification of the m3 file format into a python library for loading and saving m3 files.
I also started working on a blender addon. At the current state it can export:
Mesh and bone data doesn't get exported (Except for some bones which need to be created for the particles).
The importer of the addon is a bit more advanced. It can import:
I also wrote a script which uses the generated m3 library to convert a m3 file into a xml version.
You can find my scripts here: https://github.com/flo/m3addon
There is also a readme which explains how to use it: https://github.com/flo/m3addon/blob/master/README.md
Help is pretty much wanted, since I won't have that much free time in the future.
I'll do whatever I can to help, although I'm a programming noob and probably won't be of much help :(
EDIT These may be useful: http://code.google.com/p/blendm3/ http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/M3_Import
@JackRCDF: Go
That's nice :D. You could try out what different particle properties do exactly (depending on the type of particle system for example) and add descriptions to the properties like it's done in this commit:
https://github.com/flo/m3addon/commit/a28a623d6dcceb3d23ebedb720774ff434a8f409
Those descriptions appear in tooltips when you hover an property widget. You can find out which property a UI element represents by right clicking on it
and selecting "Edit Source". If you have an text editor open in blender it will show you the line in the source code which shows the UI element.
For example if you choose to view the source for "Init. Emiss. Speed" you will get the following line highlighted:
The second argument of layout.prop is the property name. So the property is called initEmissSpeed. If you search for that word in the file from
the beginning the first result is the following line:
You can edit/add the property description and save the text document(ctrl+s will save the blend file but not the text file). Afterwards press F8 to reload the UI. This way you don't need to restart blender. After reloading the UI it should show you the new tooltip when you hover the edited property.
I don't seem to be able to enable the addon in blender's user preferences. I click the checkbox but it won't enable. Using the latest official release of Blender 2.62
@JackRCDF: Go
Can you try starting Blender with a command line window (which will propably show an error message when you enable it)?
e.g. Use the windows start button to call the program "cmd" and enter then the full path of the blender binary
Maybe it's visible by default in Windows, not sure.
Can you post the reported error here?
Edit: I just tried what happen what the m3.py file does not exist and I experienced the same problem. The m3.py file didn't get properly generated at the first initialization but only at reload. I fixed it and committed the changes. Thanks for your bug report!
"Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\modules\addon_utils.py", line 259, in enable mod = import(module_name) File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\blendM3export\init.py", line 42, in (module) from . import m3import File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\blendM3export\m3import.py", line 33, in (module) from . import m3 ImportError: cannot import name m3 " In case you still need it.
I'm new to git, using the GUI I rescanned but it didn't seem to pick up any changes or anything; how do I update the plugin?
@JackRCDF: Go
With "Rescan" you let the UI search for new changes on your local disk since you started the program/refreshed last. So this option is not what you want.
In git you can download changes other people made without applying them. In git terms you "fetch" the changes. I think it's possible trough the menu "Remote/Fetch from"Afterwards you can see the branch with my changes in the history. Just click the top of it and select "reset master branch to here". The top entry is currently "Removed a todo line that is done.". It will trow then all your changes away and give you the chosen state.
Alternatively you can "pull" changes too. Which means that you download and apply changes in one step.
To not lose any of your work by resetting I recommend you to google for more information about how git (gui) works once you get it running.
C:\Program Files\Blender Foundation\Blender>blender.exe found bundled python: C:\Program Files\Blender Foundation\Blender\2.62\python
Load D:\StarCraft II Assets\Models\Exclamations and question marks\question.m3 Traceback (most recent call last): File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s cripts\init.py", line 860, in execute m3import.importFile(self.properties.filepath) File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s cripts\m3import.py", line 990, in importFile importer.importFile(filename) File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s cripts\m3import.py", line 403, in importFile self.model = m3.loadModel(filename) File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s cripts\m3.py", line 10600, in loadModel sections = loadSections(filename) File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s cripts\m3.py", line 10577, in loadSections section.determineContentField() File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s cripts\m3.py", line 45, in determineContentField self.content = self.contentClass.createInstances(rawBytes=self.rawBytes, cou nt=indexEntry.repetitions) File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s cripts\m3.py", line 5969, in createInstances list.append(SEQSV1(rawBytes=rawBytes[startOffset:stopOffset])); File "C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\Blendm3s cripts\m3.py", line 5921, in init raise Exception("SEQSV1.unknown1 has value %s instead of the expected value int(-1)" % self.unknown1) Exception: SEQSV1.unknown1 has value 1 instead of the expected value int(-1)
location:<unknown location>:-1
location:<unknown location>:-1
That's the error I recieved on trying to import http://www.udmod.com/downloads.php?do=download&fileid=28 the question mark there. It's a pretty simple mesh so I was surprised it didn't work.
@JackRCDF: Go
The scripts contain a lot of validation code. The interesting line of your log is the exception message:
SEQSV1.unknown1 has value 1 instead of the expected value int(-1)
So you found a model where the unknown1 field of a SEQS version 1 structure has not the value -1 but 1.
It fails because in the structures.xml file is specified that this particual field is expected to be -1:
if you change "expeccted-value" to "default-value" the model should load(or another error should be shown:
The question of course is: what is so special about that animation sequence (SEQS speciefies one animation sequence) that
it has unknown set to 1 instead of -1.
Btw. the script has been written for python 3, it could be that causes trouble too.
The model was exported from max using Nintoxicated's script; it's possible that was the cause of the error. I'll have a play around with it in a couple of days when I have more time.
Sorry I haven't posted anything, my life got wacky recently. I should be back in a couple weeks or sooner hopefully.
Downloadad the script and tried to import colossus.m3 but all i get is an error.
I was able to import the zergling anyway
ERROR Unknown section at offset 473024 wtih tag=RIB_ version=6 repetitions=1 sectionLengthInBytes=752 guessedUnusedSectionBytes=4 guessedBytesPerEntry=748.0
This error occour 2 more times with the values
offset 473776 tag=SRIB ver=0 rep=1 sectleng=272 unused=0 perentry=272.0
offset 474048 tag=IKJT ver=0 rep=4 sectleng=128 unused=0 perentry=32.0
script init.py line 860 in execute
m3import.importFile(self.properties.filepath)
script m3import.py line 1003 in importFile
importer.importFile(filename)
script m3import.py line 347 in importFile
self.model = m3.loadModel(filename)
script m3.py line 10598 in loadModel
sections = loadSections(filename)
script m3.py line 10588 in loadSections
raise Exception("There were %s unknown sections" % unknownSections)
Exception: There were 3 unknown sections
@chaos2night: Go
To load the collosi you have to specify in the structures.xml file the unknown sections.
guessedBytesPerEntry tells you how big the structure propably is.To fix the error about the unknown section RIB_ you could add the following structure:
You can insert the structure anywhere in the list of structures. I tried to order them in a way that structures are defined first before they are referenced by another structure.
When there are no more unknown structures the addon will complain:
Exception: Field MODLV23.ribData can be marked as a reference pointing to RIB_V6
To fix that you have to go to the definition of the structure MODL in version 23 and add a refTo attribute to the field "ribData":
By the way: The addon can export now static meshes. The mesh export functionallity is very basic right now: To export a mesh there must be exactly 1 mesh made out of triangles. That mesh also must have exactly 1 UV layer. Additionally there must be at least one animation and material.
Thx for the help but.
I added the SRIB and IKJT to Sections and it complained so i added
<field offset="528" name="ikjtData" type="Reference" refTo="IKJTV0"/>
what it told me to add and i did and the model was loaded....
just a bit screwed up look at pic
do i have to add a refTo to the Srib aswell??
if i have to what values do i add, cause it never complained and nothing interesting is showed up in the console
Btw i like the script and it was easy to modyfy the xml file so it would load the model
@chaos2night: Go
Are you sure you used the most current version of the script? I fixed a edit bone import bug recently and for me it loads fine!
I suggest that you create a github account. For logged in users the m3addon repository at github will show two buttons: "Watch" and "Fork".
With "Watch" you can get yourself informed about changes to the repository. If you are interested in helping me making the script you can click "Fork" to create a copy of my m3addon at github. You can then publish your changes (e.g. your structure.xml modifications) to that copy and send me a so called "Pull Request".
Trough that pull request I will know that you have changes for me and then I can integrate your changes into my version.
It worked better with the latast download but i get two miss shaped "foot/leg" on the colossi, any ideas
I assume i only have to edit something in the structure.xml or is that a part in the py scripting
it is the left front "foot" and it is twisted 90 deg towards the center
and the right front that is just a little twisted towards the center lik 10-20 deg
@chaos2night: Go
Thanks for your bug report. The roll value of the edit bones got calculated wrongly in some corner cases. I fixed the calculation and pushed the changes to my public repository.
Just tried out the export function and it worked...
Something in the script or the XML is wrong because i don't think it is supposed create a file that is 8x bigger than the normal file. The model i tested was colossi and the exported file is 4,3 MB big and original is 526 KB so... something is wrong :(
I tried to check the model data and it seams to add a lot of unnecessary data to the file cause of its size. And compared in blender the exported model is turned 90 deg right from the normal if you get my point. else it seams to wok. The animation menu get a lot of added unusable animations with the same name as the one that is working. This may be an issue.
used the latest plugin files.