def randomize_lights(simulation_paths: List[str],
attribute_ranges: Dict[str, List[Any]]) -> None:
"""
Randomize the lights in the scene.
Args:
simulation_paths (List[str]): List of simulation paths of the target light group
attribute_ranges (Dict[str, List[Any]): Dictionary of attribute ranges for the lights.
it can be List[List[List[float], List[float]]] or List[List[float], List[float]]
"""
object_group = rep.create.group([rep.get.prim_at_path(light) for light in simulation_paths])
with object_group:
for attribute, list_of_range in attribute_ranges.items():
list_of_dists = [rep.distribution.uniform(rng[0], rng[1]) for rng in list_of_range]
rep.modify.attribute(attribute, rep.distribution.choice(list_of_dists))
very simple omniverse promises this functionality
here Distribution Examples — Omniverse Extensions but I am getting this error when I try to run it
replicator/core/scripts/distribution.py", line 326, in choice
array_node.get_attribute("inputs:array").connect(sample_node.get_attribute("inputs:choices"), True)
then I checked the implementation and I found out that this functionality is not being supported. Using Isaac 4.2.0. I would like to know if you are planning to fix this soon, because it is officially promoted and apparently quite a common need of engineers.