Skip to content

Commit

Permalink
gltfpack: Fix default scene for glTF files converted from .obj
Browse files Browse the repository at this point in the history
  • Loading branch information
zeux committed Aug 22, 2023
1 parent d714c60 commit 878fc0f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gltf/parseobj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ static void parseNodesObj(fastObjMesh* obj, cgltf_data* data)
data->scenes = (cgltf_scene*)calloc(1, sizeof(cgltf_scene));
data->scenes_count = 1;

data->scene = data->scenes;

data->scenes->nodes = (cgltf_node**)calloc(obj->object_count, sizeof(cgltf_node*));
data->scenes->nodes_count = obj->object_count;

Expand Down

0 comments on commit 878fc0f

Please sign in to comment.