Skip to content

create_vrayproxy

CreateVrayProxy

Bases: MayaCreator

Alembic pointcache for animated data

Source code in client/ayon_maya/plugins/create/create_vrayproxy.py
 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
class CreateVrayProxy(plugin.MayaCreator):
    """Alembic pointcache for animated data"""

    identifier = "io.openpype.creators.maya.vrayproxy"
    label = "VRay Proxy"
    product_type = "vrayproxy"
    icon = "gears"

    vrmesh = True
    alembic = True

    def get_instance_attr_defs(self):

        defs = [
            BoolDef("animation",
                    label="Export Animation",
                    default=False)
        ]

        # Add time range attributes but remove some attributes
        # which this instance actually doesn't use
        defs.extend(lib.collect_animation_defs(
            create_context=self.create_context))
        remove = {"handleStart", "handleEnd", "step"}
        defs = [attr_def for attr_def in defs if attr_def.key not in remove]

        defs.extend([
            BoolDef("vertexColors",
                    label="Write vertex colors",
                    tooltip="Write vertex colors with the geometry",
                    default=False),
            BoolDef("vrmesh",
                    label="Export VRayMesh",
                    tooltip="Publish a .vrmesh (VRayMesh) file for "
                            "this VRayProxy",
                    default=self.vrmesh),
            BoolDef("alembic",
                    label="Export Alembic",
                    tooltip="Publish a .abc (Alembic) file for "
                            "this VRayProxy",
                    default=self.alembic),
        ])

        return defs