SpaceshipGenerator icon indicating copy to clipboard operation
SpaceshipGenerator copied to clipboard

can not use anymore in blender3.1

Open BUGProtectionAssociation opened this issue 2 years ago • 6 comments

Have trouble?

What exactly is the problem?

ldo avatar Nov 03 '21 21:11 ldo

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: :-1

doulos0 avatar Nov 25 '21 19:11 doulos0

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.

ldo avatar Nov 25 '21 20:11 ldo

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.

sbarre avatar Dec 01 '21 18:12 sbarre

Oddly, this particular item missed being mentioned in the breaking changes to the Python API ...

ldo avatar Dec 04 '21 07:12 ldo

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

Agroithien avatar May 03 '22 11:05 Agroithien