Giter VIP home page Giter VIP logo

armatoolbox's Introduction

Latest News

Release 4.0.5 has been updated. If you had trouble installing it, it should work now. Turns out I forgot to add the distribution archive :|

PayPal

If you like this project and want to support it, consider a donation

Donate with PayPal

Donations are appreciated, but not necessary.

ArmAToolbox

Arma Toolbox for Blender This is a collection of Python scripts for the Blender 3D package that allows the user to create, import and export unbinarized Arma Engine .p3d files.

Before reporting bugs...

... please read the FAQ Also, "it doesn't work" isn't a bug report. At the very least, mention the version of blender you are using, the version of the toolbox, and any error messages. Due to the way that Blender reports error messages (i.e. not good) you might have missed it. Go to "Windows -> System Console" and check there for any errors.

License

License This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

As an exception to this, any files written while using this software is not covered by this license. That includes .p3d files as well as any other file written by this software.

armatoolbox's People

Contributors

alwarrensidh avatar eternal-screenager avatar robbbt avatar tfrieden avatar vurtualruler98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

armatoolbox's Issues

Made a adjustment to make the RVMatTools.py work on a windows installation with Danish language

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

Development support

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 ?

LODs

Does anyone know why LOD 0 is the only LOD that appears on the outliner window in blender, although P3D has other LODs?

Export to p3d error

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 ?

Error when starting an existing project - Blender 4.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 !

Not working in Blender 3.1, 3.6 or 4.0

Installed to scripts/addons directory of each Blender version,
then activated in the Edit / preferences menu. O2Script.exe path inserted.

Tried importing heli_light_01_civil_f.p3d from p-drive.

Got the following popup in Blender: Report Undefined Type I/O Error Wrong MDL version

Blender 3 6 7 ArmaToolBoxImport
Blender 3 6 7 ArmaToolBox IO Error

I/O error: Wrong MDL version

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

Report: Undefined Type

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.

Imported RTM animations as separate actions

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.

Binarize.exe crash when building exported P3D

Hey !

Quite an annoying situation on this as I constantly export "small changes" in a intermediate p3d to inject them into the main p3d.

  • Export to p3d
  • don't close blender
  • build
  • binarize crash
  • p3d wont delete because it's opened in blender
  • quit blender
  • binarize don't crash / p3d can be deleted

Good luck :)

Error 3pd

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 couldnt load any file.

please update the documentation for this addon

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?

Error Cylinder p3d

Hello AlwarrenSidh

I have a new error. This time I used blender 2.83.9 and Armatoolbox 3.0.4. I only add a cylinder and will save it as p3d. Enclosed the error message after saving. Could you please explain me, what ist wrong?
p3d error

About Wrong I/O MDL Version

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?

P3D Export > No data being exported

When using P3D export it does not load my asset in to Object Builder. It shows a load error. Checking the P3D file it has no data. I am using Blender 4.0 and have the most up to date release of the toolbox.

image
image
image

Missing add range in the RTM Keyframes box

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.

Error Wrong MDL version

Basically whenever i import a .pd3 i get this thing that pops up and it says "Error Wrong MDL version"

Ошибка экспорта name.mlod.p3d модели

Скриншот 03-07-2022 144913

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.

Error popup on "Create Components"

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!```

DayZ

Hi

Can we use this to save models for DayZ?

Thanks

Loosing LOD type assignment.

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.

wrong mdl version

Every time I open a model of Arma 3 it gives this error, I don't know what to do about it.
unknown (1)

doesn't work for Dayz

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?

scaling issue (only when exporting to p3d)

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

Material not copied using the "Arma Material Relocation"

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....

Procedural texture color in Arma Toolbox Material Settings incorrect when exported

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

properties.py, line 188 change subtype to COLOR_GAMMA

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

MDLexporter.py, in function getMaterialInfo

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)

doesnt work on blender 3.4.1at all, tons and tons of errors is this not supported anymore?

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)

RuntimeError: Model X contains n-gons and cannot be exported

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.