Skip to content

create_pointcache

Create a pointcache asset.

CreatePointcache

Bases: BlenderCreator

Polygonal static geometry.

Source code in client/ayon_blender/plugins/create/create_pointcache.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
class CreatePointcache(plugin.BlenderCreator):
    """Polygonal static geometry."""

    identifier = "io.openpype.creators.blender.pointcache"
    label = "Point Cache"
    product_type = "pointcache"
    icon = "gears"

    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"):
            objects = lib.get_selection()
            for obj in objects:
                collection.objects.link(obj)
                if obj.type == 'EMPTY':
                    objects.extend(obj.children)

        return collection

    def get_instance_attr_defs(self):
        defs = lib.collect_animation_defs(self.create_context,
                                          step=False)

        return defs