Skip to content

Commit

Permalink
Fix issues in sample import/export panel:
Browse files Browse the repository at this point in the history
* Exception when panels are collapsed
* Remove unnecessary whitespace
  • Loading branch information
eoineoineoin committed Jul 26, 2024
1 parent 93db353 commit c577cca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions example-addons/example_gltf_exporter_extension/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ def unregister():

def draw(context, layout):
header, body = layout.panel("GLTF_addon_example_exporter", default_closed=False)
header.use_property_split = False

props = bpy.context.scene.ExampleExtensionProperties

header.prop(props, 'enabled')
body.active = props.enabled
body.prop(props, 'float_property', text="Some float value")
if body != None:
body.prop(props, 'float_property', text="Some float value")


class glTF2ExportUserExtension:
Expand Down
5 changes: 3 additions & 2 deletions example-addons/example_gltf_importer_extension/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ class ExampleImporterExtensionProperties(bpy.types.PropertyGroup):

def draw(context, layout):
header, body = layout.panel("GLTF_addon_example_importer", default_closed=False)
header.use_property_split = False

props = bpy.context.scene.ExampleImporterExtensionProperties

header.prop(props, 'enabled')
body.active = props.enabled
body.prop(props, 'float_property', text="Some float value")
if body != None:
body.prop(props, 'float_property', text="Some float value")


class glTF2ImportUserExtension:
Expand Down

0 comments on commit c577cca

Please sign in to comment.