MCPcopy Create free account
hub / github.com/coldtype/st2 / delete_bake

Function delete_bake

ST2/exporting.py:232–252  ·  view source on GitHub ↗
(ko, context)

Source from the content-addressed store, hash-verified

230
231
232def 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
255class ST2_OT_SelectEditables(bpy.types.Operator):

Callers 1

executeMethod · 0.85

Calls 1

delete_at_frameFunction · 0.85

Tested by

no test coverage detected