Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added in Nuke module, plus told any function call to execute in main …

…thread
  • Loading branch information...
commit 8ce15dc5c80848eec6b54e6867b73b19aea1a947 1 parent ca0fdc7
@HughMacdonald HughMacdonald authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  nukeCommandServer.py
View
3  nukeCommandServer.py
@@ -2,6 +2,7 @@
import socket
import threading
import imp
+import nuke
basicTypes = [int, float, complex, str, unicode, buffer, xrange, bool, type(None)]
listTypes = [list, tuple, set, frozenset]
@@ -90,7 +91,7 @@ def get(self, data_string):
elif data['action'] == "setitem":
obj[params[0]] = params[1]
elif data['action'] == "call":
- result = obj(*params['args'], **params['kwargs'])
+ result = nuke.executeInMainThreadWithResult(obj, args=params['args'], kwargs=params['kwargs'])
elif data['action'] == "len":
result = len(obj)
elif data['action'] == "str":
Please sign in to comment.
Something went wrong with that request. Please try again.