joshuabloemer / Sci-fi-Panels

A procedural Sci-fi panel generator for blender 2.8
MIT License
4 stars 1 forks source link

Clicking on the "Generate Abstract" while object is in Edit Mode triggers an error #1

Closed xan2622 closed 3 years ago

xan2622 commented 3 years ago

πŸ”΅ Describe the bug: An error appears after clicking on "Generate Abstract" while the object (a cube) is in Edit mode.

πŸ”΅ Steps to reproduce the error:

1. Select default cube
2. Go to Edit Mode
3. Click on the "Generate Abstract" button
4. An error appears 

πŸ”΅ The error:

 Python: Traceback (most recent call last):
  File "C:\Users\xan2622\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\src\__init__.py", line 70, in execute
    AbstractAlgorithm(scene.a_iterations, scene.a_areaKill, scene.a_insetAmount, scene.a_insetDiscard, scene.a_extrudeAmount, scene.a_longedgeBias)
  File "C:\Users\xan2622\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\src\Sci_fi_panels.py", line 350, in AbstractAlgorithm
    bm.to_mesh(me)
ValueError: to_mesh(): Mesh 'Cube' is in editmode

location: <unknown location>:-1

πŸ”΅ Screenshots:

ir9HyLshkN

πŸ”΅ Expected behavior: If the add-on is not meant to be used in Edit Mode maybe you could add a check in the code to prevent this error to appear? (perhaps by replacing this error message with a warning in Blender's footer?).

πŸ”΅ Other info:

xan2622 commented 3 years ago

And if the button "Generate Square" is clicked, here is the error that appears:

Python: Traceback (most recent call last):
  File "C:\Users\xan2622\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\src\__init__.py", line 59, in execute
    SqaureAlogrithm(1,scene.s_maxX, 1, scene.s_maxY, scene.s_insetAmount, scene.s_insetDiscard, scene.s_bevelAmount_min, scene.s_bevelAmount_max, scene.s_extrudeAmount)
  File "C:\Users\xan2622\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\src\Sci_fi_panels.py", line 306, in SqaureAlogrithm
    bm.to_mesh(me)
ValueError: to_mesh(): Mesh 'Cube' is in editmode

location: <unknown location>:-1
joshuabloemer commented 3 years ago

Fixed with https://github.com/joshuabloemer/Sci-fi-Panels/commit/2c6c789b15048feadd3197c33d16da68c6f80aec

image

xan2622 commented 3 years ago

Thank you for this fix. Just a note: After downloading the 1.1.1 version from the Releases page, the add-on can't get activated. It seems that the ZIP file contains an extra "Sci-fi-Panels" sub-folder that prevents the user to install the add-on with the ZIP file.

joshuabloemer commented 2 years ago

Thank you for this fix. Just a note: After downloading the 1.1.1 version from the Releases page, the add-on can't get activated. It seems that the ZIP file contains an extra "Sci-fi-Panels" sub-folder that prevents the user to install the add-on with the ZIP file.

Didn't notice that until today, the file on the release page is fixed now