Skip to content

Latest commit

 

History

History
52 lines (31 loc) · 2.15 KB

README.md

File metadata and controls

52 lines (31 loc) · 2.15 KB

3D Texture Importer

A Blender Add-on that automatically imports texture files and creates appropriate shader nodes from a given directory.

blender.mp4

Setup

Download the blender_texture_importer.zip file from the latest release and follow the Installing Add-ons section from the Blender documentation.

Usage

Go to the Shading workspace or open a Shader Editor panel in Blender. Make sure you have selected the material you want to work with.

To import a texture, right-click in the Shader Editor and choose Import Texture. A dialog box will appear asking you to pick a directory. Once you select a folder, the add-on will scan through all image files inside and set up the required nodes for your texture.

Be aware that the process will delete all existing nodes. It will then automatically set up a Principled BSDF shader node and connect your imported texture nodes to it, ultimately hooking everything up to a 'Material Output' node.

To tidy up your node layout after import, consider using the NodeRelax-Blender-Addon, which can help organize your nodes neatly and save time.

Development

pip install -r requirements-dev.txt

pycodestyle *.py

pylint *.py

pytest

Read Blender's Tips and Tricks and Gotchas.

Developing inside Blender:

Go to the Scripting workspace inside Blender, create a new text data-block, paste the following code, and press Run Script:

init_path = '/home/your-user/blender_texture_importer/__init__.py'

exec(
    compile(open(init_path).read(), init_path, 'exec'),
    {'init_path': init_path}
)

Rerun the script every time you change the code: It will reload all your updated code inside Blender.