Skip to content

Add "Original Generator" export setting - #354

Open
Exairnous wants to merge 2 commits into
masterfrom
add-original-generator-export-setting
Open

Exairnous wants to merge 2 commits into
masterfrom
add-original-generator-export-setting

Conversation

@Exairnous

@Exairnous Exairnous commented Jul 4, 2026 •

Copy link
Copy Markdown
Member

What?

Adds an export setting that allows you to specify the original generator of a GLB file.

Why?

So that the provenance of the GLB file can be maintained when it is modified.

Examples

Before:
2026-07-04_08-38

After:
2026-07-04_08-30

How to test

  1. Open Blender.
  2. Select File > Export > glTF 2.0 (.glb/.gltf).
  3. Expand the Hubs Components panel and see that there is an "Original Exporter" field.
  4. Enter something into the "Original Exporter" field and export a GLB.
  5. Open the exported GLB in a text editor and see that the "generator" property has what you entered in the "Original Generator" field, followed by the statement that it was re-exported by the glTF add-on.

For versions of Blender that support collection exporters:

  1. Go to the collection tab in the properties editor.
  2. Add a glTF 2.0 exporter.
  3. Expand the Hubs Components panel and see that there is an "Original Exporter" field.
  4. Enter something into the "Original Exporter" field and export a GLB.
  5. Open the exported GLB in a text editor and see that the "generator" property has what you entered in the "Original Generator" field, followed by the statement that it was re-exported by the glTF add-on.

Documentation of functionality

If adopted, this will probably need documentation; however, since it is a very simple feature and at the moment it is mainly for use by a few people (that I will be in contact with) for the branding removal project, I'm not going to bother adding documentation at present. If we decide we want to include this in the main add-on, I will add the documentation before merging.

Known limitations

The "Original Generator" property is stored on the scene and shared by all the different ways to export, so all exports within the scene (including any collection exporters) will share the one value. Having separate values for each export location isn't supported as it isn't needed for the branding removal project. If separate values for each export location are desired, they can be added later (either in this PR or a separate PR).

Alternative implementations considered

None.

Open questions

  • Is this useful for more than the branding removal project and do we want to include this in the main add-on?
  • Should separate values for each export location be supported?

Additional details or related context

This is mainly for the branding removal project, but may also be useful in general.

Note: this PR is based off of #353 After that PR is merged I will update this PR to remove the extraneous commit from #353

Installable zip of this PR

io_hubs_addon_1.8.0.596.zip

Exairnous added 2 commits July 4, 2026 05:49
What: converts the automatically called import/export draw function for Blender 4.2+ into two functions (one for import and one for export) and registers them specifically with the glTF add-on.

Why: the glTF add-on changed how it handled registering the export panel in Blender 4.4+ in order to better accommodate collection exporters, so this accounts for the changes while still supporting previous versions and also enables the settings panels to be shown in the collection exporters.

Notes:

The import settings panel didn't technically need to be done this way, but it keeps it consistent with the export settings panel and hopefully helps to future proof it.

This specifically doesn't use any of the automatically called function names (draw, draw_export, draw_import) in order to not conflict with previous versions of the glTF add-on and prevent any of the panels from being duplicated.

Related glTF commits/PRs:
KhronosGroup/glTF-Blender-IO@fae512b

KhronosGroup/glTF-Blender-IO#2313

KhronosGroup/glTF-Blender-IO@49b5680
What: adds a string property to the HubsComponentsExtensionProperties group and displays it in the exporter settings to allow the user to specify what the GLB file was originally generated with, this is then be combined with what the current generator is (i.e. the glTF add-on) and written to the GLB file on export.

Why: so that the provenance of the GLB file can be maintained when it is modified.

Notes:

This is mainly for the branding removal project[1], but may also be useful in general.

The "Original Generator" property is stored on the scene and shared by all the different ways to export, so all exports within the scene (including any collection exporters) will share the one value.

[1] https://docs.google.com/document/d/1bp2GInoMMae4q00gcxAAjmxVtL2hus-WO-YHhppeuvg/edit?tab=t.0
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Thank you for the pull request.

ROADMAP STATUS: This pull request isn't currently on any roadmap. Updates will be conveyed here as its place on/off a roadmap changes.

You can view the roadmaps here: Roadmaps Google Drive folder.

For more information on how the roadmaps work, see our roadmaps policy on GitHub.

@Exairnous

Copy link
Copy Markdown
Member Author

Added a zip of this PR that can be installed to the PR description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant