Skip to content

Commit

Permalink
remove can_be_exported and add compact toggle to gist export, resolves
Browse files Browse the repository at this point in the history
  • Loading branch information
zeffii committed Jun 8, 2021
1 parent dffc738 commit 03d4feb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions data_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
tile as np_tile,
float64,
int32, int64)
from sverchok.utils.logging import info
from sverchok.utils.logging import info, debug


DEBUG_MODE = False
Expand Down Expand Up @@ -1349,7 +1349,7 @@ def changable_sockets(node, inputsocketname, outputsocketname):
if not inputsocketname in node.inputs:
# - node not initialized in sv_init yet,
# - or socketname incorrect
info(f"changable_socket was called on {node.name} with a socket named {inputsocketname}, this socket does not exist")
debug(f"changable_socket was called on {node.name} with a socket named {inputsocketname}, this socket does not exist")
return

in_socket = node.inputs[inputsocketname]
Expand Down
8 changes: 2 additions & 6 deletions ui/sv_IO_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ class SvNodeTreeExportToGist(bpy.types.Operator):
bl_label = "Export to GIST (github account)"

selected_only: bpy.props.BoolProperty(name="Selected only", default=False)
compact: bpy.props.BoolProperty(default=True, description="Compact representation of the JSON file")

@classmethod
def poll(cls, context):
Expand All @@ -295,12 +296,6 @@ def execute(self, context):
return {'CANCELLED'}

ng = context.space_data.node_tree

is_tree_exportable, msg = self.can_be_exported(ng)
if not is_tree_exportable:
self.report({'ERROR'}, msg)
return {'CANCELLED'}

gist_filename = ng.name

app_version = bpy.app.version_string.replace(" ", "")
Expand Down Expand Up @@ -364,6 +359,7 @@ def draw(self, context):
col = self.layout.column() # old syntax in <= 2.83

col.use_property_split = True
col.prop(self, 'compact')
col.prop(self, 'selected_only')


Expand Down

0 comments on commit 03d4feb

Please sign in to comment.