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

add custom name support for osm maps and terrain #460

Draft
wants to merge 1 commit into
base: release
Choose a base branch
from

Conversation

frede791
Copy link

@frede791 frede791 commented Feb 8, 2024

This PR adds the ability to provide custom names for terrain and osm map names. I have the following piece of code where I access map osm buildings and terrain data.

bpy.data.objects[f'Terrain.{str(index).zfill(3)}'].select_set(True)
bpy.data.objects[f'map_{index+1}.osm_buildings'].select_set(True)

I have parallelized this to download and access multiple different objects at the same time. My problem is now that the current implementation assigns an index to the name of the terrain and the osm map and when downloading in parallel, multiple maps end up with the same name. With this PR I can run:

bpy.context.scene.blosm.customName = f'{index+1}'
bpy.context.scene.blosm.terrainName = f'Terrain.{str(index).zfill(3)}'

which allows me to set custom names for each map that is downloaded.
@vvoovv Using these modifications with the code above in Python works fine; however, when i try to run this in the GUI in Blender I get an error saying: AttributeError: type object 'Renderer' has no attribute 'toJoin' I am not really sure why this is. Do you have an idea? I have marked the PR as a draft for now because of this.

Note: I have only tested this on the base version of blosm so I don't know how it would perform on the premium version.

@vvoovv vvoovv marked this pull request as ready for review February 9, 2024 10:22
@vvoovv vvoovv marked this pull request as draft February 9, 2024 10:25
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

Successfully merging this pull request may close these issues.

1 participant