diff options
author | Greg <gregzzmail@gmail.com> | 2016-08-11 13:44:17 +0300 |
---|---|---|
committer | Greg <gregzzmail@gmail.com> | 2016-08-11 13:44:17 +0300 |
commit | edd893fef8f9e2b5096e9f54a1664c7a6d171515 (patch) | |
tree | fc3db6148b7bd1b645a0475e17a0687b0471fbe9 | |
parent | 1fd72d85570b06de50fa6a9a922b67d787dac15b (diff) |
Node Wrangler: Some more checks for Save This Image
-rw-r--r-- | node_wrangler.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/node_wrangler.py b/node_wrangler.py index b6a7b437..6b065951 100644 --- a/node_wrangler.py +++ b/node_wrangler.py @@ -3192,7 +3192,13 @@ class NWSaveViewer(bpy.types.Operator, ExportHelper): @classmethod def poll(cls, context): - return nw_check(context) and context.space_data.tree_type == 'CompositorNodeTree' and "Viewer Node" in [i.name for i in bpy.data.images] + valid = False + if nw_check(context): + if context.space_data.tree_type == 'CompositorNodeTree': + if "Viewer Node" in [i.name for i in bpy.data.images]: + if sum(bpy.data.images["Viewer Node"].size) > 0: # False if not connected or connected but no image + valid = True + return valid def execute(self, context): fp = self.filepath |