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:
Code: Select all
curl http://localhost:8080/api/v1/composition/layers/1/clips/1
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)
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
- Then, "press" the button (send true)
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
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!