Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reports an error when i try to add spaceship #51

Open
Enda111 opened this issue Apr 13, 2022 · 8 comments
Open

reports an error when i try to add spaceship #51

Enda111 opened this issue Apr 13, 2022 · 8 comments

Comments

@Enda111
Copy link

Enda111 commented Apr 13, 2022

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

@RetroFromTheEmpire
Copy link

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

@Phildatlante
Copy link

Same here.

@don1138
Copy link

don1138 commented Apr 30, 2022

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

@Agroithien
Copy link

Agroithien commented May 3, 2022

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

@YuzhouGuo
Copy link

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.

@don1138
Copy link

don1138 commented May 3, 2022

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.

@Enda111
Copy link
Author

Enda111 commented May 4, 2022

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

@don1138
Copy link

don1138 commented May 4, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants