def execute(self, context): s = bpy.context.scene operation = s.cam_operations[s.cam_active_operation] operation_name = "cam_path_{}".format(operation.name) if operation_name in bpy.data.objects: simulation.doSimulation(operation_name, [operation]) else: print('no computed path to simulate') return {'FINISHED'} return {'FINISHED'}
def execute(self, context): s = bpy.context.scene chain = s.cam_chains[s.cam_active_chain] chainops = getChainOperations(chain) canSimulate = True for operation in chainops: if not operation.name in bpy.data.objects: canSimulate = True #force true print("operation name " + str(operation.name)) if canSimulate: simulation.doSimulation(chain.name, chainops) else: print('no computed path to simulate') return {'FINISHED'} return {'FINISHED'}
def execute(self, context): s = bpy.context.scene operation = s.cam_operations[s.cam_active_operation] # if operation.geometry_source=='OBJECT' and operation.object_name in bpy.data.objects and #bpy.data.objects[operation.object_name].type=='CURVE': # print('simulation of curve operations is not available') # return {'FINISHED'} operation_name = "cam_path_{}".format(operation.name) if operation_name in bpy.data.objects: simulation.doSimulation(operation_name, [operation]) else: print('no computed path to simulate') return {'FINISHED'} return {'FINISHED'}