Skip to main content
Participant
October 31, 2022

MeshMapUsage Normal issue

  • October 31, 2022
  • 1 reply
  • 191 views

Hi, 
I have a TypeError with 

usage = substance_painter.textureset.MeshMapUsage.Normal
or
usage = substance_painter.textureset.MeshMapUsage.Curvature

 when used in 

my_texture_set.get_mesh_map_resource(usage)

works well on other meshmapusage such as Position, Thickness, AO and others.

 like:

usage = substance_painter.textureset.MeshMapUsage.AO

or

usage = substance_painter.textureset.MeshMapUsage.Thickness

 

Not sure what is happenning there

 

[Python] get_mesh_map_resource(): incompatible function arguments. The following argument types are supported:
1. (texture_set_id: int, usage: _substance_painter.textureset.MeshMapUsage) -> str

Invoked with: 31947, Resource(handle=<_substance_painter.resource.ResourceHandle object at 0x0000028218B356B0>)

 

1 reply

Participant
November 2, 2022

I would add this raise an error

ressource_id = substance_painter.resource.ResourceID.from_project('texture_imported')
my_texture_set.set_mesh_map_resource(usage=usage, new_mesh_map=ressource_id)

[Python] ResourceNotFoundError

 However resource_id returns me the resource:
[Python] ResourceID(context='project3', name='texture_imported', version=None)

 

What I am missing there?