(ko, context)
| 230 | |
| 231 | |
| 232 | def delete_bake(ko, context): |
| 233 | baked_from = context.scene.objects[ko.st2.baked_from] |
| 234 | |
| 235 | bpy.context.view_layer.objects.active = None |
| 236 | current = context.scene.frame_current |
| 237 | |
| 238 | for o in context.scene.objects: |
| 239 | if o.parent and o.parent == ko: |
| 240 | delete_at_frame(context, o, o.st2.bake_frame) |
| 241 | |
| 242 | delete_at_frame(context, ko, current) |
| 243 | |
| 244 | baked_from.hide_set(False) |
| 245 | baked_from.hide_render = False |
| 246 | |
| 247 | bpy.context.view_layer.objects.active = None |
| 248 | bpy.context.view_layer.objects.active = baked_from |
| 249 | bpy.ops.object.select_all(action='DESELECT') |
| 250 | baked_from.select_set(True) |
| 251 | |
| 252 | return baked_from |
| 253 | |
| 254 | |
| 255 | class ST2_OT_SelectEditables(bpy.types.Operator): |
no test coverage detected