10 years ago
def get_objects_of_def_id_gen
Is the following function referring to the object Tuning IDs? And if so, please could you give me an example of use since the existing decompiled scripts don't seem to use it at all. def get_o...
"IngeJones;899528" wrote:
Is the following function referring to the object Tuning IDs? And if so, please could you give me an example of use since the existing decompiled scripts don't seem to use it at all.
obj_manager = services.object_manager()
definition_ids =
obj_list = []
loaded_obj_list = obj_manager.get_all()
for obj in loaded_obj_list:
for definition_id in definition_ids:
if obj.definition.id == definition_id:
obj_list.append(obj)
return obj_list
instance_manager = services.get_instance_manager(resource_type)
tuning_instance_ids =
tuning_list = []
for tuning_instance_id in tuning_instance_ids:
tuned_instance = instance_manager.get(tuning_instance_id)
if tuned_instance:
tuning_list.append(tuned_instance)
else:
output("The manager did not return a tuning instance for id " + repr(tuning_instance_id))
return tuning_list