Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI import options #2441

Merged
merged 3 commits into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions addons/io_scene_gltf2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1912,12 +1912,10 @@ def draw(self, context):
layout.use_property_split = True
layout.use_property_decorate = False # No animation.

layout.prop(self, 'import_pack_images')
layout.prop(self, 'merge_vertices')
layout.prop(self, 'import_shading')
layout.prop(self, 'guess_original_bind_pose')
layout.prop(self, 'export_import_convert_lighting_mode')
layout.prop(self, 'import_webp_texture')
import_texture_panel(layout, operator)
import_bone_panel(layout, operator)
import_ux_panel(layout, operator)

Expand Down Expand Up @@ -2009,10 +2007,11 @@ def unit_import(self, filename, import_settings):

def import_bone_panel(layout, operator):
header, body = layout.panel("GLTF_import_bone", default_closed=False)
header.label(text="Bones")
header.label(text="Bones & Skin")
if body:
body.prop(operator, 'bone_heuristic')
if operator.bone_heuristic == 'BLENDER':
body.prop(operator, 'guess_original_bind_pose')
body.prop(operator, 'disable_bone_shape')
body.prop(operator, 'bone_shape_scale_factor')

Expand All @@ -2024,6 +2023,13 @@ def import_ux_panel(layout, operator):
body.prop(operator, 'import_select_created_objects')
body.prop(operator, 'import_scene_extras')

def import_texture_panel(layout, operator):
header, body = layout.panel("GLTF_import_texture", default_closed=False)
header.label(text="Texture")
if body:
body.prop(operator, 'import_pack_images')
body.prop(operator, 'import_webp_texture')


def import_panel_user_extension(context, layout):
for draw in importer_extension_layout_draw.values():
Expand Down
Loading