I fail to modify to material of certain object, possibly due they are an instance proxy and grayed out:
Following code will modify their positions/rotations, but materials are not touched.
def randomize_load():
random_mat_floor = rep.create.material_omnipbr(diffuse_texture=rep.distribution.choice(textures+textures_wall),
roughness=rep.distribution.uniform(0, 1),
metallic=rep.distribution.choice([0, 1]),
emissive_texture=rep.distribution.choice(
textures+textures_wall),
emissive_intensity=rep.distribution.uniform(0, 1000))
shapes = rep.get.prims(path_pattern='Cardbox_A\d ')
with shapes:
rep.modify.pose(
rotation=rep.distribution.uniform((0,0, 0), (0, 0, 360)),
scale=rep.distribution.uniform((1, 1, 1),(1.5, 1.5, 2))
)
rep.randomizer.materials(random_mat_floor)
return shapes.node
