Skip to content

Commit 1e65aeb

Browse files
committed
Updated engon from monorepo commit cd5f3b763822db6d2b10d1d832519b66e60e7023
1 parent 30f5192 commit 1e65aeb

File tree

111 files changed

+5437
-2399
lines changed

Some content is hidden

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

111 files changed

+5437
-2399
lines changed

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@
3636
- [Getting Started](#getting-started)
3737
- [Prerequisites](#prerequisites)
3838
- [Installation](#installation)
39-
- [Blender 4.2 or newer](#blender-42-or-newer)
40-
- [Blender 4.1 or older](#blender-41-or-older)
41-
- [Download the addon ZIP](#download-the-addon-zip)
39+
- [Install from Extensions Repository](#install-from-extensions-repository)
40+
- [Install from Disk](#install-from-disk)
41+
- [Download the ZIP](#download-the-zip)
4242
- [Install ZIP in Blender](#install-zip-in-blender)
4343
- [Updating](#updating)
44+
- [Update from Repository](#update-from-repository)
45+
- [Updater](#updater)
4446
- [Roadmap](#roadmap)
4547
- [Support](#support)
4648
- [Project assistance](#project-assistance)
@@ -74,32 +76,44 @@
7476

7577
### Prerequisites
7678

77-
> You need [Blender 3.6 LTS or higher](https://blender.org). Windows, macOS 10 and Linux are
79+
> You need [Blender 4.2 LTS or higher](https://blender.org). Windows, macOS 10 and Linux are
7880
> supported.
7981
8082
### Installation
8183

82-
#### Blender 4.2 or newer
84+
#### Install from Extensions Repository
85+
8386
Visit [polygoniq extensions repository](https://extensions.polygoniq.com), where we explain
8487
how to set it up as remote repository so you can install and update everything from Blender.
8588

86-
#### Blender 4.1 or older
87-
##### Download the addon ZIP
89+
#### Install from Disk
90+
91+
##### Download the ZIP
8892

8993
| Stable Release | Unstable Master Branch |
9094
| :--------------------------------------------------------------------------------------: | :--------------------------------------------------------------: |
91-
| Head over to [Releases](https://github.com/polygoniq/engon/releases) for a stable ZIP. | Click `Code` -> `Download ZIP` if you are feeling adventurous. |
95+
| Head over to [Releases](https://github.com/polygoniq/engon/releases) for a stable ZIP. | Click `Code` -> `Download ZIP` if you are feeling adventurous. |
9296

9397
##### Install ZIP in Blender
9498

95-
Go to `Edit` -> `Preferences`. And select `Add-ons` in the left bar. Click the `Install...` button
99+
Go to `Edit` -> `Preferences`. And select `Get Extensions` in the left bar. Click the `Install from Disk...` button
96100
in the top section. Select the ZIP file you just downloaded and click `Install Add-on`. After the
97101
installation finishes, check the checkbox next to the `engon` addon.
98102

99103
### Updating
100104

105+
#### Update from Repository
106+
107+
Navigate to `Edit` -> `Preferences` and select `Extensions` in the left bar. Write `engon`
108+
in the top search bar, expand the panel and click on `Update`.
109+
110+
If you cannot see the `Update` button even though you know you're not on the latest version
111+
available, click the small arrow in the top-right corner and select `Check for Updates`.
112+
113+
#### Updater
114+
101115
The addon can auto-update itself to latest stable or even unstable master version. Head over to
102-
`Edit` -> `Preferences` and select `Add-ons` in the left bar. Type `engon` into the search bar
116+
`Edit` -> `Preferences` and select `Get Extensions` in the left bar. Type `engon` into the search bar
103117
and then expand the addon section of `engon`. Scroll down to the auto update section to set up
104118
update intervals or even update manually.
105119

__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@
133133
bl_info = {
134134
"name": "engon",
135135
"author": "polygoniq xyz s.r.o.",
136-
"version": (1, 6, 1), # bump doc_url and version in register as well!
137-
"blender": (3, 6, 0),
136+
"version": (1, 7, 0), # bump doc_url and version in register as well!
137+
"blender": (4, 2, 0),
138138
"location": "polygoniq tab in the sidebar of the 3D View window",
139139
"description": "Browse assets, filter and sort, scatter, animate, adjust rigs",
140140
"category": "Object",
141-
"doc_url": "https://docs.polygoniq.com/engon/1.6.1/",
141+
"doc_url": "https://docs.polygoniq.com/engon/1.7.0/",
142142
"tracker_url": "https://polygoniq.com/discord/",
143143
}
144144

@@ -161,7 +161,7 @@ def _post_register():
161161
def register():
162162
# We pass mock "bl_info" to the updater, as from Blender 4.2.0, the "bl_info" is
163163
# no longer available in this scope.
164-
addon_updater_ops.register({"version": (1, 6, 1)})
164+
addon_updater_ops.register({"version": (1, 7, 0)})
165165

166166
utils.register()
167167
pack_info_search_paths.register()

asset_helpers.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@
8383
(0.8, (0.004, 0.004, 0.004)), # 0E0E0E
8484
)
8585

86+
# aesthetiq constants
87+
SQ_PICTORAL_MATERIALS_LIBRARY_BLEND = "sq_Library_Pictoral-Materials.blend"
88+
SQ_PICTORIAL_MATERIAL_PREFIX = "sq_Pictoral_" # todo: fix typo in "Pictoral" in material names
89+
SQ_FRAME_GENERATOR_LIBRARY_BLEND = "sq_Library_Frame-Generator-Geonodes.blend"
90+
SQ_FRAME_GENERATOR_MODIFIER = "sq_Frame-Generator"
91+
SQ_FRAME_GENERATOR_OBJECT = "sq_Frame-generator"
8692

8793
PARTICLE_SYSTEM_PREFIX = f"engon_{polib.asset_pack.PARTICLE_SYSTEM_TOKEN}_"
8894

@@ -144,7 +150,7 @@ def is_obj_with_engon_feature(
144150
return feature in asset_pack.engon_features
145151

146152

147-
def is_object_from_seasons(obj: bpy.types.Object, seasons: typing.Set[str]) -> bool:
153+
def is_object_from_seasons(obj: bpy.types.Object, seasons: set[str]) -> bool:
148154
pure_name = polib.utils_bpy.remove_object_duplicate_suffix(obj.name)
149155
name_split = pure_name.rsplit("_", 3)
150156
if len(name_split) != 4:
@@ -185,9 +191,7 @@ def get_materialiq_texture_sizes_enum_items():
185191
return [(str(size), str(size), f"materialiq texture size: {size}") for size in texture_sizes]
186192

187193

188-
def get_asset_pack_library_path(
189-
engon_feature: str, library_blend_name: str
190-
) -> typing.Optional[str]:
194+
def get_asset_pack_library_path(engon_feature: str, library_blend_name: str) -> str | None:
191195
for pack in asset_registry.instance.get_packs_by_engon_feature(engon_feature):
192196
for lib in glob.iglob(
193197
os.path.join(pack.install_path, "blends", "**", library_blend_name), recursive=True
@@ -213,17 +217,15 @@ def exclude_variant_from_asset_name(asset_name: str) -> str:
213217
return "_".join([category, name, seasons])
214218

215219

216-
class ObjectSource(enum.Enum):
217-
editable = (0,)
218-
instanced = (1,)
219-
particles = (2,)
220+
class ObjectSource(enum.StrEnum):
221+
EDITABLE = "EDITABLE"
222+
INSTANCED = "INSTANCED"
223+
PARTICLES = "PARTICLES"
220224

221225

222226
ObjectSourceMap = typing.Mapping[
223227
str,
224-
typing.List[
225-
typing.Tuple[ObjectSource, typing.Union[bpy.types.Object, bpy.types.ParticleSystem]]
226-
],
228+
list[tuple[ObjectSource, bpy.types.Object | bpy.types.ParticleSystem]],
227229
]
228230

229231

@@ -257,15 +259,15 @@ def get_obj_source_map(objs: typing.Iterable[bpy.types.Object]) -> ObjectSourceM
257259
and obj.instance_collection is not None
258260
):
259261
for o in obj.instance_collection.all_objects:
260-
m[o.name].append((ObjectSource.instanced, obj))
262+
m[o.name].append((ObjectSource.INSTANCED, obj))
261263

262264
elif obj.type == 'MESH':
263265
for ps in obj.particle_systems:
264266
if ps.settings.instance_collection is not None:
265267
for o in ps.settings.instance_collection.all_objects:
266-
m[o.name].append((ObjectSource.particles, ps))
268+
m[o.name].append((ObjectSource.PARTICLES, ps))
267269

268-
m[obj.name].append((ObjectSource.editable, obj))
270+
m[obj.name].append((ObjectSource.EDITABLE, obj))
269271
return m
270272

271273

@@ -332,7 +334,7 @@ def gather_curves_instanced_objects(
332334
yield from instance_collection.collection.all_objects
333335

334336

335-
def get_car_color() -> typing.Tuple[float, float, float]:
337+
def get_car_color() -> tuple[float, float, float]:
336338
value = random.random()
337339
idx = bisect.bisect(TQ_COLOR_DISTRIBUTION, value, key=lambda x: x[0]) - 1
338340
return TQ_COLOR_DISTRIBUTION[idx][1]

0 commit comments

Comments
 (0)