AlanW Posted August 17, 2016 Share Posted August 17, 2016 Hi, What is the correct string path to import an image with the Marionette node? See attached Quote Link to comment
Patrick Winkler Posted August 17, 2016 Share Posted August 17, 2016 Alan, you tried to use the path as point for the image import function def RunNode(self): #import os importPt_ = self.Params.importPt.value # Changed GetFile by GetFileN succes, fileName = vs.GetFileN('???', None, None) if succes: #fullReadPath, fullWritePath, readFileExists, writeFileExists, locked, hasReadPermission, hasWritePermission, hasFolderPermission = vs.GetFileInfo(fileName) #name, ext = os.path.splitext( fileName ) #if ext.lower() == '.png' or ext.lower() == '.jpg': #imagePath = os.path.join( fullReadPath, fileName ) hImage = vs.ImportImageFile( fileName, importPt_ ) # This line should be within the if block otherwise you could return the wrong object! self.Params.hImage.value = hImage Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.