SpaceshipGenerator
SpaceshipGenerator copied to clipboard
can not use anymore in blender3.1
Have trouble?
What exactly is the problem?
Error for Blender 3.0
Python: Traceback (most recent call last): File "/home/doulos/.config/blender/3.0/scripts/addons/SpaceshipGenerator-master/init.py", line 43, in execute spaceship_generator.generate_spaceship( File "/home/doulos/.config/blender/3.0/scripts/addons/SpaceshipGenerator-master/spaceship_generator.py", line 669, in generate_spaceship add_surface_antenna_to_face(bm, face) File "/home/doulos/.config/blender/3.0/scripts/addons/SpaceshipGenerator-master/spaceship_generator.py", line 341, in add_surface_antenna_to_face result = bmesh.ops.create_cone(bm, TypeError: create_cone: keyword "diameter1" is invalid for this operator
location:
Seems that what was called the “diameter” argument in these BMesh operators was in fact being interpreted as the radius all along, according to this commit. Which is why it has been renamed as of 3.0.
I've got a fork of the addon where I've patched the script to work in Blender 3+
You can find it here: https://github.com/sbarre/SpaceshipGenerator/tree/blender-3
It was a very simple fix, just a search/replace operation in one file, so you can also just patch your locally installed version of the addon instead.
I've opened a PR on here to discuss it, although I don't think it should be merged into master yet because it might(?) break in 2.9 or lower.
Oddly, this particular item missed being mentioned in the breaking changes to the Python API ...
I've got a fork of the addon where I've patched the script to work in Blender 3+
You can find it here: https://github.com/sbarre/SpaceshipGenerator/tree/blender-3
It was a very simple fix, just a search/replace operation in one file, so you can also just patch your locally installed version of the addon instead.
I've opened a PR on here to discuss it, although I don't think it should be merged into master yet because it might(?) break in 2.9 or lower.
Initially, This is not working for me in blender 3.1.2 but I changed num_segments = uniform(3, 6) to num_segments = randint(3, 6) on line number 340 inside spaceship_generator.py It was a long shot tho. but it worked like a charm... thanks me later lol...