Show Menu
TOPICS×

s7vampy.create_vignette(image)

Creates a new vignette with a view defined by the given view image.
Parameters:
View image associated with the initial vignette view.
Returns:
Vignette instance
The vignette contains a background object that masks the entire vignette view.
A vignette needs at least one illumination map, or the vignette cannot be saved.
Create a minimal vignette:
>>> from s7vampy import *
>>> v = create_vignette(open_image("view.png"))
>>> v.view.illum[0] = open_image("illum.png"))
>>> v.save("minimal.vnt")

Create a vignette with one group and one object:
>>> from s7vampy import *
>>> v = create_vignette(open_image("view.png"))
>>> v.view.illum[0] = open_image("illum.png"))
>>> group = v.objects.add_group("group")
>>> group.add_nontexturable_object("object", open_image("object-mask.png"))
>>> v.save("nontexturable.vnt")