Skip to content

Instantly share code, notes, and snippets.

View decasteljau's full-sized avatar

Bernard Rodrigue decasteljau

View GitHub Profile
from waapi import WaapiClient
import pprint
# Array of RGBA arrays
colors = [
[135, 135, 135, 1],
[55, 62, 200, 1],
[26, 85, 203, 1],
[8, 104, 104, 1],
[24, 109, 24, 1],
from waapi import WaapiClient
import pprint
# Connect (default URL)
client = WaapiClient()
# Return all events referencing the specified object
args = {
"from": {"path": ['\\Actor-Mixer Hierarchy\\Default Work Unit\\with_att']},
}
from waapi import WaapiClient
import pprint
# Connect (default URL)
client = WaapiClient()
# Return all targets
args = {
"from": {"path": ['\\Events\\Default Work Unit\\Play']},
"transform": [
from waapi import WaapiClient
import pprint
# Connect (default URL)
client = WaapiClient()
# Return all events referencing the specified object
args = {
"from": {"path": ['\\Actor-Mixer Hierarchy\\Default Work Unit\\MySound']},
"transform": [
@decasteljau
decasteljau / gist:b7023195c1c78a36c64ff7dbeca3e601
Created March 1, 2019 16:54
Print all properties - WAAPI Python
from waapi import WaapiClient, CannotConnectToWaapiException
from pprint import pprint
try:
# Connecting to Waapi using default URL
with WaapiClient() as client:
# Simple RPC
args = {
from waapi import WaapiClient, CannotConnectToWaapiException
from pprint import pprint
try:
# Connecting to Waapi using default URL
with WaapiClient() as client:
# Simple RPC
args = {
from waapi import WaapiClient, CannotConnectToWaapiException
from pprint import pprint
try:
# Connecting to Waapi using default URL
with WaapiClient() as client:
# Simple RPC
args = {
import * as fs from 'fs';
import * as util from 'util';
const fsp = fs.promises;
function myRead(callback: (e: Error, result: string) => void) {
fs.readFile("C:/temp/data.txt", (e, buffer) => { callback(e, buffer.toString()) });
}
function myRead2(): Promise<string> {
from waapi import WaapiClient, CannotConnectToWaapiException
from pprint import pprint
try:
# Connecting to Waapi using default URL
with WaapiClient() as client:
# Simple RPC
args = {
from waapi import WaapiClient
import pprint
# Connect (default URL)
client = WaapiClient()
# Return all Soundbanks referencing any object of the Default Work Unit, through an event
args = {
"from": {"path": ['\\Actor-Mixer Hierarchy\\Default Work Unit']},
"transform": [