Skip to content

Commit eb4ba39

Browse files
committed
first commit
0 parents  commit eb4ba39

90 files changed

Lines changed: 10910 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Build output
2+
build/
3+
*.zip
4+
5+
# Python cache
6+
__pycache__/
7+
*.pyc
8+
*.pyo
9+
*.pyd
10+
*.py[cod]
11+
*$py.class
12+
*.so
13+
14+
# Virtual environments
15+
venv/
16+
env/
17+
ENV/
18+
19+
.env
20+
21+
# IDE
22+
.vscode/
23+
.idea/
24+
*.swp
25+
*.swo
26+
*~
27+
28+
# OS
29+
.DS_Store
30+
Thumbs.db
31+
desktop.ini
32+
33+
# Blender
34+
*.blend1
35+
*.blend2
36+
*.blend@
37+
38+
# Logs
39+
*.log
40+
41+
.claude/

README.md

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
2+
<h1 align="center">Blendflare Asset Browser</h1>
3+
4+
<p align="center">
5+
<img src="images/bf-logo-orange.svg" alt="Blendflare Logo" width="250">
6+
</p>
7+
<p align="center">
8+
<strong>Search, download, and import 3D assets from <a href="https://blendflare.com">blendflare.com</a> directly inside Blender.</strong>
9+
</p>
10+
11+
<p align="center">
12+
<a href="https://blendflare.com">Website</a> &bull;
13+
<a href="https://docs.blendflare.com">Documentation</a> &bull;
14+
<a href="https://github.com/blendflare/blendflare-python-sdk">Python SDK</a>
15+
</p>
16+
17+
18+
The Blendflare Asset Browser is a powerful addon designed to streamline your 3D workflow. It brings the entire Blendflare library into your viewport, allowing you to insert Models, Materials, HDRIs, and Scenes without ever leaving your project.
19+
20+
## Demo
21+
22+
### 3D Models
23+
Import models directly at your 3D cursor with automatic hierarchy setup.
24+
25+
<p align="center">
26+
<img src="images/import_3d_model.gif" alt="Import 3D Models" width="700">
27+
</p>
28+
29+
### Materials
30+
Apply materials to selected objects with automatic texture packing.
31+
32+
<p align="center">
33+
<img src="images/import_materials.gif" alt="Import Materials" width="700">
34+
</p>
35+
36+
### HDRIs
37+
Set up environment lighting with a few clicks.
38+
39+
<p align="center">
40+
<img src="images/import_hdris.gif" alt="Import HDRIs" width="700">
41+
</p>
42+
43+
Test HDRI from [AmbientCG](https://ambientcg.com) licensed under the Creative Commons CC0 1.0 Universal License. [HDRI Link](https://ambientcg.com/view?id=DaySkyHDRI055B)
44+
45+
### Scenes
46+
Import complete scenes with render settings, compositing nodes, and World setup.
47+
48+
<p align="center">
49+
<img src="images/import_scenes.gif" alt="Import Scenes" width="700">
50+
</p>
51+
52+
53+
## Key Features
54+
55+
* **Integrated Toolbar**: A seamless toolbar integrated into the 3D Viewport header. Toggle it on/off to keep your workspace clean.
56+
57+
* **Smart Asset Application**:
58+
* **3D Models**: Automatically imported, parented to an Empty, and placed at your 3D cursor.
59+
* **Materials**: Auto-applied to selected objects with texture relinking and packing.
60+
* **HDRIs**: Instantly sets up your World nodes with the correct environment texture.
61+
* **Scenes**: Appends full scene collections, including render settings and compositing nodes.
62+
63+
* **Asset Browser Integration**: All imported assets are automatically marked as Blender assets, making them available in the native Asset Browser for easy reuse.
64+
65+
* **Advanced Search & Filtering**:
66+
* Filter by **Category** (Architecture, Characters, Nature, etc.).
67+
* Filter by **Render Engine** (Cycles, Eevee), **License** (CC0, CC-BY), **Poly Count**, and **Blender Version**.
68+
69+
* **Detailed Hover Cards**: Preview assets before downloading. Hover over a thumbnail to see:
70+
* Full resolution preview.
71+
* Author details & Avatar.
72+
* File size, polygon count, and license type.
73+
74+
* **Smart Caching**: Downloaded assets are cached locally. If you use the same asset in a different project, it loads instantly from your disk.
75+
76+
* **Security First**: Includes a built-in **Blend File Sanitizer**. Before importing, the addon runs a background process to strip potentially malicious scripts and unsafe drivers from downloaded files.
77+
78+
79+
## Open Ecosystem & Developer SDK
80+
81+
This addon was developed not only as a tool for artists but also as a **reference implementation** to validate the integration of the **[Blendflare Python SDK](https://github.com/blendflare/blendflare-python-sdk)** within production environments.
82+
83+
Our API is **not closed**. We believe in empowering developers to build their own tools on top of our platform.
84+
85+
### Why Build with Blendflare?
86+
87+
* **Extensibility**: While this addon covers the main filters, the API and SDK support even more advanced queries and filtering options.
88+
* **Custom Addons**: You can use the SDK to create bespoke addons tailored to specific use cases for your studio or workflow.
89+
* **Scripting & Automation**: The SDK can be installed globally (`pip install blendflare`) outside of Blender. This allows for the creation of automation scripts, search pipelines, or standalone asset management tools.
90+
91+
### Developer Resources
92+
93+
| Resource | Link |
94+
|----------|------|
95+
| General Documentation | [docs.blendflare.com](https://docs.blendflare.com/) |
96+
| API Reference | [docs.blendflare.com/reference/api](https://docs.blendflare.com/reference/api) |
97+
| Python SDK | [github.com/blendflare/blendflare-python-sdk](https://github.com/blendflare/blendflare-python-sdk) |
98+
99+
We invite the community to explore the SDK and build their own integrations!
100+
101+
102+
## Installation
103+
104+
### Requirements
105+
106+
* **Blender 4.2.0** or higher (tested up to Blender 5.0)
107+
* An account at [blendflare.com](https://blendflare.com)
108+
* API Key from your Blendflare account
109+
110+
### Steps
111+
112+
1. Download the latest release (`.zip` file) from the [Releases page](#).
113+
2. Open Blender.
114+
3. Go to **Edit** > **Preferences**.
115+
4. Select the **Get Extensions** (or **Add-ons**) tab.
116+
5. Click the arrow icon (top right) and select **Install from Disk...**.
117+
6. Select the downloaded `.zip` file.
118+
7. Ensure the addon is enabled (checked).
119+
120+
### Using with BlenderKit
121+
122+
If you also use the BlenderKit addon, please note the following for proper toolbar compatibility:
123+
124+
> **Enable BlenderKit first, then enable Blendflare.**
125+
126+
Both addons modify the 3D Viewport header to display their toolbars. Blendflare is designed to preserve existing header modifications, allowing you to switch between toolbars seamlessly. However, for this to work correctly, BlenderKit must be enabled before Blendflare.
127+
128+
If you experience issues with the toolbar not appearing, try disabling both addons, then re-enabling them in the correct order (BlenderKit first, Blendflare second).
129+
130+
131+
## Configuration (API Key)
132+
133+
To access the library, you need to link the addon to your Blendflare account.
134+
135+
1. Log in to your account at [blendflare.com](https://blendflare.com).
136+
2. Navigate to **Settings** > **[API Keys](https://blendflare.com/dashboard/settings/api-keys)**.
137+
3. Generate a new API Key and copy it (starts with `sk_live_...`).
138+
4. In Blender, go to **Edit** > **Preferences** > **Add-ons**.
139+
5. Search for **Blendflare Asset Browser** and expand the preferences.
140+
6. Paste your key into the **Blendflare API Key** field.
141+
7. *(Optional)* Enter your **Blendflare Nickname** to easily filter for your own assets using the "My Assets" button.
142+
8. *(Optional)* Set a custom **Cache Directory** if you want assets stored in a specific drive.
143+
144+
145+
## Usage Guide
146+
147+
### The Interface
148+
149+
Once installed, you will see the Blendflare logo icon in the top header of the **3D Viewport**.
150+
151+
* **Click the Logo**: Toggles the Blendflare Toolbar.
152+
* **Panel Toggle**: Click the "Eye" icon in the toolbar to open/close the main asset grid panel.
153+
154+
### Searching and Importing
155+
156+
1. Select a category (Cube icon for Models, Sphere for Materials, World for HDRIs, etc.).
157+
2. Use the dropdown to select specific subcategories (e.g., *Architecture > Building*).
158+
3. Type keywords in the search bar.
159+
4. **Click** on an asset card to download and import it into your scene.
160+
161+
### Filters
162+
163+
Click the **Filter** icon to access advanced options:
164+
165+
* **License Type**: Find CC0 (Public Domain) assets.
166+
* **Render Engine**: Ensure materials work with your engine (Cycles/Eevee).
167+
* **Blender Version**: Filter assets compatible with your version.
168+
169+
170+
## Security & Sanitization
171+
172+
We take security seriously. When you download a `.blend` file from the internet, it can theoretically contain malicious Python scripts.
173+
174+
The Blendflare Asset Browser includes a **Sandbox Sanitizer**. When an asset is downloaded:
175+
176+
1. Blender launches a background subprocess.
177+
2. It opens the file in a restricted mode.
178+
3. It removes all Text datablocks (scripts) and checks for dangerous Python drivers.
179+
4. Only the clean, safe data is imported into your open project.
180+
181+
182+
## Development
183+
184+
This addon is built using the official **Blendflare Python SDK** (`blendflare-python-sdk`), which handles API communication, type validation, and data modeling.
185+
186+
### Build from Source
187+
188+
If you want to modify the code:
189+
190+
1. Clone this repository.
191+
2. Ensure you have the `blendflare` SDK wheel in `src/wheels/`.
192+
3. Run the build command (requires Blender 4.2+):
193+
194+
```bash
195+
blender --command extension build --source-dir=./src --output-dir=./build
196+
```
197+
198+
199+
## License
200+
201+
This project is licensed under the **GPL-3.0-or-later** license.
202+
203+
---
204+
205+
<p align="center">
206+
<sub>Developed by the <a href="https://blendflare.com">Blendflare</a> Team</sub>
207+
</p>

build.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Create directory for build output if it doesn't exist
2+
if not exist build (
3+
mkdir build
4+
)
5+
"C:\Program Files\Blender Foundation\Blender 5.0\blender.exe" -c extension build --source-dir=./src --output-dir=./build

images/bf-logo-orange.svg

Lines changed: 13 additions & 0 deletions
Loading

images/import_3d_model.gif

1.64 MB
Loading

images/import_hdris.gif

25.7 MB
Loading

images/import_materials.gif

2.62 MB
Loading

images/import_scenes.gif

9.32 MB
Loading

0 commit comments

Comments
 (0)