chore: grass.py 参数名 add_grass_tufts_fn → add_grass_tufts (更 Pythonic)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ from osmassets.mesh import MeshBatch
|
|||||||
|
|
||||||
|
|
||||||
def assemble(ring, way_id, scene_xmin, scene_xmax, scene_ymin, scene_ymax,
|
def assemble(ring, way_id, scene_xmin, scene_xmax, scene_ymin, scene_ymax,
|
||||||
green_c, grass_mat, tuft_variants, add_grass_tufts_fn):
|
green_c, grass_mat, tuft_variants, add_grass_tufts):
|
||||||
ring = clip_polygon(ring, scene_xmin, scene_xmax, scene_ymin, scene_ymax)
|
ring = clip_polygon(ring, scene_xmin, scene_xmax, scene_ymin, scene_ymax)
|
||||||
name = "Grass_" + str(way_id)
|
name = "Grass_" + str(way_id)
|
||||||
focus = list(ring)
|
focus = list(ring)
|
||||||
@@ -16,7 +16,7 @@ def assemble(ring, way_id, scene_xmin, scene_xmax, scene_ymin, scene_ymax,
|
|||||||
obj = batch.finish()
|
obj = batch.finish()
|
||||||
tufts = 0
|
tufts = 0
|
||||||
if tuft_variants:
|
if tuft_variants:
|
||||||
tufts = add_grass_tufts_fn(name, ring, tuft_variants, green_c)
|
tufts = add_grass_tufts(name, ring, tuft_variants, green_c)
|
||||||
if obj:
|
if obj:
|
||||||
obj["grass_tufts"] = tufts
|
obj["grass_tufts"] = tufts
|
||||||
return 1, tufts, focus
|
return 1, tufts, focus
|
||||||
|
|||||||
Reference in New Issue
Block a user