Switch Mapping of Images in Vue Materials

Four python scripts for Vue that switch between the four mapping modes for images: none, bilinear, normalize and bicubic. Select the objects you want to switch the mapping of the image on and then run the appropriate script to change the image mapping in Vue.

Download: Switch Image Mapping 0.2 (3k Zip Archive)

Python Code – Switch Mapping to Bicubic

  1. #******************************************************
  2. # Switch the mapping mode of images in selected
  3. # object's materials to bicubic mapping
  4. #
  5. # - switchmapping.py
  6. # - By Mark Caldwell
  7. # - Version 0.2
  8. # - Version 0.2 16th August 2009
  9. # - Copyright Mark Caldwell 2009
  10. # - Tested with Vue 7.5 Infinite
  11. #
  12. # How to use in 3 easy steps
  13. #
  14. # 1. Download this file onto your computer
  15. #
  16. # 2. Select Objects to have the mapping of images in
  17. # materials changed to bicubic
  18. #
  19. # 3. Then run script and wait for it to work
  20. # To run it go to Python -> Run Python Script
  21. # Then locate the file on your computer
  22. #
  23. #******************************************************
  24.  
  25. #----------------------------------------------
  26. # Internal Variables Set Up: Don't alter these
  27. #----------------------------------------------
  28.  
  29. countobj=CountSelectedObjects()
  30.  
  31. #----------------------------------------------
  32. # Find Selected Objects and switch mapping
  33. #----------------------------------------------
  34. if countobj>0:
  35. for i in range(0,countobj):
  36. obj=GetSelectedObjectByIndex(i)
  37. countmaterial=obj.CountMaterials ()
  38. for j in range (0,countmaterial):
  39. material=obj.Material (j)
  40. functiongraph=material.FunctionGraph ()
  41. countnodes=functiongraph.CountNodes()
  42. for k in range (0,countnodes):
  43. nodename=functiongraph.NodeName (k)
  44. if nodename=='Projected Texture Map':
  45. countnodeparams=functiongraph.CountNodeParameters (k)
  46. for l in range (0,countnodeparams):
  47. if functiongraph.GetNodeParameterName (k,l)=='Interpolation type':
  48. functiongraph.SetNodeParameter (k,l,3)
  49.  
  50. #----------------------------------------------
  51. # Refresh Vue's Display
  52. #----------------------------------------------
  53.  
  54. Refresh()
  55.  
  56. #----------------------------------------------
  57. # End of Script
  58. #----------------------------------------------

Python Code – Switch Mapping to Bilinear

  1. #******************************************************
  2. # Switch the mapping mode of images in selected
  3. # object's materials to bicubic mapping
  4. #
  5. # - switchmapping.py
  6. # - By Mark Caldwell
  7. # - Version 0.2
  8. # - Version 0.2 16th August 2009
  9. # - Copyright Mark Caldwell 2009
  10. # - Tested with Vue 7.5 Infinite
  11. #
  12. # How to use in 3 easy steps
  13. #
  14. # 1. Download this file onto your computer
  15. #
  16. # 2. Select Objects to have the mapping of images in
  17. # materials changed to bicubic
  18. #
  19. # 3. Then run script and wait for it to work
  20. # To run it go to Python -> Run Python Script
  21. # Then locate the file on your computer
  22. #
  23. #******************************************************
  24.  
  25. #----------------------------------------------
  26. # Internal Variables Set Up: Don't alter these
  27. #----------------------------------------------
  28.  
  29. countobj=CountSelectedObjects()
  30.  
  31. #----------------------------------------------
  32. # Find Selected Objects and switch mapping
  33. #----------------------------------------------
  34. if countobj>0:
  35. for i in range(0,countobj):
  36. obj=GetSelectedObjectByIndex(i)
  37. countmaterial=obj.CountMaterials ()
  38. for j in range (0,countmaterial):
  39. material=obj.Material (j)
  40. functiongraph=material.FunctionGraph ()
  41. countnodes=functiongraph.CountNodes()
  42. for k in range (0,countnodes):
  43. nodename=functiongraph.NodeName (k)
  44. if nodename=='Projected Texture Map':
  45. countnodeparams=functiongraph.CountNodeParameters (k)
  46. for l in range (0,countnodeparams):
  47. if functiongraph.GetNodeParameterName (k,l)=='Interpolation type':
  48. functiongraph.SetNodeParameter (k,l,3)
  49.  
  50. #----------------------------------------------
  51. # Refresh Vue's Display
  52. #----------------------------------------------
  53.  
  54. Refresh()
  55.  
  56. #----------------------------------------------
  57. # End of Script
  58. #----------------------------------------------

