init
This commit is contained in:
BIN
Archive.zip
Normal file
BIN
Archive.zip
Normal file
Binary file not shown.
167
README.md
Normal file
167
README.md
Normal file
@@ -0,0 +1,167 @@
|
||||
# Text Texture Generator - Blender Addon
|
||||
|
||||
A modern Blender addon that generates image textures from text with extensive customization options.
|
||||
|
||||
## Features
|
||||
|
||||
- **Text Input**: Enter any text to convert into a texture
|
||||
- **Customizable Size**: Adjust texture dimensions (64x64 to 4096x4096 pixels)
|
||||
- **Font Controls**:
|
||||
- Multiple font options (system-dependent)
|
||||
- Adjustable font size (8-200px)
|
||||
- Text alignment (left, center, right)
|
||||
- **Color Controls**:
|
||||
- Text color picker with alpha
|
||||
- Background color picker with alpha
|
||||
- Transparent background option
|
||||
- **Layout Options**:
|
||||
- Adjustable padding around text
|
||||
- Professional text positioning
|
||||
- **Blender Integration**:
|
||||
- Automatic image texture node creation in Shader Editor
|
||||
- Works in both Shader Editor and 3D Viewport
|
||||
- Generated textures are packed into the .blend file
|
||||
|
||||
## Installation
|
||||
|
||||
### Method 1: Modern Blender 4.0+ (Recommended)
|
||||
|
||||
1. Download the addon files (`blender_manifest.toml` and `__init__.py`)
|
||||
2. Create a folder named `text_texture_generator`
|
||||
3. Place both files in this folder
|
||||
4. In Blender, go to `Edit > Preferences > Add-ons`
|
||||
5. Click `Install from Disk` and select the folder
|
||||
6. Enable the "Text Texture Generator" addon
|
||||
|
||||
### Method 2: Traditional Installation
|
||||
|
||||
1. Download the `__init__.py` file
|
||||
2. In Blender, go to `Edit > Preferences > Add-ons`
|
||||
3. Click `Install from Disk` and select the `__init__.py` file
|
||||
4. Enable the "Text Texture Generator" addon
|
||||
|
||||
## Usage
|
||||
|
||||
### In Shader Editor:
|
||||
|
||||
1. Select a material with nodes enabled
|
||||
2. Open the Shader Editor
|
||||
3. Press `N` to open the side panel
|
||||
4. Navigate to the "Text Texture" tab
|
||||
5. Configure your text and settings
|
||||
6. Click "Generate Texture"
|
||||
7. The texture node will be automatically added to your material
|
||||
|
||||
### In 3D Viewport:
|
||||
|
||||
1. Press `N` to open the side panel
|
||||
2. Navigate to the "Text Texture" tab
|
||||
3. Configure your text and settings
|
||||
4. Click "Generate Texture"
|
||||
5. Find your texture in the Image Editor or use it in materials
|
||||
|
||||
## Settings Reference
|
||||
|
||||
### Text Settings
|
||||
|
||||
- **Text**: The text to render (up to 1024 characters)
|
||||
- **Font**: System font selection (varies by OS)
|
||||
- **Font Size**: Size of the text in pixels (8-200)
|
||||
- **Alignment**: Text alignment (left, center, right)
|
||||
- **Padding**: Space around text in pixels (0-100)
|
||||
|
||||
### Texture Settings
|
||||
|
||||
- **Width/Height**: Texture dimensions in pixels (64-4096)
|
||||
- **Text Color**: RGBA color picker for text
|
||||
- **Transparent Background**: Enable/disable background transparency
|
||||
- **Background Color**: RGBA color picker for background (when not transparent)
|
||||
|
||||
## System Requirements
|
||||
|
||||
- Blender 4.0.0 or newer
|
||||
- Python 3.10+ (included with Blender)
|
||||
- Pillow library (automatically installed via pip)
|
||||
|
||||
## Supported Fonts
|
||||
|
||||
The addon includes several built-in font options that vary by operating system:
|
||||
|
||||
### Windows
|
||||
|
||||
- Arial, Times New Roman, Courier New, Calibri, Segoe UI
|
||||
|
||||
### macOS
|
||||
|
||||
- Arial, Times New Roman, Courier New, Helvetica, SF Pro Display, Menlo
|
||||
|
||||
### Linux
|
||||
|
||||
- DejaVu Sans, DejaVu Serif, DejaVu Sans Mono, Ubuntu
|
||||
|
||||
## Dependencies
|
||||
|
||||
The addon automatically installs required dependencies:
|
||||
|
||||
- **Pillow** (>=10.0.0): For image generation and text rendering
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
1. **"Failed to generate texture" error**:
|
||||
|
||||
- Ensure Pillow is installed (addon does this automatically)
|
||||
- Check that your text isn't empty
|
||||
- Verify texture dimensions are within limits
|
||||
|
||||
2. **Font not displaying correctly**:
|
||||
|
||||
- Try using "Default" font option
|
||||
- Some system fonts may not be available
|
||||
- Custom font paths vary by system
|
||||
|
||||
3. **Texture appears in wrong location**:
|
||||
- In Shader Editor: Ensure you have a material selected
|
||||
- Check the generated image in the Image Editor
|
||||
- Look for the texture in `bpy.data.images`
|
||||
|
||||
### Performance Notes
|
||||
|
||||
- Large textures (2048x2048+) may take longer to generate
|
||||
- Very long text strings may affect performance
|
||||
- Generated textures are stored in memory and packed with the .blend file
|
||||
|
||||
## Development
|
||||
|
||||
### File Structure
|
||||
|
||||
```
|
||||
text_texture_generator/
|
||||
├── blender_manifest.toml # Modern addon manifest
|
||||
├── __init__.py # Main addon code
|
||||
└── README.md # This file
|
||||
```
|
||||
|
||||
### Contributing
|
||||
|
||||
Feel free to submit issues and enhancement requests. The addon is designed to be simple and focused on core text texture generation functionality.
|
||||
|
||||
## License
|
||||
|
||||
GPL-3.0-or-later
|
||||
|
||||
## Author
|
||||
|
||||
Marc Mintel <marc@mintel.me>
|
||||
|
||||
## Changelog
|
||||
|
||||
### Version 1.0.0
|
||||
|
||||
- Initial release
|
||||
- Text to texture conversion
|
||||
- Customizable fonts, colors, and sizing
|
||||
- Transparent background support
|
||||
- Automatic Blender integration
|
||||
- Cross-platform font support
|
||||
1184
__init__.py
Normal file
1184
__init__.py
Normal file
File diff suppressed because it is too large
Load Diff
19
blender_manifest.toml
Normal file
19
blender_manifest.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
schema_version = "1.0.0"
|
||||
|
||||
id = "text_texture_generator"
|
||||
version = "1.0.0"
|
||||
name = "Text Texture Generator"
|
||||
tagline = "Generate image textures from text with customizable styling"
|
||||
maintainer = "Marc Mintel <marc@mintel.me>"
|
||||
type = "add-on"
|
||||
support = "COMMUNITY"
|
||||
|
||||
tags = ["Material", "Shader", "Texture", "Text", "Image"]
|
||||
|
||||
blender_version_min = "4.0.0"
|
||||
|
||||
license = ["GPL-3.0-or-later"]
|
||||
|
||||
# Dependencies
|
||||
[dependencies]
|
||||
pillow = ">=10.0.0"
|
||||
Reference in New Issue
Block a user