Add "preview" to image plane representations

This commit is contained in:
Toke Stuart Jepsen 2020-08-25 08:35:09 +01:00
parent c2a0325be2
commit b648b3c72e

View file

@ -12,7 +12,7 @@ class ImagePlaneLoader(api.Loader):
families = ["plate", "render"]
label = "Create imagePlane on selected camera."
representations = ["mov", "exr"]
representations = ["mov", "exr", "preview"]
icon = "image"
color = "orange"
@ -83,7 +83,8 @@ class ImagePlaneLoader(api.Loader):
image_plane_shape.frameOut.set(end_frame)
image_plane_shape.useFrameExtension.set(1)
if context["representation"]["name"] == "mov":
movie_representations = ["mov", "preview"]
if context["representation"]["name"] in movie_representations:
# Need to get "type" by string, because its a method as well.
pc.Attribute(image_plane_shape + ".type").set(2)