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

Scripting Cannot Add Only Buildings to Scene #925

Open
ejboomus opened this issue Sep 5, 2024 · 0 comments
Open

Scripting Cannot Add Only Buildings to Scene #925

ejboomus opened this issue Sep 5, 2024 · 0 comments

Comments

@ejboomus
Copy link

ejboomus commented Sep 5, 2024

Describe the bug

Attempting to import buildings with no user input. I upload a geotiff, and use bpy.ops.importgis.osm_query to import buildings. When I use filterTags to request only buildings, it states that buildings are not in the expected set. However if I either do not use filterTags or click on Get OSM first, then the code works and can import buildings.

How to Reproduce

This line of code works only after physically clicking on GIS->Web geodata-> Get OSM. If you do not follow those steps before running the script, it says that building is not part of the set. However if you run the code with no filterTags, it imports all options with no error.
bpy.ops.importgis.osm_query(filterTags = {'building'}) only works after clicking GIS->Web geodata-> Get OSM
bpy.ops.importgis.osm_query() works all the time, but imports everything (undesired)

Error message

Python: Traceback (most recent call last):
File "\Text", line 59, in
File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\modules\bpy\ops.py", line 109, in call
ret = _op_call(self.idname_py(), kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Converting py args to operator properties:: 'building' not found in ()

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

1 participant