- Substance 3D home
- Home
- Getting Started
- Getting Started overview
- Activation and licenses
- System requirements
- Project creation
- Export
- Export overview
- Export window
- Export presets
- Export overview
- Glossary
- Performance
- Getting Started overview
- Interface
- Assets
- Substance 3D Assets
- Color picker
- Display settings
- History
- Layer stack
- Main menu
- Project configuration
- Properties
- Settings
- Shader settings
- Texture Set
- Toolbars
- Viewport
- Miscellaneous
- Assets
- Painting
- Painting overview
- Tool list
- Straight line
- Lazy mouse
- Symmetry
- Fill projections
- Presets
- Presets overview
- Creating and saving presets
- Creating particles presets
- Photoshop brush presets (ABR)
- Dynamic strokes
- Advanced channel painting
- Vector graphic (.svg & .ai)
- Text resource
- Effects
- Baking
- Content
- Creating custom effects
- Importing assets
- Creating custom effects
- Features
- Automatic UV Unwrapping
- Physical size
- Smart Materials and Masks
- Subsurface Scattering
- Dynamic Material Layering
- UV Reprojection
- UV Tiles
- Color Management
- Post Processing
- Iray Renderer
- Plugins
- Sparse Virtual Textures
- Custom Shaders
- SpaceMouse® by 3Dconnexion
- Universal Scene Description (USD)
- Send to
- Technical Support
- Performance Guidelines
- Configuring Pens and Tablets
- Exporting the log file
- Exporting a DXDiag
- Technical issues
- GPU Issues
- Crash when working with overclocked GPU
- Forcing the external GPU on Mac OS
- GPU drivers compatibility
- GPU drivers crash with long computations (TDR crash)
- GPU has outdated drivers
- GPU is not recognized
- GPU is not recognized and is mentionned as GDI Generic
- Issues with Nvidia GPUs on recent Mac OS versions
- Multi/Bi-GPU
- Running on integrated GPU
- Painter doesn't start on the right GPU
- Startup Issues
- Rendering Issues
- Stability Issues
- Miscellaneous Issues
- GPU Issues
- Workflow Issues
- Export Issues
- Tools Issues
- Project Issues
- Library Issues
- Viewport Issues
- Plugins Issues
- License Issues
- Pipeline and integration
- Installation and preferences
- Configuration
- Resource management
- Scripting and development
- Scripts and plugins
- Shader API Reference
- Shader API overview
- Changelog - Shader API
- Libraries - Shader API
- Lib Alpha - Shader API
- Lib Bayer - Shader API
- Lib Defines - Shader API
- Lib Emissive - Shader API
- Lib Env - Shader API
- Lib Normal - Shader API
- Lib PBR - Shader API
- Lib PBR Aniso - Shader API
- Lib Pom - Shader API
- Lib Random - Shader API
- Lib Sampler - Shader API
- Lib Sparse - Shader API
- Lib SSS - Shader API
- Lib Utils - Shader API
- Lib Vectors - Shader API
- Parameters - Shader API
- Shaders - Shader API
- Release notes
- Release notes overview
- All Changes
- Version 10.1
- Version 10.0
- Version 9.1
- Old versions
- Version 9.0
- Version 8.3
- Version 8.2
- Version 8.1
- Version 7.4
- Version 7.3
- Version 7.2
- Version 2021.1 (7.1.0)
- Version 2020.2 (6.2.0)
- Version 2020.1 (6.1.0)
- Version 2019.3
- Version 2019.2
- Version 2019.1
- Version 2018.3
- Version 2018.2
- Version 2018.1
- Version 2017.4
- Version 2017.3
- Version 2017.2
- Version 2017.1
- Version 2.6
- Version 2.5
- Version 2.4
- Version 2.3
- Version 2.2
Editing the Shelf Preferences with Python
Below are example Python scripts to modify Windows registry in order to manipulate resource paths.
Registry key path
See the table below to use the appropriate registry key path:
System | Version | Path |
---|---|---|
Windows (registry) | 7.2 or newer | HKEY_CURRENT_USER\Software\Adobe\Adobe Substance 3D Painter |
Legacy | HKEY_CURRENT_USER\Software\Allegorithmic\Substance Painter | |
Mac (library) | 7.2 or newer | /Users/[username]/Library/Preferences/com.adobe.Adobe Substance 3D Painter.plist |
Legacy | /Users/[username]/Library/Preferences/com.substance3d.Substance Painter.plist | |
Linux | 7.2 or newer | /home/[username]/.config/Adobe/Adobe Substance 3D Painter.conf |
Legacy | /home/[username]/.config/Allegorithmic/Substance Painter.conf |
Adding a new path
Adding a resource path requires to check which one exist already in order to increment the list with a new one.
The following code adds in the registry key a new shelf path after checking what is the current number of path already defined.
import winreg RegistryKeyName = "SOFTWARE\Adobe\Adobe Substance 3D Painter\Shelf\pathInfos" ShelfName = "myshelf" #Needs to be lowercase ShelfPath = "C:/Temp" ShelfStatus = "false" #false = not disabled RegConnection = winreg.ConnectRegistry( None, winreg.HKEY_CURRENT_USER ) # Open parent registry key Key = winreg.OpenKey( RegConnection, RegistryKeyName, winreg.KEY_READ ) # Iterate over each sub-key to retrieve the biggest Shelf number SubKeyCount = winreg.QueryInfoKey( Key )[0] ShelfNumber = 0 for x in range(SubKeyCount) : SubKeyName = winreg.EnumKey(Key, x) ShelfNumber = max( ShelfNumber, int(SubKeyName) ) ShelfNumber += 1 # Create the new Key and add its values NewKey = winreg.CreateKey( Key, str( ShelfNumber ) ) winreg.SetValueEx( NewKey, "disabled", 0, winreg.REG_SZ, ShelfStatus) winreg.SetValueEx( NewKey, "name", 0, winreg.REG_SZ, ShelfName) winreg.SetValueEx( NewKey, "path", 0, winreg.REG_SZ, ShelfPath) NewKey.Close() # Increment the Shelf path counter Count = winreg.QueryValueEx( Key, "size" ) Key.Close() Key = winreg.OpenKeyEx( RegConnection, RegistryKeyName, 0, winreg.KEY_SET_VALUE ) winreg.SetValueEx( Key, "size", 0, winreg.REG_DWORD, Count[0] + 1 ) Key.Close()
Disabling or enabling a resource path
Any path created can be removed when not needed anymore, but also disabled for the default path which cannot be removed altogether.
The following code parse the Windows Registry and disable the default shelf (named "starter_assets").
import winreg RegistryKeyName = "SOFTWARE\Adobe\Adobe Substance 3D Painter\Shelf\pathInfos" RegConnection = winreg.ConnectRegistry( None, winreg.HKEY_CURRENT_USER ) #Open registry key Key = winreg.OpenKey( RegConnection, RegistryKeyName, winreg.KEY_READ ) SubKeyCount = winreg.QueryInfoKey( Key )[0] #Iterate over each sub-key for x in range(SubKeyCount) : SubKeyName = winreg.EnumKey(Key, x) SubKey = winreg.OpenKey( RegConnection, RegistryKeyName + "\" + SubKeyName, winreg.KEY_READ ) SubKeyValueCount = winreg.QueryInfoKey( SubKey )[1] #Read subkey values Values = [] for i in range( SubKeyValueCount ) : Values.append( winreg.EnumValue( SubKey, i ) ) #Note : Values is a table of tuples FoundKey = False for Value in Values : if Value[0] == "name" : if Value[1] == "starter_assets" : FoundKey = True SubKey.Close() #Found the path ? Then we edit the Key if FoundKey : print( " - Editing Windows Registry" ) #Re-Open key in edition mode SubKey = winreg.OpenKey( winreg.HKEY_CURRENT_USER, RegistryKeyName + "\" + SubKeyName, 0, winreg.KEY_SET_VALUE ) #Assign new value winreg.SetValueEx(SubKey, "disabled", 0, 1, "true" ) #use "false" to Enable that shelf path SubKey.Close() #Finish Key.Close()