Create collection exporter #2
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
BUGJam/pounce-art!2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "create-collection-exporter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create collection exporterto WIP: Create collection exporterWIP: Create collection exporterto Create collection exporterCloses https://tasks.bugjam.dev/tasks/29
src/addonsfolder to be loaded with the other extensions 88fd0687af@ -0,0 +14,4 @@bl_description = "Prepare the selected collection for export"bl_options = {"REGISTER", "UNDO"}def execute(self, context):I'd like to split out the functionality as an API call that the operator will call.
@ -0,0 +35,4 @@# Set the active collection to the current collection#bpy.context.view_layer.active_layer_collection = collectionbpy.ops.collection.exporter_add(name=gltf_handler)It is probably a good idea to force the active collection for operator.
@ -0,0 +45,4 @@exporter = collection.exporters[-1]# Set Format to seperate the filestry:Are we expecting these to fail? If not, then can probably avoid the try/except and just let the error bubble up.
@ -0,0 +115,4 @@#fields = path.get_fields("art_asset_blend", bpy.data.filepath)# Set file pathexporter.filepath = str(path.get_path("game_asset_gltf",{Use the collection fields to get the project name/asset type/etc. (TODO)