Skip to content

Commit

Permalink
always require toggledon for particle appliers
Browse files Browse the repository at this point in the history
  • Loading branch information
cremebrule committed Aug 8, 2023
1 parent da5706d commit 698c270
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bddl/data_generation/parse_tm_cleaning_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,11 @@ def find_and_replace_synsets_recursively(ohp_root):
if "particleApplier" in ohp_root["abilities"]:
print(f"Adding particleApplier kwargs for: {name}")
assert name in PARTICLE_APPLIER_MAPPING
applier_conditions = [(ParticleModifyCondition.TOGGLEDON, True)]
if "needsOrientation" in ohp_root["abilities"]:
conditions.append((ParticleModifyCondition.GRAVITY, True))
ohp_root["abilities"]["particleApplier"] = {
"conditions": {PARTICLE_APPLIER_MAPPING[name]: [(ParticleModifyCondition.GRAVITY, True) if "needsOrientation" in ohp_root["abilities"] else (ParticleModifyCondition.TOGGLEDON, True)]},
"conditions": {PARTICLE_APPLIER_MAPPING[name]: applier_conditions},
"method": ParticleModifyMethod.PROJECTION,
}
if "particleSource" in ohp_root["abilities"]:
Expand Down

0 comments on commit 698c270

Please sign in to comment.