Skip to content

Commit

Permalink
Fix additional bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryLingjieMei authored and pvl-bot committed Nov 11, 2024
1 parent c8223da commit e9c76d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion infinigen/assets/objects/creatures/crustacean.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def shader_crustacean(nw: NodeWrangler, params):
)
light_color = hsv2rgba(base_hue, uniform(0.0, 0.4), log_uniform(0.2, 1.0))
specular = uniform(0.6, 0.8)
specular_tint = [uniform(0, 1)] * 3
specular_tint = *([uniform(0, 1)] * 3), 1
clearcoat = uniform(0.2, 0.8)
roughness = uniform(0.1, 0.3)
metallic = uniform(0.6, 0.8)
Expand Down
7 changes: 4 additions & 3 deletions infinigen/core/placement/particles.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def bake(emitter, system):
}
with Suppress():
bpy.context.scene.frame_end += 1
with bpy.context.temp_override(override):
with bpy.context.temp_override(**override):
bpy.ops.ptcache.bake(bake=True)
bpy.context.scene.frame_end -= 1

Expand All @@ -48,10 +48,11 @@ def configure_boids(system_config, settings):
context = bpy.context.copy()
context["particle_settings"] = system_config
for _ in boids.states[0].rules.keys():
with bpy.context.temp_override(context):
with bpy.context.temp_override(**context):
bpy.ops.boid.rule_del()
for r in rules:
bpy.ops.boid.rule_add(context, type=r.pop("type"))
with bpy.context.temp_override(**context):
bpy.ops.boid.rule_add(type=r.pop("type"))
for k, v in r.items():
setattr(boids.states[0].rules[-1], k, v)
assert len(boids.states[0].rules) == len(rules)
Expand Down

0 comments on commit e9c76d8

Please sign in to comment.