Skip to content

Commit

Permalink
backport guard against executable location not set
Browse files Browse the repository at this point in the history
  • Loading branch information
scaredyfish committed Apr 25, 2019
1 parent 0c92777 commit af4b216
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
bl_info = {
'name': 'Rhubarb Lipsync',
'author': 'Andrew Charlton',
'version': (1, 0, 5),
'version': (1, 0, 6),
'blender': (2, 79, 0),
'location': 'Properties > Armature',
'description': 'Integrate Rhubarb Lipsync into Blender',
Expand Down
4 changes: 3 additions & 1 deletion op_blender_rhubarb.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class RhubarbLipsyncOperator(bpy.types.Operator):

@classmethod
def poll(cls, context):
return context.selected_pose_bones and context.object.pose_library.mouth_shapes.sound_file
return context.preferences.addons[__package__].user_preferences.executable_path and \
context.selected_pose_bones and \
context.object.pose_library.mouth_shapes.sound_file

def modal(self, context, event):
try:
Expand Down
5 changes: 5 additions & 0 deletions pnl_blender_rhubarb.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ def draw(self, context):
row.prop(prop, 'start_frame', text='Start frame')

row = layout.row()

if not (context.user_preferences.addons[__package__].preferences.executable_path):
row.label(text="Please set rhubarb executable location in addon preferences")
row = layout.row()

row.operator(operator = "object.rhubarb_lipsync")
else:
row = layout.row(align=True)
Expand Down

0 comments on commit af4b216

Please sign in to comment.