瀏覽代碼

update interface draw for correct UI and clarity

removes default value from xForm for outputs
removes array if interface item is a connection
and visa versa
Joseph Brandenburg 3 周之前
父節點
當前提交
37976aaffb
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      socket_definitions.py

+ 5 - 3
socket_definitions.py

@@ -340,8 +340,9 @@ class MantisInterfaceSocketBaseClass():
         items=enum_default_xForm_values, description=interface_default_value_description,)
 
 def interface_draw(self, context, layout):
-    layout.prop(self, "is_array", text="Is Array", toggle=True,)
-    if self.id_data.bl_idname == 'SchemaTree':
+    if not self.is_connection:
+        layout.prop(self, "is_array", text="Is Array", toggle=True,)
+    if not self.is_array and self.id_data.bl_idname == 'SchemaTree':
         layout.prop(self, "is_connection", text="Is Connection", toggle=True,)
         if self.is_connection: # only show this if in a Schema AND set to is_connection
             layout.prop(self, "connected_to", text="Connected To", toggle=True,)
@@ -373,7 +374,8 @@ def interface_bool_vector_draw(self, context, layout):
     interface_draw(self, context, layout)
 
 def interface_xform_draw(self, context, layout):
-    layout.prop(self, "default_xForm", text="Default Value", toggle=True,)
+    if self.in_out == 'INPUT':
+        layout.prop(self, "default_xForm", text="Default Value", toggle=True,)
     interface_draw(self, context, layout)