encode_watermark method

encode_watermark(, input, text)

Encode a text into mesh’ blind watermark.

Returns

A new mesh instance with blind watermark encoded


@staticmethod
def encode_watermark(input, text):
    ...
ParameterTypeDescription
inputaspose.threed.entities.MeshMesh to encode a blind watermark
textstrText to encode to the mesh

Remarks

Both Watermark.encode_watermark and Watermark.decode_watermark will perform license check Trial usage will throw exception, you can use TrialException.suppress_trial_exception to suppress the exception, but it will not lift the restriction here. A valid license is required to use these features without any restrictions.

Example

The following code shows how to encode a blind watermark into a mesh and save to ply file

from aspose.threed import Scene
from aspose.threed.entities import Cylinder
from aspose.threed.utilities import Watermark

mesh = Cylinder().to_mesh()
encodedMesh = Watermark.encode_watermark(mesh, "Hello")
Scene(encodedMesh).save("test.ply")

encode_watermark(, input, text, password)

Encode a text into mesh’ blind watermark.

Returns

A new mesh instance with blind watermark encoded


@staticmethod
def encode_watermark(input, text, password):
    ...
ParameterTypeDescription
inputaspose.threed.entities.MeshMesh to encode a blind watermark
textstrText to encode to the mesh
passwordstrPassword to protect the watermark, it’s optional

Remarks

Both Watermark.encode_watermark and Watermark.decode_watermark will perform license check Trial usage will throw exception, you can use TrialException.suppress_trial_exception to suppress the exception, but it will not lift the restriction here. A valid license is required to use these features without any restrictions.

Example

The following code shows how to encode a blind watermark into a mesh and save to ply file

from aspose.threed import Scene
from aspose.threed.entities import Cylinder
from aspose.threed.utilities import Watermark

mesh = Cylinder().to_mesh()
encodedMesh = Watermark.encode_watermark(mesh, "Hello", "password")
Scene(encodedMesh).save("test.ply")

encode_watermark(, input, text, password, permanent)

Encode a text into mesh’ blind watermark.

Returns

A new mesh instance with blind watermark encoded


@staticmethod
def encode_watermark(input, text, password, permanent):
    ...
ParameterTypeDescription
inputaspose.threed.entities.MeshMesh to encode a blind watermark
textstrText to encode to the mesh
passwordstrPassword to protect the watermark, it’s optional
permanentboolThe permanent watermark will not be overwritten or removed.

Remarks

Both Watermark.encode_watermark and Watermark.decode_watermark will perform license check Trial usage will throw exception, you can use TrialException.suppress_trial_exception to suppress the exception, but it will not lift the restriction here. A valid license is required to use these features without any restrictions.

Example

The following code shows how to encode a blind watermark into a mesh and save to ply file

from aspose.threed import Scene
from aspose.threed.entities import Cylinder
from aspose.threed.utilities import Watermark

mesh = Cylinder().to_mesh()
encodedMesh = Watermark.encode_watermark(mesh, "Hello", "password")
Scene(encodedMesh).save("test.ply")

See Also