How to Automatically Relink Textures in Maya

Поділитися
Вставка
  • Опубліковано 28 лис 2024

КОМЕНТАРІ • 51

  • @legcdesign
    @legcdesign Рік тому +2

    Hi, to fix the issue with the Path Genie, just change the print statement. For example in line 33 change "print currentControls" to "print(currentControls)". Maya changed from python 2 to python 3.

    • @OnMars3D
      @OnMars3D  Рік тому +2

      That was it! Thank you for the fix!

    • @mahammadul
      @mahammadul 3 місяці тому

      import maya.cmds as cmds
      import maya.mel as mel
      import os
      defaultSearchPath = "C:/"
      version = 1.0
      windowWidth = 550
      pathStrHeight = 25
      colorPatternPass = [(.2,.25,.2),(.25,.3,.25)]
      colorPatternFail = [(.25,.2,.2),(.3,.25,.25)]
      passColor = [.2,.5,.2]
      failColor = [.5,.2,.2]
      progressBarName = "searching"
      if(cmds.window('texFix_Window', q=1, ex=1)):
      cmds.deleteUI('texFix_Window')
      if(cmds.windowPref('texFix_Window', q=1, ex=1)):
      cmds.windowPref('texFix_Window', r=1)
      global fileTextures
      fileTextures = cmds.ls(typ="file")
      def populatePathList(*args):
      global fileTextures
      fileTextures = cmds.ls(typ="file")
      currentControls = []
      try:
      currentControls = cmds.columnLayout("uiColWrapper2", q=1, ca=1)
      if(currentControls == None):
      currentControls = []
      print currentControls
      except:
      pass
      if(len(currentControls) > 0):
      for control in currentControls:
      cmds.deleteUI( control, control=True )
      cmds.refresh()
      tmpColorPatListPass = colorPatternPass
      tmpColorPatListFail = colorPatternFail
      rowLayOutCount = 0
      for tex in fileTextures:
      queryPath = cmds.getAttr("%s.fileTextureName"%(tex))
      initResultPre = os.path.exists(queryPath)
      cmds.rowLayout('_%i_rowLayout'%(rowLayOutCount), nc=2, cw2=[(int(windowWidth * .8)),(int(windowWidth * .2))], adj=1, p="uiColWrapper2")
      if(initResultPre == True):
      cmds.text("%s"%(tex), l = "%s"%(queryPath),al="left", bgc=tmpColorPatListPass[0], w=(int(windowWidth * .5)), h=pathStrHeight, p = '_%i_rowLayout'%(rowLayOutCount))
      elif(initResultPre == False):
      cmds.text("%s"%(tex), l = "%s"%(queryPath),al="left", bgc=tmpColorPatListFail[0], w=(int(windowWidth * .5)), h=pathStrHeight, p = '_%i_rowLayout'%(rowLayOutCount))
      cmds.button('_%i_texSelectButton'%(rowLayOutCount), l="%s"%(tex), w=(int(windowWidth * .4)), c='cmds.select("%s")'%(tex), p='_%i_rowLayout'%(rowLayOutCount))

      tmpColorPass = tmpColorPatListPass[0]
      del tmpColorPatListPass[0]
      tmpColorPatListPass.append(tmpColorPass)
      tmpColorFail = tmpColorPatListFail[0]
      del tmpColorPatListFail[0]
      tmpColorPatListFail.append(tmpColorFail)
      rowLayOutCount += 1
      cmds.button("StartTextureSearch", e=1, en=1)
      def resourceAllTextures(*args):
      orphanSearchPath = cmds.textFieldButtonGrp('Dir', q=1, text=1)
      widgetQueryListPre = cmds.columnLayout("uiColWrapper2", q=1, ca=1)
      widgetCount = 0
      widgetQueryList = []
      for f in widgetQueryListPre:
      try:
      rowLayoutList = cmds.rowLayout("%s"%(f), q=1, ca=1)
      except:
      rowLayoutList = []
      if(len(rowLayoutList) != 0):
      for x in rowLayoutList:
      if(x[0] != "_"):
      widgetQueryList.append(x)
      widgetCount = len(widgetQueryList)
      commonLocations = []
      for tex in widgetQueryList:
      queryPath = cmds.getAttr("%s.fileTextureName"%(tex))
      initResult = os.path.exists(queryPath)
      queryPath = queryPath.replace("\\","/")
      splitPath = queryPath.split("/")
      searchFile = splitPath[-1]
      lostOrFound = 0
      if((initResult != True) and (len(commonLocations) != 0)):
      for commonLoc in commonLocations:
      formattedTestPath0 = commonLoc.replace("\\","/")
      formattedTestPath1 = formattedTestPath0[::-1]
      formattedTestPath2 = formattedTestPath1.split("/", 1)[-1]
      formattedTestPath3 = formattedTestPath2[::-1]
      commonPathResult = os.path.exists("%s/%s"%(formattedTestPath3,searchFile))
      if(commonPathResult == True):
      resolvedPath = "%s/%s"%(formattedTestPath3,searchFile)
      resolvedPath = resolvedPath.replace("/","\\")
      cmds.text("%s"%(tex), e=1, bgc=passColor)
      cmds.text("%s"%(tex), e=1, l=resolvedPath)
      cmds.setAttr("%s.fileTextureName"%(tex), resolvedPath, type="string")
      lostOrFound = 1
      elif((initResult != True) and (len(commonLocations) == 0) and (lostOrFound == 0)):
      searchCount = 0
      for (path) in os.walk(orphanSearchPath):
      searchCount += 1
      resolvedPath = queryPath
      cmds.text("%s"%(tex), e=1, bgc=failColor)
      print "resourcing %s"%(tex)
      makeProgressBar(progressBarName, searchCount)
      for (path, dirs, files) in os.walk(orphanSearchPath):
      print "searching in path: %s"%(path)
      moveProgressBar(progressBarName, 1)
      path = path.replace("/","\\")
      if(searchFile in files):
      resolvedPath = "%s\\%s"%(path, searchFile)
      resolvedPath = resolvedPath.replace("/","\\")
      commonLocations.append(resolvedPath)
      lostOrFound = 1
      cmds.text("%s"%(tex), e=1, bgc=passColor)
      cmds.text("%s"%(tex), e=1, l=resolvedPath)
      resolvedPath = resolvedPath.replace("/","\\")
      cmds.setAttr("%s.fileTextureName"%(tex), resolvedPath, type="string")
      else:
      pass
      cmds.text("%s"%(tex), e=1, bgc=passColor)
      killProgressWindow(progressBarName)
      cmds.setFocus("texFix_Window")
      cmds.scrollLayout("scrollLayout", e=1, sbp=["down", 25])
      cmds.refresh()
      def browseIt():
      searchPathRaw = cmds.fileDialog2(fm=2, cap="Browse for a directory to search within..", dir=defaultSearchPath, okc="Choose Directory", dialogStyle=2)
      searchPath = searchPathRaw[0].replace("/", "\\")
      if(len(searchPath) == 2 and searchPath[-1] == ":"):
      searchPath = searchPath + "\\"
      cmds.textFieldButtonGrp('Dir', e=1, text=searchPath)
      return 1
      def makeProgressBar(name, maxVal):
      if(cmds.window("%s"%(name), q=1, ex=1)):
      cmds.deleteUI("%s"%(name))
      if(cmds.windowPref("%s"%(name), q=1, ex=1)):
      cmds.windowPref("%s"%(name), r=1)
      progWindow = cmds.window("%s"%(name), title="%s Progress Window"%(name), widthHeight=(300, 50))
      cmds.columnLayout("%s_colLayout", p="%s"%(name))
      progressControl = cmds.progressBar("%s_Progress"%(name), maxValue=maxVal, width=300, height=50)
      cmds.showWindow( progWindow )
      def moveProgressBar(name, stepSize):
      cmds.progressBar("%s_Progress"%(name), edit=True, step=stepSize)
      def killProgressWindow(name):
      if(cmds.window("%s"%(name), q=1, ex=1)):
      cmds.deleteUI("%s"%(name))
      if(cmds.windowPref("%s"%(name), q=1, ex=1)):
      cmds.windowPref("%s"%(name), r=1)
      def makeGui():
      texFix_Window = cmds.window('texFix_Window', title="Texture Search/Source Tool - V%s"%(version), iconName='texFix_Window', widthHeight=(windowWidth+15, 400) )

      scrollLayout = cmds.scrollLayout("scrollLayout", w=windowWidth, cr=1, p="texFix_Window" )

      cmds.columnLayout('uiColWrapper', w = (windowWidth - 10), adj=1, adjustableColumn=True, p="scrollLayout")

      cmds.text(l = "Automatic 1-click texture resource tool", bgc=[1,1,1], p = 'uiColWrapper')
      cmds.separator( height=10, style='double', p = 'uiColWrapper')

      cmds.textFieldButtonGrp('Dir', label="Root path for search", ad3=2 , cw3 = [105,380,50], text=defaultSearchPath, buttonLabel='browse', buttonCommand=browseIt, parent = 'uiColWrapper')
      cmds.button('populateResultArea', l = "-Display Texture Paths-", bgc = [.35, .35, .35], h=40, c = populatePathList, parent = 'uiColWrapper' )
      cmds.button('StartTextureSearch', l = "-Fix Texture Paths-", bgc = [.35, .6, .35], h=40, en=0, c = resourceAllTextures, parent = 'uiColWrapper' )

      cmds.separator( height=10, style='double', p = 'uiColWrapper')

      cmds.columnLayout('uiColWrapper2', w = (windowWidth - 10), adjustableColumn=True, p="scrollLayout")


      cmds.showWindow( texFix_Window )
      makeGui()

    • @mahammadul
      @mahammadul 3 місяці тому

      import maya.cmds as cmds
      import maya.mel as mel
      import os
      defaultSearchPath = "C:/"
      version = 1.0
      windowWidth = 550
      pathStrHeight = 25
      colorPatternPass = [(.2,.25,.2),(.25,.3,.25)]
      colorPatternFail = [(.25,.2,.2),(.3,.25,.25)]
      passColor = [.2,.5,.2]
      failColor = [.5,.2,.2]
      progressBarName = "searching"
      if(cmds.window('texFix_Window', q=1, ex=1)):
      cmds.deleteUI('texFix_Window')
      if(cmds.windowPref('texFix_Window', q=1, ex=1)):
      cmds.windowPref('texFix_Window', r=1)
      global fileTextures
      fileTextures = cmds.ls(typ="file")
      def populatePathList(*args):
      global fileTextures
      fileTextures = cmds.ls(typ="file")
      currentControls = []
      try:
      currentControls = cmds.columnLayout("uiColWrapper2", q=1, ca=1)
      if(currentControls == None):
      currentControls = []
      print(currentControls)
      except:
      pass
      if(len(currentControls) > 0):
      for control in currentControls:
      cmds.deleteUI( control, control=True )
      cmds.refresh()
      tmpColorPatListPass = colorPatternPass
      tmpColorPatListFail = colorPatternFail
      rowLayOutCount = 0
      for tex in fileTextures:
      queryPath = cmds.getAttr("%s.fileTextureName"%(tex))
      initResultPre = os.path.exists(queryPath)
      cmds.rowLayout('_%i_rowLayout'%(rowLayOutCount), nc=2, cw2=[(int(windowWidth * .8)),(int(windowWidth * .2))], adj=1, p="uiColWrapper2")
      if(initResultPre == True):
      cmds.text("%s"%(tex), l = "%s"%(queryPath),al="left", bgc=tmpColorPatListPass[0], w=(int(windowWidth * .5)), h=pathStrHeight, p = '_%i_rowLayout'%(rowLayOutCount))
      elif(initResultPre == False):
      cmds.text("%s"%(tex), l = "%s"%(queryPath),al="left", bgc=tmpColorPatListFail[0], w=(int(windowWidth * .5)), h=pathStrHeight, p = '_%i_rowLayout'%(rowLayOutCount))
      cmds.button('_%i_texSelectButton'%(rowLayOutCount), l="%s"%(tex), w=(int(windowWidth * .4)), c='cmds.select("%s")'%(tex), p='_%i_rowLayout'%(rowLayOutCount))

      tmpColorPass = tmpColorPatListPass[0]
      del tmpColorPatListPass[0]
      tmpColorPatListPass.append(tmpColorPass)
      tmpColorFail = tmpColorPatListFail[0]
      del tmpColorPatListFail[0]
      tmpColorPatListFail.append(tmpColorFail)
      rowLayOutCount += 1
      cmds.button("StartTextureSearch", e=1, en=1)
      def resourceAllTextures(*args):
      orphanSearchPath = cmds.textFieldButtonGrp('Dir', q=1, text=1)
      widgetQueryListPre = cmds.columnLayout("uiColWrapper2", q=1, ca=1)
      widgetCount = 0
      widgetQueryList = []
      for f in widgetQueryListPre:
      try:
      rowLayoutList = cmds.rowLayout("%s"%(f), q=1, ca=1)
      except:
      rowLayoutList = []
      if(len(rowLayoutList) != 0):
      for x in rowLayoutList:
      if(x[0] != "_"):
      widgetQueryList.append(x)
      widgetCount = len(widgetQueryList)
      commonLocations = []
      for tex in widgetQueryList:
      queryPath = cmds.getAttr("%s.fileTextureName"%(tex))
      initResult = os.path.exists(queryPath)
      queryPath = queryPath.replace("\\","/")
      splitPath = queryPath.split("/")
      searchFile = splitPath[-1]
      lostOrFound = 0
      if((initResult != True) and (len(commonLocations) != 0)):
      for commonLoc in commonLocations:
      formattedTestPath0 = commonLoc.replace("\\","/")
      formattedTestPath1 = formattedTestPath0[::-1]
      formattedTestPath2 = formattedTestPath1.split("/", 1)[-1]
      formattedTestPath3 = formattedTestPath2[::-1]
      commonPathResult = os.path.exists("%s/%s"%(formattedTestPath3,searchFile))
      if(commonPathResult == True):
      resolvedPath = "%s/%s"%(formattedTestPath3,searchFile)
      resolvedPath = resolvedPath.replace("/","\\")
      cmds.text("%s"%(tex), e=1, bgc=passColor)
      cmds.text("%s"%(tex), e=1, l=resolvedPath)
      cmds.setAttr("%s.fileTextureName"%(tex), resolvedPath, type="string")
      lostOrFound = 1
      elif((initResult != True) and (len(commonLocations) == 0) and (lostOrFound == 0)):
      searchCount = 0
      for (path) in os.walk(orphanSearchPath):
      searchCount += 1
      resolvedPath = queryPath
      cmds.text("%s"%(tex), e=1, bgc=failColor)
      print("resourcing %s"%(tex))
      makeProgressBar(progressBarName, searchCount)
      for (path, dirs, files) in os.walk(orphanSearchPath):
      print("searching in path: %s"%(path))
      moveProgressBar(progressBarName, 1)
      path = path.replace("/","\\")
      if(searchFile in files):
      resolvedPath = "%s\\%s"%(path, searchFile)
      resolvedPath = resolvedPath.replace("/","\\")
      commonLocations.append(resolvedPath)
      lostOrFound = 1
      cmds.text("%s"%(tex), e=1, bgc=passColor)
      cmds.text("%s"%(tex), e=1, l=resolvedPath)
      resolvedPath = resolvedPath.replace("/","\\")
      cmds.setAttr("%s.fileTextureName"%(tex), resolvedPath, type="string")
      else:
      pass
      cmds.text("%s"%(tex), e=1, bgc=passColor)
      killProgressWindow(progressBarName)
      cmds.setFocus("texFix_Window")
      cmds.scrollLayout("scrollLayout", e=1, sbp=["down", 25])
      cmds.refresh()
      def browseIt():
      searchPathRaw = cmds.fileDialog2(fm=2, cap="Browse for a directory to search within..", dir=defaultSearchPath, okc="Choose Directory", dialogStyle=2)
      searchPath = searchPathRaw[0].replace("/", "\\")
      if(len(searchPath) == 2 and searchPath[-1] == ":"):
      searchPath = searchPath + "\\"
      cmds.textFieldButtonGrp('Dir', e=1, text=searchPath)
      return 1
      def makeProgressBar(name, maxVal):
      if(cmds.window("%s"%(name), q=1, ex=1)):
      cmds.deleteUI("%s"%(name))
      if(cmds.windowPref("%s"%(name), q=1, ex=1)):
      cmds.windowPref("%s"%(name), r=1)
      progWindow = cmds.window("%s"%(name), title="%s Progress Window"%(name), widthHeight=(300, 50))
      cmds.columnLayout("%s_colLayout", p="%s"%(name))
      progressControl = cmds.progressBar("%s_Progress"%(name), maxValue=maxVal, width=300, height=50)
      cmds.showWindow( progWindow )
      def moveProgressBar(name, stepSize):
      cmds.progressBar("%s_Progress"%(name), edit=True, step=stepSize)
      def killProgressWindow(name):
      if(cmds.window("%s"%(name), q=1, ex=1)):
      cmds.deleteUI("%s"%(name))
      if(cmds.windowPref("%s"%(name), q=1, ex=1)):
      cmds.windowPref("%s"%(name), r=1)
      def makeGui():
      texFix_Window = cmds.window('texFix_Window', title="Texture Search/Source Tool - V%s"%(version), iconName='texFix_Window', widthHeight=(windowWidth+15, 400) )

      scrollLayout = cmds.scrollLayout("scrollLayout", w=windowWidth, cr=1, p="texFix_Window" )

      cmds.columnLayout('uiColWrapper', w = (windowWidth - 10), adj=1, adjustableColumn=True, p="scrollLayout")

      cmds.text(l = "Automatic 1-click texture resource tool", bgc=[1,1,1], p = 'uiColWrapper')
      cmds.separator( height=10, style='double', p = 'uiColWrapper')

      cmds.textFieldButtonGrp('Dir', label="Root path for search", ad3=2 , cw3 = [105,380,50], text=defaultSearchPath, buttonLabel='browse', buttonCommand=browseIt, parent = 'uiColWrapper')
      cmds.button('populateResultArea', l = "-Display Texture Paths-", bgc = [.35, .35, .35], h=40, c = populatePathList, parent = 'uiColWrapper' )
      cmds.button('StartTextureSearch', l = "-Fix Texture Paths-", bgc = [.35, .6, .35], h=40, en=0, c = resourceAllTextures, parent = 'uiColWrapper' )

      cmds.separator( height=10, style='double', p = 'uiColWrapper')

      cmds.columnLayout('uiColWrapper2', w = (windowWidth - 10), adjustableColumn=True, p="scrollLayout")


      cmds.showWindow( texFix_Window )
      makeGui()

    • @mahammadul
      @mahammadul 3 місяці тому +2

      I have updated and pasted the updated script for py 3

  • @juanangulo555
    @juanangulo555 Місяць тому

    this was so helpful. saved me a lot of time. I was going to reconnect everything by hand before I watched this.

  • @whyudoths1993
    @whyudoths1993 Рік тому

    Thanks so much for this mate! I was facing a huge folder organization and was procrastinating cause of these texture files. I knew of method 1 but method 2 saved my bacon! So much time and headache saved!

  • @Siloquid
    @Siloquid Рік тому

    The repath files worked with Arnold to put textures on a character

  • @hunglc4094
    @hunglc4094 Рік тому

    So many wasted hours of constantly clicking Reload...Thank you so much for this!

  • @irfanirz7510
    @irfanirz7510 11 місяців тому

    Sir we can use this method for this eg : i have probelm when i copied my maya files with project folder and i opened tbis file on another laptop but i cant see the textures

  • @uniksty
    @uniksty 3 роки тому +3

    Hello I have simple question...
    is it ok to uv Unwrap after detailing and completing all my work in zbrush ....
    Or i have to do uv Unwrap befor detailing

    • @OnMars3D
      @OnMars3D  3 роки тому +2

      As long as you unwrap the low poly models before texture baking, that's all that matters.

    • @uniksty
      @uniksty 3 роки тому

      Thanks 😊

  • @antarasengupta9000
    @antarasengupta9000 Рік тому

    hi how can i compress the files along with textures to sent to someone else? thank you for the video

  • @gubkabob8721
    @gubkabob8721 Рік тому

    Maya has a vray renderer?

  • @mertsoybas3202
    @mertsoybas3202 Рік тому

    My custom textures link to my pc's sourceimages folder for example(C:disk/Users/PC/Documents/maya/projects/My_Project_Folder_Name_Sourceimages/texture_name/) If I want to send my project to someone elese they are cant open my project correctly.How can ı fix that ?

  • @ASLarshdeep
    @ASLarshdeep 2 роки тому

    Thank you so much 💗

  • @GENIUSGT
    @GENIUSGT 10 місяців тому

    Note to future self: This is probably what you're looking for 3:41

  • @studentnr63
    @studentnr63 Рік тому

    Thank you so much

  • @dibohenxo
    @dibohenxo 2 роки тому

    Thank you so much you just saved me so much time at work :D !

  • @jeffgaming
    @jeffgaming 4 місяці тому

    thanks it worked for the repath but for the cosmos tree plants for vray i have to relink the Vmesh manually.. thogh i have kept them all in one folder.. but again save much time in case of texture relink.. thanks again.

    • @OnMars3D
      @OnMars3D  4 місяці тому

      Glad it helped!

  • @Aditya90sKZ
    @Aditya90sKZ 2 роки тому

    There's a FileTextureManager Script as well. But in that i can't convert the texture images to tx. Is there a newer version of it, that has updated that feature as well?

  • @boonyisaratchatasuwan520
    @boonyisaratchatasuwan520 Рік тому

    thank you. It's very helpful for me.😊

  • @Pugituppugitup
    @Pugituppugitup Рік тому

    Thank you so much!

  • @rororules9198
    @rororules9198 8 місяців тому

    THANK YOU!!!!

  • @zakrts1263
    @zakrts1263 Рік тому

    thanks you man

  • @ericbruunk9120
    @ericbruunk9120 Рік тому

    thank you very much sir, you are lifesaving

  • @dong1222
    @dong1222 10 місяців тому

    The download link is broken now. Where can I get the script for Texture path Genie?

  • @WhisperPass
    @WhisperPass 3 роки тому

    Always helpful, Thanks!

  • @ronydey2696
    @ronydey2696 2 роки тому

    something informative sir thanks always

  • @ImJustJAG
    @ImJustJAG 3 роки тому +1

    I've been trying to fix this problem and tried multiple things but nothing ever worked. Probably need to redo the way I organize my files on the Desktop but I don't know the right/correct way to set that up.
    "Set project" didn't work for me, renaming the path to the file where my textures/images were located didn't work, couldn't find any scripts online either.

    • @OnMars3D
      @OnMars3D  3 роки тому

      If scripts and set project didn't work, I'd start with file organization first. Also, don't start folder names with numbers, I've noticed Maya has issues with that sometimes.

  • @mohammadrazakhan3852
    @mohammadrazakhan3852 3 роки тому +1

    Great tutorial very helpful keep it up.
    I have a question regarding rendering Turntable with maya and Vray 5. Is the process same as we used to do with arnold ? Do i need to use batchrender or sequence render

    • @OnMars3D
      @OnMars3D  3 роки тому

      Maya and V-Ray supports both the batch render and sequence render with V-Ray 5, so it would be up to you based on your preference.

  • @yarosyari3516
    @yarosyari3516 Рік тому

    do u know why my model is filled by color instead my texture map? yes I have the uv

  • @vokaynit
    @vokaynit 3 роки тому

    Man, thanks

  • @ferizsolnai
    @ferizsolnai 2 роки тому +1

    The 1Click Text Path Genie gives a syntax error, and the other script says "cannot find procedure". Does anyone have a fix for one or the other? (using Maya 2022.3)

    • @OnMars3D
      @OnMars3D  2 роки тому

      Maya 2022 updated to Python 3.0 so all older scripts need to be updated, hopefully my other methods helped you out.

    • @ferizsolnai
      @ferizsolnai 2 роки тому

      @@OnMars3D they have, thank you. Let's hope whoever created these scripts will update them soon.

    • @speckleBo
      @speckleBo 2 роки тому

      Hi, I made a little script that should automatically update textures in real-time. It's not ideal and it might eat up a bit of ram but it gets the job done especially if you were trying to do something like hand-painted textures in photoshop and use maya as a viewer( like i was). I hope this helps!
      Just save as a .mel, drop into Maya and then click start:
      //Update Textures function
      global proc reloadTexture()
      {
      string $files[] = `ls -type "file"`;
      for ( $file in $files )
      {
      string $fileName = `getAttr ( $file + ".fileTextureName" )`;
      setAttr ( $file + ".fileTextureName") -type "string" $fileName;
      }
      }
      global proc int onbuttonPressed(string $button, int $process)
      {
      int $isRun=`getAttr isRunningGroup.isRunAttr`;

      if ($isRun==0)
      {
      $processID = `scriptJob -e "idle" "reloadTexture" `;
      button -edit -label "Stop" $button;
      setAttr isRunningGroup.isRunAttr true;
      return 0;
      }
      else if ($isRun>0)
      {
      scriptJob -ka -force;
      button -edit -label "Start" $button;
      print("Stopped....");
      setAttr isRunningGroup.isRunAttr false;
      return 0;
      }
      return 0;
      }
      global proc buildTextureReload()
      {
      window -width 200 -title "Texture Updater" ExampleWindow10;
      columnLayout;
      //define customNode(static variables)
      group -em -name "isRunningGroup";
      addAttr -ln "isRunAttr" -at bool ;
      setAttr isRunningGroup.isRunAttr false;
      // Create the button.
      global int $processID;
      global string $buttonA;
      $buttonA = `button -label "Start"`;
      global string $buttonCmd;
      $buttonCmd = "onbuttonPressed($buttonA,$processID)";
      button -edit -command $buttonCmd $buttonA;
      showWindow ExampleWindow10;
      }
      buildTextureReload;

  • @YanyanLun
    @YanyanLun 2 роки тому

    hi thanks for this tutorial. i got a question. if i downloaded two different character assets online for my own project, each of the asset got their own pacage/texture path. how should i make sure they all read their own textures in my new project(with both of the two characters in). is that possible to change the texture path permenantly?

    • @OnMars3D
      @OnMars3D  2 роки тому

      Yeah, just move all the textures into one folder and then use the File Path editor to change the texture location in your Maya project. That should fix it.

    • @YanyanLun
      @YanyanLun 2 роки тому

      @@OnMars3D thanks mate.