Skip to content

Commit 1f0a77e

Browse files
authored
Merge pull request #37 from AssetFetch/0-3-0-prep
0.3.0 preparations
2 parents bd84f94 + a2ae4fc commit 1f0a77e

File tree

7 files changed

+31
-21
lines changed

7 files changed

+31
-21
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,4 @@ cython_debug/
155155
# and can be added to the global gitignore or merged into this file. For a more nuclear
156156
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
157157
#.idea/
158+
index.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pip install --target ./src/lib/ -r ./requirements.txt
2929
# Download the latest json schema version for AssetFetch
3030
# Change the -b parameter to use a different branch/tag
3131
mkdir ./tmp
32-
git -C ./tmp/ clone -b '0.2' --single-branch https://github.com/AssetFetch/spec.git
32+
git -C ./tmp/ clone -b '0.4' --single-branch https://github.com/AssetFetch/spec.git
3333
cp -r ./tmp/spec/json-schema/ ./src/
3434
rm -rf ./tmp
3535
```

build.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
& "$ENV:ProgramFiles\Blender Foundation\Blender 4.2\blender.exe" --command extension build --source-dir $PSScriptRoot/src --verbose
2+
& "$ENV:ProgramFiles\Blender Foundation\Blender 4.2\blender.exe" --command extension server-generate --repo-dir $PSScriptRoot

src/__init__.py

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
"""This is the main module of the "AssetFetch For Blender" addon.
22
It houses the main register() and unregister() functions for the addon along with required metadata.
3-
See also: https://docs.blender.org/manual/en/latest/advanced/scripting/addon_tutorial.html#bringing-it-all-together
43
"""
54

65
import os, sys
76
import bpy
87

9-
print("Loading AssetFetch for Blender v0.2.0")
8+
print("Loading AssetFetch for Blender v0.3.0")
109

1110
# Add the lib/ directory to sys.path to make it all the bundled libraries importable.
1211
# The addon is distributed with all its required python libraries in the /lib subdirectory.
1312
# This has turned out to be the most reliable since the final python environment of the user (inside Blender) does not need to have pip.
1413
# Check the readme.md for instructions on how to download the dependencies using pip.
14+
15+
# TODO: With the introduction of Blender 4.2 this generates a small warning message, therefore it will likely need to be changed in the future.
1516
LIB_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "lib")
1617
if LIB_PATH not in sys.path:
1718
sys.path.insert(0, LIB_PATH)
@@ -20,22 +21,8 @@
2021
# Like with the libraries, instructions for filling the json-schema directory for development can be found in readme.md
2122
SCHEMA_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "json-schema")
2223

23-
# This variable is used for the "Preferences" (bookmarks/settings) definition.
24-
# Normally, it is common practice to use __name__ in the preferences class to tell Blender under which name the preferences should be stored.
25-
# But because we don't define the preferences here in this init file we instead pipe the name over to properties/preferences.py using this variable.
26-
# During development the name may therefore simply be "src" but in a proper installation it will be the name of the subdirectory in the Blender addons directory.
27-
ADDON_NAME = __name__
28-
29-
# Standard variable with metadata required for all Blender addons.
30-
bl_info = {
31-
"name": "assetfetch-blender",
32-
"description": "AssetFetch for Blender",
33-
"author": "ambientCG / Lennart Demes",
34-
"version": (0, 2),
35-
"blender": (4, 0, 0),
36-
"location": "View3D",
37-
"category": "3D View"
38-
}
24+
ADDON_NAME = __package__
25+
3926

4027
def register():
4128
"""The main registration function for the entire addon.

src/blender_manifest.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
schema_version = "1.0.0"
2+
3+
id = "assetfetch"
4+
version = "0.3.0"
5+
name = "AssetFetch For Blender"
6+
tagline = "AssetFetch client for Blender"
7+
maintainer = "ambientCG <hello@ambientCG.com>"
8+
type = "add-on"
9+
website = "https://assetfetch.org/"
10+
tags = ["Pipeline"]
11+
blender_version_min = "4.0.0"
12+
license = [
13+
"SPDX:GPL-3.0-or-later",
14+
]
15+
16+
paths_exclude_pattern = [
17+
"__pycache__/",
18+
"/.git/",
19+
"/*.zip",
20+
]

src/ui/provider_panel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def draw(self, context):
1616

1717
# Info Box
1818
#info_box = layout.box()
19-
#info_box.label(text="AssetFetch for Blender v0.2.0", icon="SETTINGS")
19+
#info_box.label(text="AssetFetch for Blender v0.3.0", icon="SETTINGS")
2020
#info_box.label(text=f"Icon directory: {af.ui_image_directory}")
2121
#info_box.label(text="Unstable & lacking numerous features, use with caution & patience!")
2222

src/util/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class AF_HttpQuery:
5757
"""Represents a query that the client sends to the provider"""
5858

5959
# The standard headers that get sent with every request (along with any auth headers)
60-
default_headers = {"User-Agent": f"blender/{bpy.app.version_string} assetfetch-blender/0.2"}
60+
default_headers = {"User-Agent": f"blender/{bpy.app.version_string} assetfetch-blender/0.3"}
6161

6262
def __init__(self, uri: str, method: str, parameters: Dict[str, str] = None, chunk_size: int = 128 * 1024 * 8):
6363
self.uri = uri

0 commit comments

Comments
 (0)