1. #1
    Member Follow User Gallery
    Join Date
    Feb 2013
    Location
    UK
    Age
    40
    Posts
    59

    Question Import OBJ together with texture - Zscripting question

    Anyone better in zscripting than me can help me figure out how to import *.obj file together with *.psd texture ?
    obj and texture is in same folder they have same name and texture is always *.psd

    I think once i get path to *.obj basically i have path to texture just cant figure out how to change extension in path from *.obj to *.psd

    So far i mixed some scripts together added few lines of mine and it load obj after that it load texture onto imported model but i have to select texture when popup window ask for it...

    Thanks for any advice

    [EDIT]
    updated script
    Attached Files Attached Files

  2. #2
    Member Follow User Gallery
    Join Date
    Feb 2013
    Location
    UK
    Age
    40
    Posts
    59

    Lightbulb

    I have figured it out Yay!

    [IPress,Tool:import]
    [VarDef,subtoolPath,""]
    [VarSet, subtoolPath, [ToolGetPath]]
    [VarDef,texturePath,""]
    [VarSet, texturePath, [StrMerge, SubtoolPath, .psd]]//change extension to .psd
    [IPress,Tool:Texture Map:TextureMap]
    [FileNameSetNext,texturePath]
    [IPress,File:Texture:Import]
    [IPress,Tool:UV Map:Flip V]

    In first post you have attached macro in case someone find it usefull
    What it does it import obj file together with texture then flip UV coords vertically
    texture have to be in same folder and have same name as imported obj
    it's set to import *.psd textures but you can edit script and change it to any other you using most

    Thanks

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •