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.
Download: Switch Bump Map 0.1 (3k Zip Archive)
Python Code – Switch Bump Map Invert
- #******************************************************
- # 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
- #----------------------------------------------
Python Code – Switch Bump Map Negative
- #******************************************************
- # 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
- #----------------------------------------------
Python Code – Switch Bump Map Positive
- #******************************************************
- # 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
- #----------------------------------------------


