Hello, I can’t figure out how to change hair settings on all selected objects. This code does not work.
for obj in bpy.context.scene.objects:
obj.select_set(True)
ob.particle_systems.active.settings.count = 500
Hello, I can’t figure out how to change hair settings on all selected objects. This code does not work.
for obj in bpy.context.scene.objects:
obj.select_set(True)
ob.particle_systems.active.settings.count = 500
I found this code in these forums that works on a list of objects and as it goes through the list makes each object an active object.
context = bpy.context
yourObjects = [o for o in context.selected_objects if o.type == ‘MESH’]
for o in yourObjects:
o.select_set(True) # Select the object
context.view_layer.objects.active = o # Set the object as the active object
#Your actions to run per object.