I have a very simple question, but couldn’t figure out for myself, since I am not very good at coding tbh.
Is there a possibility to execute a defined function every time the replicator generates a new scene/after taking the pictures. I want to read out the bounding box of my bin and do other stuff, but when I just write it like this it won’t work. The bounding box will only get read out at the beginning of my code execution, but not every time the scene gets generated new. Same if I put the code sniplet in my “bin_place” rep. function.
def bbox_bin(): cache = create_bbox_cache() bin_prim_path = "/Replicator/Ref_Xform" bbox = compute_aabb(cache,bin_prim_path,include_children=True) print(bbox) with rep.trigger.on_time(interval= 8, num=2): rep.randomizer.bin_place() rep.randomizer.env_props(10) rep.randomizer.sphere_lights(10) rep.randomizer.material_edit() bbox_bin()