Code Monkey home page Code Monkey logo

voxwriter's People

Contributors

spyduck avatar ygorsouza 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

Watchers

 avatar  avatar  avatar  avatar  avatar

voxwriter's Issues

Custom palette not showing

If I export as VOX using default palette everything works, but that palette is not ideal.
However, if I turn off default palette, export, then load in MagicaVoxel it does not load the custom palette. Does anyone know how to load the new palette with the .VOX file?

PEP8 compliance

According to the Blender addon guidelines, addons must comply with PEP8 in order to be approved for distribution with Blender. Since this addon could potentially be useful for a lot of people, I think it would be good to comply with the standards, in case it reaches a level of maturity at which it could be submitted for approval.

I ran the flake8 analysis on the code, and it found many issues, mostly related to whitespace. Fixing these issues would require changes to the entire code base.

flake8_results.txt

I would like to know if such changes are acceptable or if there is a particular reason why the code was formatted this way. If there is no problem, I could make the necessary changes and submit a pull request.

Install issue

I've installed plenty of addons ranging from left to right, normally I find out the issue. I followed the directions with administrative permissions set on and off with blender and the installation still doesn't work, I am using blender 2.83. I love this Idea, It would help me both with my own work and tutorials in which I am hoping to create in regards to voxel modeling from blender to magica. Ty

Export error

Hi,

After installing the plugin and try to do an export i receive the following error:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\voxwriter\__init__.py", line 61, in execute
    voxelize(context.active_object, self.filepath, vox_detail=max(0,min(126,self.voxel_detail)), use_default_palette=self.use_default_palette)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\voxwriter\writer.py", line 169, in voxelize
    source_name = obj.name
AttributeError: 'NoneType' object has no attribute 'name'

location: <unknown location>:-1

I am using Blender v.2.83.5 on Windows 10.

Thanks

Error / bug, I need help.

Blender Error

Python: Traceback (most recent call last):
File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\voxwriter_init_.py", line 61, in execute
voxelize(context.active_object, self.filepath, vox_detail=max(0,min(126,self.voxel_detail)), use_default_palette=self.use_default_palette)
File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\voxwriter\writer.py", line 223, in voxelize
color = get_color_from_geometry(target, location, normal, orig_scene=orig_scene, location=inside_location, polygon_index=inside_face)
File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\voxwriter\writer.py", line 61, in get_color_from_geometry
round((uv[0] % 1.0) * width-1),
ValueError: cannot convert float NaN to integer

location: :-1

image

Somebody can help me, plz ?

Voxel exports as garbled nonsense

when I open it with notepad it says this

