How to use the algorithms.get_object_by_name function in algorithms

To help you get started, we’ve selected a few algorithms examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github calben / EasyBastioniLAB / materialengine.py View on Github external
def get_object(self):
        return algorithms.get_object_by_name(self.obj_name)
github calben / EasyBastioniLAB / proxyengine.py View on Github external
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]
github calben / EasyBastioniLAB / skeletonengine.py View on Github external
def get_armature(self):
        if self.has_data:
            return algorithms.get_object_by_name(self.armature_name)
github calben / EasyBastioniLAB / proxyengine.py View on Github external
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]
github calben / EasyBastioniLAB / skeletonengine.py View on Github external
def get_body(self):
        if self.has_data:
            return algorithms.get_object_by_name(self.body_name)