Skip to content

Commit

Permalink
Fixed a few export UI bugs (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
neverhood311 authored Jul 19, 2022
1 parent f9d9221 commit 461283c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"name": "Stop motion OBJ",
"description": "Import a sequence of OBJ (or STL or PLY or X3D) files and display them each as a single frame of animation. This add-on also supports the .STL, .PLY, and .X3D file formats.",
"author": "Justin Jensen",
"version": (2, 2, 0, "alpha.24"),
"version": (2, 2, 0, "alpha.25"),
"blender": (2, 83, 0),
"location": "File > Import > Mesh Sequence",
"warning": "",
Expand Down
9 changes: 6 additions & 3 deletions src/panels.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ class SMO_PT_MeshSequenceExportPanel(bpy.types.Panel):

@classmethod
def poll(cls, context):
return context.object.mesh_sequence_settings.initialized == True
mss = context.object.mesh_sequence_settings
return mss.initialized == True and mss.isImported == True

def draw(self, context):
layout = self.layout
Expand All @@ -120,12 +121,14 @@ def draw(self, context):
row.enabled = inObjectMode or inSculptMode
row.prop(objSettings, "autoExportChanges")

exportEnabled = objSettings.autoExportChanges

row = layout.row()
row.enabled = inObjectMode or inSculptMode
row.enabled = (inObjectMode or inSculptMode) and exportEnabled
row.prop(objSettings, "overwriteSrcDir")

row = layout.row()
row.enabled = (inObjectMode or inSculptMode) and objSettings.overwriteSrcDir is False
row.enabled = (inObjectMode or inSculptMode) and objSettings.overwriteSrcDir is False and exportEnabled
row.alert = objSettings.exportDir == '' and objSettings.overwriteSrcDir is False

row.prop(objSettings, "exportDir")
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# (major, minor, revision, development)
# example dev version: (1, 2, 3, "beta.4")
# example release version: (2, 3, 4)
currentScriptVersion = (2, 2, 0, "alpha.24")
currentScriptVersion = (2, 2, 0, "alpha.25")
legacyScriptVersion = (2, 0, 2, "legacy")

0 comments on commit 461283c

Please sign in to comment.