alwarrensidh / armatoolbox Goto Github PK
View Code? Open in Web Editor NEWArma Toolbox for Blender
License: GNU General Public License v3.0
Arma Toolbox for Blender
License: GNU General Public License v3.0
Hi !
Sorry to disturb you, I have a problem when starting an existing project.
Read prefs: "C:\Users\Yann\AppData\Roaming\Blender Foundation\Blender\4.0\config\userpref.blend" Traceback (most recent call last): File "E:\Program Files (x86)\Steam\steamapps\common\Blender\4.0\scripts\modules\addon_utils.py", line 364, in enable mod = importlib.import_module(module_name) File "E:\Program Files (x86)\Steam\steamapps\common\Blender\4.0\python\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "C:\Users\Yann\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\TexTools_1_5\__init__.py", line 128, in <module> from . import op_texel_density_set File "C:\Users\Yann\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\TexTools_1_5\op_texel_density_set.py", line 3, in <module> from bpy.types import FaceMap ImportError: cannot import name 'FaceMap' from 'bpy.types' (unknown location) ArmaToolbox registering Internal classes... properties registering properties operators menus panels lists BatchMDLExport register Register done Traceback (most recent call last): File "E:\Program Files (x86)\Steam\steamapps\common\Blender\4.0\scripts\modules\addon_utils.py", line 364, in enable mod = importlib.import_module(module_name) File "E:\Program Files (x86)\Steam\steamapps\common\Blender\4.0\python\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "C:\Users\Yann\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\TexTools_1_5\__init__.py", line 128, in <module> from . import op_texel_density_set File "C:\Users\Yann\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\TexTools_1_5\op_texel_density_set.py", line 3, in <module> from bpy.types import FaceMap ImportError: cannot import name 'FaceMap' from 'bpy.types' (unknown location) Read blend: "D:\D├®veloppement 3D\.work\A3PL\A3PL_TourRadio\.dev\untitled.blend" Load Hook: D:\Développement 3D\.work\A3PL\A3PL_TourRadio\.dev\untitled.blend
Blender is working properly but if I close the console window opened, Blender just closes.
I don't have this error when starting a new project from scratch. I hope no one asked before me for this problem. I didn't find any question close to my one, so...
I tried to uninstall and install again, closing Blender between, checking if the folder was properly removed from my Roaming but the error is still coming.
Thanks for the help you'll offer !
An error message is generated when an object is exported that has an empty material slot.
MDLexporter.py, line 31
Blender uses the linear RGB color space whereas Arma is using gamma-corrected sRGB color space, this results in an incorrect color being exported for procedural textures.
I propose two possible solutions to fix this, the first is to change the color picker to use gamma corrected values
class ArmaToolboxMaterialProperties(bpy.types.PropertyGroup):
texture : bpy.props.StringProperty(
name="Face Texture",
description="ARMA texture",
subtype="FILE_PATH",
default="")
rvMat : bpy.props.StringProperty(
name="RVMat Material",
description="RVMat associated with this materiaL",
subtype="FILE_PATH",
default="")
texType : bpy.props.EnumProperty(
name="Color Map Type",
description="The type/source of the color for this surface",
items=textureClass)
colorValue : bpy.props.FloatVectorProperty(
name= "Color",
description= "Color for procedural texture",
subtype= 'COLOR_GAMMA',
min= 0.0,
max= 1.0,
soft_min= 0.0,
soft_max= 1.0,
default= (1.0,1.0,1.0))
colorType : bpy.props.EnumProperty(
name="Color Type",
description="The Type of color, corresponding to the suffix of a texture name",
items = textureTypes)
colorString : bpy.props.StringProperty (
name = "Resulting String",
description = "Resulting value for the procedural texture")
the second possible solution is to do the linear to sRGB space conversion on export
def lineartosRGB(c):
if c < 0.0031308:
srgb = 0.0 if c < 0.0 else c * 12.92
else:
srgb = 1.055 * math.pow(c, 1.0 / 2.4) - 0.055
return srgb
def getMaterialInfo(face, obj):
textureName = ""
materialName = ""
if face.material_index >= 0 and face.material_index < len(obj.material_slots):
material = obj.material_slots[face.material_index].material
texType = material.armaMatProps.texType;
if texType == 'Texture':
textureName = material.armaMatProps.texture;
textureName = stripAddonPath(textureName);
elif texType == 'Custom':
textureName = material.armaMatProps.colorString;
elif texType == 'Color':
textureName = "#(argb,8,8,3)color({0:.3f},{1:.3f},{2:.3f},1.0,{3})".format(
lineartosRGB(material.armaMatProps.colorValue.r),
lineartosRGB(material.armaMatProps.colorValue.g),
lineartosRGB(material.armaMatProps.colorValue.b),
material.armaMatProps.colorType)
materialName = stripAddonPath(material.armaMatProps.rvMat)
return (materialName, textureName)
please update the documentation or have somebody with some knowledge update the documentation for this addon especially for the blender 2.8 version as the UI for blender has changed. Bundle the documentation with the repository and not a 10 year old outdated website that nobody,if they come here to github,even knows about. What good is a addon if nobody knows how to use it?
Getting this error pretty often in my models when exporting to p3d https://gyazo.com/c69adfe214445e553a8d8f0742740102. It's fixed by deleting my geometry lod but it's obviously not a viable solution.
This is the model for recreation purposes.
untitled.zip
How to resolve this error? I tried install multiple versions of blender and all of these can't resolve this error. Or it is an error about p3d file?
A tool/button to copy named properties over from active object to selected.
Does anyone know why LOD 0 is the only LOD that appears on the outliner window in blender, although P3D has other LODs?
Seem to getting this when I exsport a model to p3d
File "C:\Users\JoshF\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\ArmaToolbox_init_.py", line 223, in execute
exportMDL(self, filePtr, self.selectionOnly);
any ideas ?
The CopyData modifier in Blender 2.80 copies all vertex groups to each vertex, even those that have a weight of 0. It would be a good idea to be able to prune these, are modify the export to not export any weights that are 0.
When selecting "Create Components", the following error message appears:
File "E:\Users\hfrieden\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\ArmaToolbox\operators.py", line 387, in execute
ArmaTools.createComponents(context)
File "E:\Users\hfrieden\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\ArmaToolbox\..\ArmaToolbox\ArmaTools.py", line 499, in createComponents
vgrp = bpy.context.active_object.vertex_groups.new("Component%02d" % componentNr)
TypeError: VertexGroups.new(): required parameter "name" to be a keyword argument!```
does not work Import and export. P3D file weighs 0 kb and dont open in Object bilder. Skript D:\Program Files (x86)\Steam\steamapps\common\DayZ Tools\Bin\ObjectBuilder\O2Script.exe no help. what to do?
I can see in a lot of tutorials that were using an earlier version of Blender and this plugin there was an option to add a range of keyframes. This option seems to be missing in the current version of this plugin, you can only individually add them one by one.
Does not work with DayZ for importing.
I/O Error Wrong MDL Version
I am using Blender 4.0.2 and i am getting this issue when i try to import a p3d.
Hi
Can we use this to save models for DayZ?
Thanks
I selected O2 script path from preferences but it didnt work for me can someone help me ?
Could you make it so the imported animation is added as a new action (in the dope sheet) with the name of the file it's imported from? It would be pretty elegant way and you could have multiple animations in the same file, while keeping it organized.
no matter what i do it just throws this at me when exporting
https://gyazo.com/7ad37c592c4a2bed1989557e349c07db
Basically whenever i import a .pd3 i get this thing that pops up and it says "Error Wrong MDL version"
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\modules\addon_utils.py", line 333, in enable
mod = import(module_name)
File "C:\Users\Unite\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\ArmaToolbox_init_.py", line 24, in
from MDLImporter import importMDL
File "C:\Users\Unite\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\ArmaToolbox..\ArmaToolbox\MDLImporter.py", line 14, in
import ArmaTools
File "C:\Users\Unite\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\ArmaTools.py", line 9, in
from ArmaProxy import RebaseProxies, GetMaxProxy
ImportError: cannot import name 'RebaseProxies' from 'ArmaProxy' (C:\Users\Unite\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\ArmaToolbox..\ArmaToolbox\ArmaProxy.py)
Python: Traceback (most recent call last):
File "C:\Users\Alex\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\ArmaToolbox_init_.py", line 218, in execute
context.view_layer.objects.active = bpy.data.objects[0]
IndexError: bpy_prop_collection[index]: index 0 out of range, size 0
At first everything worked perfectly.
At one point, this error started to come out.
Tried two versions of blender 2.8 and 3.2
Happening in both.
Reinstalling didn't help. Neither manual method nor automatic.
Find it hard to get the right workflow to ensure that the LOD type that is assigned in the ARMA OBJECT PROPERTIES will stay on the layer.
Sometimes the assignment get changed and I dont understand why.
When using Blender 2.9x, the Frame Range dropdown list disappears.
The resulting texture from the below code start with a " char
this makes the copy and move fail
I have introduced the following code in line 150 and then it works:
texture = texture[1:]
don't understand why the texture = texture.strip(""") remove the "
def rt_readTextures(rvMatFile):
textures = []
with open(rvMatFile) as f:
content = f.readlines()
content = [x.strip() for x in content]
for l in content:
if "texture" in l.lower():
t = l.split("=")
if len(t) == 2:
texture = t[1]
if texture.rfind(";") >= 0:
texture = texture[:-1]
texture = texture.strip("\"")
texture = texture.strip("'")
texture = texture.strip()
texture = texture[1:]
print("==", texture)
if texture[0] != '#':
textures.append(texture)
return textures
sintax error:invalid sintax
Hey !
Quite an annoying situation on this as I constantly export "small changes" in a intermediate p3d to inject them into the main p3d.
Good luck :)
Request for small code correction to the RVMatTools.py file
The current code for ARMA Material Relocation does not work, need to change line 264 and 265:
Current code:
def rt_SmartCopy(texName, outputName): if path.exists(outputName):
Correct code:
def rt_SmartCopy(texName, outputPath): if path.exists(outputPath):
Thanks a lot for a amazing tool....
hello, im new to 3d modeling and all stuff. im trying to do very basic stuff. i set Scale X to 3.0 to cube of new blender project. enabled arma object properties, then i export to p3d, then in object builder i see original cube that i had, without scale applied. if i export to stl for example, scale is applied and i see the same shape as in blender
am i doing something wrong?
blender 2.80, armatoolbox from master branch
I use toolbox 3.1.1 and blender 2.9.1. and blender 2.83
If I save the p3d file it works. But I couldnt import it to blender as p3d. Additional my changes are not in the new p3d file, if I could load it. The object builder couldn
t load any file.
Thanks bro
I/O error: Wrong MDL version
Error shows up each time I try to open .p3d with blender 2.8. Tool Box version is 3.0.2 apparently
I'm running the latest released version 3.0.4
Originally posted by @pmckeon in #24 (comment)
When exporting a p3d the Shadow Volume LOD resolution is set to 1000 regardless of what resolution is set within the Arma Object Properties panel.
Sorry for the terrible issue report , I’m attempting to help with development, what are the proper steps to make a dev environment for blender . I’ve made some scripts that have my workflow that may help the project but I would like to do a local dev environment. Is there a guide you suggest ?
how install it ?
ty
Write lod 0 Writing Vertices Writing Normals Writing faces taggs: Named selections taggs: sharp edges taggs: mass (if any) taggs: named props taggs: uvsets Write lod 1 Writing Vertices Writing Normals Writing faces taggs: Named selections taggs: sharp edges taggs: mass (if any) taggs: named props taggs: uvsets Write lod 2 Writing Vertices Writing Normals Writing faces taggs: Named selections taggs: sharp edges taggs: mass (if any) taggs: named props taggs: uvsets Write lod 3 Writing Vertices Writing Normals Writing faces taggs: Named selections taggs: sharp edges taggs: mass (if any) taggs: named props taggs: uvsets Write lod 4 Writing Vertices Writing Normals Writing faces taggs: Named selections taggs: sharp edges taggs: mass (if any) taggs: named props taggs: uvsets Write lod 5 Writing Vertices Writing Normals Writing faces Traceback (most recent call last): File "C:\Users\franc\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\ArmaToolbox\__init__.py", line 223, in execute exportMDL(filePtr, self.selectionOnly); File "C:\Users\franc\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\ArmaToolbox\..\ArmaToolbox\MDLexporter.py", line 411, in exportMDL export_lod(filePtr, obj, wm, idx) File "C:\Users\franc\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\ArmaToolbox\..\ArmaToolbox\MDLexporter.py", line 327, in export_lod writeFaces(filePtr, obj, mesh) File "C:\Users\franc\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\ArmaToolbox\..\ArmaToolbox\MDLexporter.py", line 110, in writeFaces raise RuntimeError("Model " + obj.name + " contains n-gons and cannot be exported") RuntimeError: Model Geometry PhysX contains n-gons and cannot be exported
I don't know if this is a normal behaviour, but in 2.79 I don't have that problem
LoW model only has LOD0 and LOD1 models when imported. No pilotview or cargoview models
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.