VOX – MAIN `$ PACK� � SIZE XYZI�$ � ��� ��� �� ��
��� ��� ��� ��� ��� ��
��� �� ��
��� ��� ��� ��� ��� ��� �� ��
��� �� ��
��� ��� ��� ��� ��� ��� ��� ��� ��� ��
��� �� ��
��� ��� ��� ��� ��� ��� ��� ��� ��
��� �� ��
��� ��� ��� ��� ��� ��� ��� ��� ��
��� �� ��
��� ��� ��� ��� ��� ��� ��� ��� ��

��

��
��
��
��
��
��
��
��
�� � �
�� �� �� �
��� ��� ��� ��� ��� ��

��
��
��
��
��
�� �� �� �� �� ��� ��� ��� ��� ��� ��� ��� ��� ��� ������ ���
���������������
������� ���
��������������������������� ���
������������������������������� ���
������� ���
��������������������������������������������������� ���
������� ���
����������������������������������������������� ���
������� ���
������������������������������������������� ���
���
����������������������������������� �


���
� �


���
���
���
���
���
���
���
���
���
� � �
� ��� � � �
� ��� ��� ��� ��� ��� ��� ��� ��� ��� �
������� ���
�������������������������������������
� �


���
���
���
���
���
���
���
��� ��� ��� ��� �
�����������������������
�����������������������
�����������������������
�����������������������
�����������������������
����������������������� ���
���������������������������
������������������������� ��� � �������
������� ���
������������������� ���
������� ���
��������������������������������������� ���
������� ���
��������������������������������������������������������������� ���
������� ���
������������������������������������������������������������������� ��������������������������������������� �������������������������������������
���
� �


���
���
���
���
���
���
��� � � �
� ��� �
� ��� ��� ��� ��� ��� ��� ��� ����� ���
������� ���
�����������������������������������

���
� �


���
���
���
���
� � �
� ��� ��� �
�������
������� ���
����������� ���
����������� ���
����������� ������� ���
��������������������������� ���
��������������������������� � �
� ��� ��� ��� ��� ��� ��� ����� ���
��������������� ���
������� ���
����������������������������������������������� ���
������� ���
����������������������������������������������������������� ���
���
����������������������������������������������� �������������������������������������
���
���
� �
���
���
���
���
��� ��� � � ��� ��� ��� ��������� ���
�����������������������������
� �


���
� �
���
���
���
���
���

� ��� � � �
� ��� ��� ��� ��� �
������� ���
����������� ������� ������� ����������� ��������������� ��������������� ������������� � � �
� ��� ��� ��� ��� ��� ��� ��� ���������
�����������������������
������� ���
��������������������������������������� ���
������� ���
���������������������������������������������������������������������
���
��� ��� ��� ��� ��� ��� ��������� ��������������� �


���
� �
���
���
���
���
��� � � �
� ��� ��� ��� � ���
����������� ���
����������� ������� ������� ������� ������� ����������� ��������������������� � � �
� ��� ��� ��� ��� ��� ��� ��� ��������� ���
���������������������������
������� ���
�����������������������������������
������� ���
����������������������� ���
����������������������� �������������������������������������������������
���
���
���
��� ��� ��� ��� ����� ����������� �


���
���
���
���
��� � � ��� ��� � ���
�����������
�������
������� ���
��������������������������� ���
��������������������������� ���
��������������������������� ���
��������������������������� ���
��������������������������� � �
� ��� ��� ��� ��� ��� ��� �����������������
������� ���
�����������������������������������
������� ���
��������������������������� ���
������� ������������������� ���
������������������� ����������������������� �����������������������������������������
���
��� ��� ��������� �����������������
� �


���
���
���
���
���

� ��� � � ��� ��� ��� � ���
�����������
�������
�����������������������
��������������������������������������������������������������� ���
���������������������������
������� ���
����������������������������������� ���
����������� ����������� ���������������������������������������������������������������������
���
��� ��� ��� ��� �������������������
� �


���
���
���

� ��� ��� ��� ����� ����������� ���
�����������
�������������������������������
������� ���
����������������������������������� ���
������� ���
����������������������� ��������������� ���������������������������������������������������������������������������������
���
��� ��� �������������������
���
� �


���
���
���
���
� � �
� ��� ��� ��� ��� ����� ����������� ���
�������������������
�����������������������
��� �� ��
��� ��� ��� ��� ��� ��� ��� ��� �� ��
��� ��� ��� ��� ��� �� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ���
��
�� �� �� ��� ���
��

��
��
��
��
� �
�� �� �� �� �� �� ��� ��� �� ��
��� ��� ��� ��� ��
��� ��� ��� ��� ��� ���
���
���
���
��

���
��
��
���
���
���
���
���
���
���
���
��
��

���
���
���
��
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���

��

��
��
��
��
��
���
���

��

��

��

��


��
��
��
��
��

��
���
���
��
��
���
���
���
���
��
���
���
���
���
���
������������������
������� ���
����������������������������������� ���
��������������� �������������������������������������������������������������������������������������
���
��� ��� ���������������������������
���
���
���
� �
���
���
���
���
���
��� ��� ��� � � �
� ��� ��� ��� ��� ��� ��� ��� ����� ����������� ���
�������������������������������������������
��� �� ��
��� ��� ��� ��� ��� ��� ��� ��� �� ��
��� ��� ��� ��� ��� �� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ���
��
�� �� �� �� �� ��� ��� ��� ��� ��� ��� ��� ���
��
��
��
��

��
��
��
��
��
��
�� �� �� �� � �
�� �� �� �� �� �� �� �� �� �� ��� ��� �� ��
��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��

���
��
��

���
���
���
���
���
���
���
���
��
��

���
��
��

���
���
���
���
���
���
��
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���

��

��

��

��

��

��
��
��
��
��
��
��
��
��
���
���
���
���
���
���
���
���
���
���
��
��
��
��
��

��
��
��
��
��
��
��
��
��
��
��
��

��
��
��
��
��
��
��
��
��

��
��

���
���
���
��
��

���
���
���
���
���
���
���
���
������ ���
������������������������������� ���
������� ���
����������������������������������� ���
������������������������������������������������������������������������������������������������������� ��������������������������������������������������������������� ��������������������������������������������������������������� ������������������������������������������������������� �
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
� � ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��� ��������������������������������� ���
���������������������������������������������
���
���
���
���
���
���
� �


���
���
���
���
���
���
���
���
���
���
���
��� ��� � � ��� ��� ��� ����� ���
�����������������������
�����������������������
��������������������������� ���
������������������������������� ���
������� ���
��������������������������� ���
������������������������������� ������������������������������������������������������� ��������������������������������������������������������������� ��������������������������������������������������������������� ����������������������������������������������������������������������� �
���
���
���
���
���
���
���
���
���
���
���
���
���
���
���
� � ��� ��� ��� ��� ��� ��� ��� � � ��� ��� ��� ��� ��� ��� ��� ��� ��� � ��������������������������� ���
�����������������������������������������
���
���
���


���
���
���
���
���
���
���
��� � � �
� ��� ��� ��� � ���
�������������������������������������������
��������������������������� ���
������������������������������� ���
������� ���
��������������������������� ���
������������������������������� ��������������� ������������������� ��������������������������� ������������������� ��������������������������� ��������������� ����������������������� �
���
���
���
���
� �


���
���
���
���
���
���
���
� � ��� ��� ��� � � �
� ��� ��� ��� ��� ��� ��� � ��������������� ���
�������������������������������������
���
� �


���
���
���
���
��� � � �
� ��� ��� ��� ��� ��� ��� ��� �
����������������������������������������������� ���
���������������������������
������� ���
������������������� ���
������� ������������������� ���
��������������� ���
����������������������� ���
�������������������

���
� �
���
���
���

� ��� � � ��� ��� ��� ����� ���
��������������� �


���
���
���
���
���
���

� ��� ��� ��� ��� ��� ��������������������������������� ���
������������������������������� ���
���������������
������� ���
�������������������
������� ���
����������������������� ���
�����������������
� �


���
���
���
���
���
� � �
� ��� ��� ��� ��� �
�������������������������
���
���
���
��� ��� ����������������� ���
��������������������������� ���
��������������������������� ���
���������������������������
�����������������������

���
���
���
���
���
��� ��� ��� ��� �����������������RGBA� ÌÌÌÿ

Unable to export with a high voxel detail

I just test it and find that its most voxel detail is 126
When I change the code in init file where voxelize(context.active_object, self.filepath, vox_detail=max(0,min(126,self.voxel_detail)), use_default_palette=self.use_default_palette) from 126 to 1024
I can export to voxel detail of 256 but more than that I will face with a python error says ubyte format requires 0 <= number <= 255 I cannot solve this problem

An error occurred in the conversion

blender shows the following error: Python: Traceback (most recent call last):
File "C:\Users\27296\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\voxwriter_init_.py", line 59, in execute
from .writer import voxelize
File "C:\Users\27296\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\voxwriter\writer.py", line 7, in
from pyvox.models import Vox, Color, get_default_palette
ModuleNotFoundError: No module named 'pyvox'

Trying to convert GLTF to .vox and Running into Error

Specs: Max OSX Catalina

error message:
RuntimeError: Operator bpy.ops.object.convert.poll() failed, context is incorrect

StackTrace:
Converting to vox
Python: Traceback (most recent call last):
File "/Users/aliow/Library/Application Support/Blender/3.0/scripts/addons/voxwriter/init.py", line 61, in execute
voxelize(context.active_object, self.filepath, vox_detail=max(0,min(126,self.voxel_detail)), use_default_palette=self.use_default_palette)
File "/Users/aliow/Library/Application Support/Blender/3.0/scripts/addons/voxwriter/writer.py", line 177, in voxelize
bpy.ops.object.convert(target='MESH')
File "/Applications/Blender.app/Contents/Resources/3.0/scripts/modules/bpy/ops.py", line 132, in call
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.convert.poll() failed, context is incorrect

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.