Skip to content

Conversation

@fredmarkus
Copy link

@fredmarkus fredmarkus 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