pass payload for call_vendor_request

add alias methods for hotkey requests ? perhaps this is not required...
This commit is contained in:
onyx-and-iris 2022-11-18 15:09:57 +00:00
parent 42f78a2048
commit 0e39496c59

View File

@ -75,7 +75,7 @@ class ReqClient:
"""
self.send("BroadcastCustomEvent", eventData)
def call_vendor_request(self, vendorName, requestType, requestData=None):
def call_vendor_request(self, vendor_name, request_type, request_data=None):
"""
Call a request registered to a vendor.
@ -97,7 +97,10 @@ class ReqClient:
"""
return self.send(requestType, requestData)
payload = {"vendorName": vendor_name, "requestType": request_type}
if request_data:
payload["requestData"] = request_data
return self.send("CallVendorRequest", payload)
def get_hot_key_list(self):
"""
@ -110,6 +113,8 @@ class ReqClient:
"""
return self.send("GetHotkeyList")
get_hotkey_list = get_hot_key_list
def trigger_hot_key_by_name(self, hotkeyName):
"""
Triggers a hotkey using its name. For hotkey names
@ -123,6 +128,8 @@ class ReqClient:
payload = {"hotkeyName": hotkeyName}
self.send("TriggerHotkeyByName", payload)
trigger_hotkey_by_name = trigger_hot_key_by_name
def trigger_hot_key_by_key_sequence(
self, keyId, pressShift, pressCtrl, pressAlt, pressCmd
):
@ -155,6 +162,8 @@ class ReqClient:
}
self.send("TriggerHotkeyByKeySequence", payload)
trigger_hotkey_by_key_sequence = trigger_hot_key_by_key_sequence
def sleep(self, sleepMillis=None, sleepFrames=None):
"""
Sleeps for a time duration or number of frames.