Python Code – Switch Mapping to None

  1. #******************************************************
  2. # Switch the mapping mode of images in selected
  3. # object's materials to bicubic mapping
  4. #
  5. # - switchmapping.py
  6. # - Switch the mapping mode of images in selected
  7. # - object's materials to bicubic mapping
  8. # - By Mark Caldwell
  9. # - Version 0.2
  10. # - Version 0.2 16th August 2009
  11. # - Copyright Mark Caldwell 2009
  12. # - Tested with Vue 7.5 Infinite
  13. #
  14. # How to use in 3 easy steps
  15. #
  16. # 1. Download this file onto your computer
  17. #
  18. # 2. Select Objects to have the mapping of images in
  19. # materials changed to bicubic
  20. #
  21. # 3. Then run script and wait for it to work
  22. # To run it go to Python -> Run Python Script
  23. # Then locate the file on your computer
  24. #
  25. #******************************************************
  26.  
  27. #----------------------------------------------
  28. # Internal Variables Set Up: Don't alter these
  29. #----------------------------------------------
  30.  
  31. countobj=CountSelectedObjects()
  32.  
  33. #----------------------------------------------
  34. # Find Selected Objects and switch mapping
  35. #----------------------------------------------
  36. if countobj>0:
  37. for i in range(0,countobj):
  38. obj=GetSelectedObjectByIndex(i)
  39. countmaterial=obj.CountMaterials ()
  40. for j in range (0,countmaterial):
  41. material=obj.Material (j)
  42. functiongraph=material.FunctionGraph ()
  43. countnodes=functiongraph.CountNodes()
  44. for k in range (0,countnodes):
  45. nodename=functiongraph.NodeName (k)
  46. if nodename=='Projected Texture Map':
  47. countnodeparams=functiongraph.CountNodeParameters (k)
  48. for l in range (0,countnodeparams):
  49. if functiongraph.GetNodeParameterName (k,l)=='Interpolation type':
  50. functiongraph.SetNodeParameter (k,l,0)
  51.  
  52. #----------------------------------------------
  53. # Refresh Vue's Display
  54. #----------------------------------------------
  55.  
  56. Refresh()
  57.  
  58. #----------------------------------------------
  59. # End of Script
  60. #----------------------------------------------

Python Code – Switch Mapping to Normalize

  1. #******************************************************
  2. # Switch the mapping mode of images in selected
  3. # object's materials to normalized mapping
  4. #
  5. # - switchmappingnormalized.py
  6. # - By Mark Caldwell
  7. # - Version 0.2
  8. # - Version 0.2 16th August 2009
  9. # - Copyright Mark Caldwell 2009
  10. # - Tested with Vue 7.5 Infinite
  11. #
  12. # How to use in 3 easy steps
  13. #
  14. # 1. Download this file onto your computer
  15. #
  16. # 2. Select Objects to have the mapping of images in
  17. # materials changed to normalized
  18. #
  19. # 3. Then run script and wait for it to work
  20. # To run it go to Python -> Run Python Script
  21. # Then locate the file on your computer
  22. #
  23. #******************************************************
  24.  
  25. #----------------------------------------------
  26. # Internal Variables Set Up: Don't alter these
  27. #----------------------------------------------
  28.  
  29. countobj=CountSelectedObjects()
  30.  
  31. #----------------------------------------------
  32. # Find Selected Objects and switch mapping
  33. #----------------------------------------------
  34. if countobj>0:
  35. for i in range(0,countobj):
  36. obj=GetSelectedObjectByIndex(i)
  37. countmaterial=obj.CountMaterials ()
  38. for j in range (0,countmaterial):
  39. material=obj.Material (j)
  40. functiongraph=material.FunctionGraph ()
  41. countnodes=functiongraph.CountNodes()
  42. for k in range (0,countnodes):
  43. nodename=functiongraph.NodeName (k)
  44. if nodename=='Projected Texture Map':
  45. countnodeparams=functiongraph.CountNodeParameters (k)
  46. for l in range (0,countnodeparams):
  47. if functiongraph.GetNodeParameterName (k,l)=='Interpolation type':
  48. functiongraph.SetNodeParameter (k,l,2)
  49.  
  50. #----------------------------------------------
  51. # Refresh Vue's Display
  52. #----------------------------------------------
  53.  
  54. Refresh()
  55.  
  56. #----------------------------------------------
  57. # End of Script
  58. #----------------------------------------------