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
#******************************************************
# Switch the mapping mode of images in selected
# object's materials to bicubic mapping
#
# - switchmapping.py
# - By Mark Caldwell
# - Version 0.2
# - Version 0.2 16th August 2009
# - Copyright Mark Caldwell 2009
# - Tested with Vue 7.5 Infinite
#
# How to use in 3 easy steps
#
# 1. Download this file onto your computer
#
# 2. Select Objects to have the mapping of images in
# materials changed to bicubic
#
# 3. Then run script and wait for it to work
# To run it go to Python -> Run Python Script
# Then locate the file on your computer
#
#******************************************************
#----------------------------------------------
# Internal Variables Set Up: Don't alter these
#----------------------------------------------
countobj=CountSelectedObjects()
#----------------------------------------------
# Find Selected Objects and switch mapping
#----------------------------------------------
if countobj>0:
for i in range(0,countobj):
obj=GetSelectedObjectByIndex(i)
countmaterial=obj.CountMaterials ()
for j in range (0,countmaterial):
material=obj.Material (j)
functiongraph=material.FunctionGraph ()
countnodes=functiongraph.CountNodes()
for k in range (0,countnodes):
nodename=functiongraph.NodeName (k)
if nodename=='Projected Texture Map':
countnodeparams=functiongraph.CountNodeParameters (k)
for l in range (0,countnodeparams):
if functiongraph.GetNodeParameterName (k,l)=='Interpolation type':
functiongraph.SetNodeParameter (k,l,3)
#----------------------------------------------
# Refresh Vue's Display
#----------------------------------------------
Refresh()
#----------------------------------------------
# End of Script
#----------------------------------------------
Python Code – Switch Mapping to Bilinear
#******************************************************
# Switch the mapping mode of images in selected
# object's materials to bicubic mapping
#
# - switchmapping.py
# - By Mark Caldwell
# - Version 0.2
# - Version 0.2 16th August 2009
# - Copyright Mark Caldwell 2009
# - Tested with Vue 7.5 Infinite
#
# How to use in 3 easy steps
#
# 1. Download this file onto your computer
#
# 2. Select Objects to have the mapping of images in
# materials changed to bicubic
#
# 3. Then run script and wait for it to work
# To run it go to Python -> Run Python Script
# Then locate the file on your computer
#
#******************************************************
#----------------------------------------------
# Internal Variables Set Up: Don't alter these
#----------------------------------------------
countobj=CountSelectedObjects()
#----------------------------------------------
# Find Selected Objects and switch mapping
#----------------------------------------------
if countobj>0:
for i in range(0,countobj):
obj=GetSelectedObjectByIndex(i)
countmaterial=obj.CountMaterials ()
for j in range (0,countmaterial):
material=obj.Material (j)
functiongraph=material.FunctionGraph ()
countnodes=functiongraph.CountNodes()
for k in range (0,countnodes):
nodename=functiongraph.NodeName (k)
if nodename=='Projected Texture Map':
countnodeparams=functiongraph.CountNodeParameters (k)
for l in range (0,countnodeparams):
if functiongraph.GetNodeParameterName (k,l)=='Interpolation type':
functiongraph.SetNodeParameter (k,l,3)
#----------------------------------------------
# Refresh Vue's Display
#----------------------------------------------
Refresh()
#----------------------------------------------
# End of Script
#----------------------------------------------
Python Code – Switch Mapping to None
#******************************************************
# Switch the mapping mode of images in selected
# object's materials to bicubic mapping
#
# - switchmapping.py
# - Switch the mapping mode of images in selected
# - object's materials to bicubic mapping
# - By Mark Caldwell
# - Version 0.2
# - Version 0.2 16th August 2009
# - Copyright Mark Caldwell 2009
# - Tested with Vue 7.5 Infinite
#
# How to use in 3 easy steps
#
# 1. Download this file onto your computer
#
# 2. Select Objects to have the mapping of images in
# materials changed to bicubic
#
# 3. Then run script and wait for it to work
# To run it go to Python -> Run Python Script
# Then locate the file on your computer
#
#******************************************************
#----------------------------------------------
# Internal Variables Set Up: Don't alter these
#----------------------------------------------
countobj=CountSelectedObjects()
#----------------------------------------------
# Find Selected Objects and switch mapping
#----------------------------------------------
if countobj>0:
for i in range(0,countobj):
obj=GetSelectedObjectByIndex(i)
countmaterial=obj.CountMaterials ()
for j in range (0,countmaterial):
material=obj.Material (j)
functiongraph=material.FunctionGraph ()
countnodes=functiongraph.CountNodes()
for k in range (0,countnodes):
nodename=functiongraph.NodeName (k)
if nodename=='Projected Texture Map':
countnodeparams=functiongraph.CountNodeParameters (k)
for l in range (0,countnodeparams):
if functiongraph.GetNodeParameterName (k,l)=='Interpolation type':
functiongraph.SetNodeParameter (k,l,0)
#----------------------------------------------
# Refresh Vue's Display
#----------------------------------------------
Refresh()
#----------------------------------------------
# End of Script
#----------------------------------------------
Python Code – Switch Mapping to Normalize
#******************************************************
# Switch the mapping mode of images in selected
# object's materials to normalized mapping
#
# - switchmappingnormalized.py
# - By Mark Caldwell
# - Version 0.2
# - Version 0.2 16th August 2009
# - Copyright Mark Caldwell 2009
# - Tested with Vue 7.5 Infinite
#
# How to use in 3 easy steps
#
# 1. Download this file onto your computer
#
# 2. Select Objects to have the mapping of images in
# materials changed to normalized
#
# 3. Then run script and wait for it to work
# To run it go to Python -> Run Python Script
# Then locate the file on your computer
#
#******************************************************
#----------------------------------------------
# Internal Variables Set Up: Don't alter these
#----------------------------------------------
countobj=CountSelectedObjects()
#----------------------------------------------
# Find Selected Objects and switch mapping
#----------------------------------------------
if countobj>0:
for i in range(0,countobj):
obj=GetSelectedObjectByIndex(i)
countmaterial=obj.CountMaterials ()
for j in range (0,countmaterial):
material=obj.Material (j)
functiongraph=material.FunctionGraph ()
countnodes=functiongraph.CountNodes()
for k in range (0,countnodes):
nodename=functiongraph.NodeName (k)
if nodename=='Projected Texture Map':
countnodeparams=functiongraph.CountNodeParameters (k)
for l in range (0,countnodeparams):
if functiongraph.GetNodeParameterName (k,l)=='Interpolation type':
functiongraph.SetNodeParameter (k,l,2)
#----------------------------------------------
# Refresh Vue's Display
#----------------------------------------------
Refresh()
#----------------------------------------------
# End of Script
#----------------------------------------------
