Skip to content

create_look

Create a Look asset.

CreateLook

Bases: BlenderCreator

Look output for character

Source code in client/ayon_blender/plugins/create/create_look.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class CreateLook(plugin.BlenderCreator):
    """Look output for character"""

    identifier = "io.ayon.creators.blender.look"
    label = "Look"
    description = __doc__
    product_base_type = "look"
    product_type = product_base_type
    icon = "male"

    def create(
        self, product_name: str, instance_data: dict, pre_create_data: dict
    ):
        # Run parent create method
        collection = super().create(
            product_name, instance_data, pre_create_data
        )
        if pre_create_data.get("use_selection"):
            for obj in lib.get_selection():
                if isinstance(obj, bpy.types.Object):
                    collection.objects.link(obj)

        return collection