I'm trying to figure out how to tie the particle system manual spawn to an api command. I'm new to Resolume arena, and while I've gone through the reference docs and sample web UI, I can't quite figure out how to accomplish this. Any help would be greatly appreciated.
Thanks,
Sara
Any help would be greatly appreciated.
-
- Team Resolume
- Posts: 303
- Joined: Fri Dec 06, 2019 00:01
Re: Any help would be greatly appreciated.
Hey Sara,
You can definitely trigger the particle system's manual spawn with the API! Here's the quick version:
1. Find the "Spawn" Parameter's ID:
First, figure out which layer and clip your Particle System is on (e.g., Layer 1, Clip 1).
Use this curl command (adjust layer/clip numbers and localhost:8080 if needed) to get the clip's details:
In the JSON output, look for your ParticleSystem effect (usually under video -> effects). Inside its params, find "Spawn" and note its "id" (e.g., 1234567890123).
2. Trigger the Spawn:
The "Spawn" button is an event. To trigger it, you send a PUT request to its ID.
To spawn particles (replace 1234567890123 with your actual ID):
- First, "release" the button (send false)
- Then, "press" the button (send true)
You'll need to send the false then true sequence each time you want to spawn.
That should do the trick! You can adapt these curl commands into whatever scripting or programming language you're using.
Good luck!
You can definitely trigger the particle system's manual spawn with the API! Here's the quick version:
1. Find the "Spawn" Parameter's ID:
First, figure out which layer and clip your Particle System is on (e.g., Layer 1, Clip 1).
Use this curl command (adjust layer/clip numbers and localhost:8080 if needed) to get the clip's details:
Code: Select all
curl http://localhost:8080/api/v1/composition/layers/1/clips/1
2. Trigger the Spawn:
The "Spawn" button is an event. To trigger it, you send a PUT request to its ID.
To spawn particles (replace 1234567890123 with your actual ID):
- First, "release" the button (send false)
Code: Select all
curl -X PUT -H "Content-Type: application/json" \
-d '{"id": 1234567890123, "valuetype": "ParamBoolean", "value": false}' \
http://localhost:8080/api/v1/parameter/by-id/1234567890123
Code: Select all
curl -X PUT -H "Content-Type: application/json" \
-d '{"id": 1234567890123, "valuetype": "ParamBoolean", "value": true}' \
http://localhost:8080/api/v1/parameter/by-id/1234567890123
That should do the trick! You can adapt these curl commands into whatever scripting or programming language you're using.
Good luck!