def projectUV(self): dstImg = projection.mapUV() # dstImg.resize(128, 128) dstImg.save(os.path.join(mh.getPath(""), "data", "skins", "uvtopo.png")) gui3d.app.selectedHuman.setTexture(os.path.join(mh.getPath(""), "data", "skins", "uvtopo.png")) log.debug("Enabling shadeless rendering on body") gui3d.app.selectedHuman.mesh.setShadeless(1) # Remember to reset this when lighting projection is done.
def export(self, human, filename): import projection dstImg = projection.mapUV() filepath = filename("png") dstImg.save(filepath) if self.uvmapDisplay: import log human.setTexture(filepath) log.message("Enabling shadeless rendering on body") human.mesh.setShadeless(True)
def projectUV(self): dstImg = projection.mapUV() #dstImg.resize(128, 128) texPath = mh.getPath('data/skins/uvtopo.png') if os.path.isfile(texPath): oldImg = mh.Image(texPath) else: oldImg = None gui3d.app.do( ProjectionAction("Change projected UV map texture", self.human.getTexture(), texPath, oldImg, dstImg)) log.debug("Enabling shadeless rendering on body") self.shadelessButton.setChecked(True) self.human.setShadeless(1) mh.redraw()
def projectUV(self): dstImg = projection.mapUV() #dstImg.resize(128, 128) texPath = os.path.join(mh.getPath(''), 'data', 'skins', 'uvtopo.png') if os.path.isfile(texPath): oldImg = mh.Image(texPath) else: oldImg = None gui3d.app.do(ProjectionAction("Change projected UV map texture", gui3d.app.selectedHuman.getTexture(), texPath, oldImg, dstImg)) log.debug("Enabling shadeless rendering on body") self.shadelessButton.setChecked(True) gui3d.app.selectedHuman.mesh.setShadeless(1)
def export(self, human, filename): import projection dstImg = projection.mapUV() filepath = filename("png") dstImg.save(filepath)