mrossini-ethz / starscape

Blender Add-On for adding stars to the background
GNU General Public License v2.0
5 stars 1 forks source link

Can't generate starscape in Blender 3.2 on macOS #1

Open manuel-imboden opened 2 years ago

manuel-imboden commented 2 years ago

Hi

First of all, thanks for making this add-on! I found an issue in Blender 3.2: When I try to generate the starscape, the following error message pops up:

Python: Traceback (most recent call last): File "/Users/user/Library/Application Support/Blender/3.2/scripts/addons/starscape-master/operator.py", line 38, in execute starscape.generate_starscape(props) File "/Users/user/Library/Application Support/Blender/3.2/scripts/addons/starscape-master/starscape.py", line 121, in generate_starscape v.normal = v.co AttributeError: bpy_struct: attribute "normal" from "MeshVertex" is read-only

A spherical object called "Starscape" is generated, but it's small-ish (about the size of the default cube) and not visible when rendering.

alinsavix commented 2 years ago

FWIW, it looks like this is because of https://developer.blender.org/rB891268aa824f0f, which describes MeshVertex.normal as being "in practice read-only", and with 3.2 they made it actually read-only. Just removing the normals-setting loop stops the crashing, but I don't know if there are negative effects from doing so.

mrossini-ethz commented 2 years ago

Hi

Thank you for bringing this to my attention. And also thank you alinsavix for researching the issue. Finally I have found some time to look into it. A modification that I hope will clear the issue is now available in the 'master' branch. Please download the newest ZIP file to try it!

manuel-imboden commented 2 years ago

Hello

Sorry for the late reply. I get a different error now:

Python: Traceback (most recent call last): File "/Users/manuelimboden/Library/Application Support/Blender/3.2/scripts/addons/starscape-master/operator.py", line 38, in execute starscape.generate_starscape(props) File "/Users/manuelimboden/Library/Application Support/Blender/3.2/scripts/addons/starscape-master/starscape.py", line 322, in generate_starscape if props.clear_world_bg: AttributeError: 'StarscapeProperties' object has no attribute 'clear_world_bg'

Momithso commented 1 day ago

Fixed the code for Blender 4.2.2 LTS :)