Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_object(self):
return algorithms.get_object_by_name(self.obj_name)
def get_proxy_fitting_ingredients(self):
scn = bpy.context.scene
status = 'OK'
if scn.mblab_proxy_name != "NO_PROXY_FOUND":
if scn.mblab_fitref_name == scn.mblab_proxy_name:
return ["SAME_OBJECTS", None, None]
character_obj = algorithms.get_object_by_name(scn.mblab_fitref_name)
proxy_obj = algorithms.get_object_by_name(scn.mblab_proxy_name)
if character_obj == None:
return ["CHARACTER_NOT_FOUND", None, None]
if proxy_obj == None:
return ["PROXY_NOT_FOUND", None, None]
if not algorithms.is_a_lab_character(character_obj):
return ["NO_REFERENCE", None, None]
return ["OK", proxy_obj, character_obj]
return ["PROXY_NOT_FOUND", None, None]
def get_armature(self):
if self.has_data:
return algorithms.get_object_by_name(self.armature_name)
def get_proxy_fitting_ingredients(self):
scn = bpy.context.scene
status = 'OK'
if scn.mblab_proxy_name != "NO_PROXY_FOUND":
if scn.mblab_fitref_name == scn.mblab_proxy_name:
return ["SAME_OBJECTS", None, None]
character_obj = algorithms.get_object_by_name(scn.mblab_fitref_name)
proxy_obj = algorithms.get_object_by_name(scn.mblab_proxy_name)
if character_obj == None:
return ["CHARACTER_NOT_FOUND", None, None]
if proxy_obj == None:
return ["PROXY_NOT_FOUND", None, None]
if not algorithms.is_a_lab_character(character_obj):
return ["NO_REFERENCE", None, None]
return ["OK", proxy_obj, character_obj]
return ["PROXY_NOT_FOUND", None, None]
def get_body(self):
if self.has_data:
return algorithms.get_object_by_name(self.body_name)