SpaceshipGenerator icon indicating copy to clipboard operation
SpaceshipGenerator copied to clipboard

reports an error when i try to add spaceship

Open Enda111 opened this issue 2 years ago • 8 comments

Screen Shot 2022-04-13 at 6 45 32 PM

Report: Error Python: Traceback (most recent call last): File "/Users/enda/Library/Application Support/Blender/3.1/scripts/addons/add mesh SpaceshipGenerator/init.py",line 43, in execute spaceship generator.generate spaceship( File "/Users/enda/Library/Application Support/Blender/3.1/scripts/addons/add mesh SpaceshipGenerator/spaceship generator.py", line 669, in generate spaceship add surface antenna to face(bm, face) File "/Users/enda/Library/Application Support/Blender/3.1/scripts/addons/add mesh SpaceshipGenerator/spaceship generator.py", line 341, in add surface antenna to face result = bmesh.ops.create cone(bm, TypeError: create cone: keyword "segments" expected an int, not float location: :-1

Enda111 avatar Apr 13 '22 22:04 Enda111

I also have this issue; did you find a solution? :)

RetroFromTheEmpire avatar Apr 24 '22 14:04 RetroFromTheEmpire

Same here.

Phildatlante avatar Apr 28 '22 22:04 Phildatlante

To fix this, open spaceship_generator.py and change line 340 from: num_segments = uniform(3, 6) to num_segments = randint(3, 6)

don1138 avatar Apr 30 '22 00:04 don1138

> To fix this, open spaceship_generator.py and change line 340 from: num_segments = uniform(3, 6) to num_segments = randint(3, 6)

I tried this but another error came on please help!!! Screenshot (33) ut...

Agroithien avatar May 03 '22 04:05 Agroithien

To fix this, open spaceship_generator.py and change line 340 from: num_segments = uniform(3, 6) to num_segments = randint(3, 6)

I tried this but another error came on please help!!! Screenshot (33) ut...

Hey there, I just came along with the same issue. If you reach out to the latest blender API website you may see that they change the argument namings: https://docs.blender.org/api/current/bmesh.ops.html. I guess the name used to be "diameter" but apparently it is now "radius". So just change all "diameter1" "diameter2" to "radius1" and "radius2" you should be fine.

YuzhouGuo avatar May 03 '22 15:05 YuzhouGuo

Ah, Yes! Thanks for detailing the solution!

I found that ldo had forked it and got it working, but hadn't yet done a DIFF to see what they had changed.

don1138 avatar May 03 '22 21:05 don1138

i also changed so instead of saying diameter1=0, it looks like. dont know if this helps for any bugs or anything :) Screen Shot 2022-05-04 at 4 28 30 PM s

Enda111 avatar May 04 '22 20:05 Enda111

It looks like you need to change all instances of uniform() to int() or radint()

(and make those values whole integers; so no 0.001, only 1)

and all instances of diameter1 and diameter2 to radius1 and radius2.

don1138 avatar May 04 '22 22:05 don1138