i dont know very much about python or coding, so as basic as possible. i need to apply the same settings to multiple objects so i want to be able to loop through them and do a operation to them. if i go to the info window i can see the command for what ive just changed and this works if i do
import bpy
(whatever was in the info window)
e.g.
import bpy
bpy.context.object.rigid_body.angular_damping = 0.830769
However this only works with the selected object, i want to be able to make this work for all selected objects. So i guess you loop through all the selected objects and then apply this setting to every one. so:
Q1) How do i loop through all selected objects?
Q2) how does the command change when you want it to work on multiple objects, because the context part makes it work on only the active object in the selection?
edit tried this, doesnt work
import bpy
context = bpy.context
for o in context.selected_objects:
object.rigid_body.angular_damping = 0.830769
AttributeError: type object 'object' has no attribute 'rigid_body'
edit again this works! thanks batFINGER
import bpy
context = bpy.context
for o in context.selected_objects:
o.rigid_body.angular_damping = 0.830769
for o in context.selected_objects:loops thru all the selected objects. – batFINGER Sep 20 '16 at 14:51for o in context.selected_objects: object.rigid_body.angular_damping = 0.830769 -------------sorry i cant see any option to format this properly in comments
– forferdeilig Sep 20 '16 at 14:53context = bpy.contextand it would beo.rigid_body...– batFINGER Sep 20 '16 at 14:58