Skip to content

Commit

Permalink
Merge pull request #2332 from Phrogz/example-improvements
Browse files Browse the repository at this point in the history
Note requirements for exact class names
  • Loading branch information
julienduroure authored Sep 12, 2024
2 parents b1dfcaa + 4c027c4 commit 73b2660
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions example-addons/example_gltf_exporter_extension/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def draw_export(context, layout):
body.prop(props, 'float_property', text="Some float value")


# Note: the class must have this exact name
class glTF2ExportUserExtension:

def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion example-addons/example_gltf_exporter_extension/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Here you'll find information on how to add extensions to a glTF file from an external Blender addon.

Add a class named `gltf2ExportUserExtension` to your addon and instantiate an object of the class `io_scene_gltf2.io.com.gltf2_io_extensions.Extension`
Add a class named `gltf2ExportUserExtension` (must be this name) to your addon and instantiate an object of the class `io_scene_gltf2.io.com.gltf2_io_extensions.Extension`

```python
class glTF2ExportUserExtension:
Expand Down
1 change: 1 addition & 0 deletions example-addons/example_gltf_importer_extension/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def draw_import(context, layout):
body.prop(props, 'float_property', text="Some float value")


# Note: the class must have this exact name
class glTF2ImportUserExtension:

def __init__(self):
Expand Down
1 change: 1 addition & 0 deletions example-addons/example_gltf_importer_extension/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Here you'll find information on how to add importer extensions from a glTF file from an external Blender addon.

First, your importer must define a class with this exact name:

```python
class glTF2ImportUserExtension:
Expand Down

0 comments on commit 73b2660

Please sign in to comment.