Switch Vue Bump Mapping Python Script

These three python scripts for Vue allow you to switch the bump maps of a set of selected objects to
either positive, negative or inverted values.

Switch Bump Map Invert

[codesyntax lang=”python”]

#******************************************************
# Invert the bump of one or more objects materials
#
# - bumpinvert.py
# - By Mark Caldwell
# - Version 0.1
# - Version 0.1 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 invert the Bump map on
#
# 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 invert the
# materials bump maps
#----------------------------------------------
if countobj>0:
    for i in range(0,countobj):
        obj=GetSelectedObjectByIndex(i)
        countmaterial=obj.CountMaterials ()
        for j in range (0,countmaterial):
            bumpdepth=obj.Material (j).GetBumpDepth ()
            obj.Material (j).SetBumpDepth (-bumpdepth)

#----------------------------------------------
# Refresh Vue's Display
#----------------------------------------------

    Refresh()

#----------------------------------------------
# End of Script
#----------------------------------------------

[/codesyntax]

Switch Bump Map Negative

[codesyntax lang=”python”]

#******************************************************
# Make the bump of one or more objects materials
# negative
#
# - bumpnegative.py
# - By Mark Caldwell
# - Version 0.1
# - Version 0.1 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 make the Bump map on negative
#
# 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 negate the
# materials bump maps
#----------------------------------------------
if countobj>0:
    for i in range(0,countobj):
        obj=GetSelectedObjectByIndex(i)
        countmaterial=obj.CountMaterials ()
        for j in range (0,countmaterial):
            bumpdepth=obj.Material (j).GetBumpDepth ()
            obj.Material (j).SetBumpDepth (-abs(bumpdepth))

#----------------------------------------------
# Refresh Vue's Display
#----------------------------------------------

    Refresh()

#----------------------------------------------
# End of Script
#----------------------------------------------

[/codesyntax]

Switch Bump Map Positive

[codesyntax lang=”python”]

#******************************************************
# Make the bump of one or more objects materials
# positive
#
# - bumppositive.py
# - By Mark Caldwell
# - Version 0.1
# - Version 0.1 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 make the Bump map on negative
#
# 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 make the
# materials bump maps value positive
#----------------------------------------------
if countobj>0:
    for i in range(0,countobj):
        obj=GetSelectedObjectByIndex(i)
        countmaterial=obj.CountMaterials ()
        for j in range (0,countmaterial):
            bumpdepth=obj.Material (j).GetBumpDepth ()
            obj.Material (j).SetBumpDepth (abs(bumpdepth))

#----------------------------------------------
# Refresh Vue's Display
#----------------------------------------------

    Refresh()

#----------------------------------------------
# End of Script
#----------------------------------------------

[/codesyntax]

impworks © Copyright Mark Caldwell 1996 - 2024