Skip to main content
Glama
Starlightmii

After Effects Motion Control Panel

by Starlightmii
README.md
# After Effects Motion Control Panel (MCP)

A robust solution for fixing and improving the After Effects Motion Control Panel system, ensuring reliable command processing between web UI and After Effects.

## šŸš€ Features

- Real-time command monitoring and processing
- WebSocket-based status updates
- AI-powered command processing
- Comprehensive logging and error handling
- Permission management for Windows systems
- Direct After Effects integration

## šŸ“‹ Prerequisites

- Python 3.8 or higher
- After Effects CC or later
- Windows 10 or later
- Administrator access (for initial setup)

## šŸ› ļø Installation

1. Clone this repository:
```bash
git clone https://github.com/yourusername/after-effects-mcp.git
cd after-effects-mcp
```

2. Create and activate a virtual environment:
```bash
python -m venv venv
.\venv\Scripts\activate
```

3. Install dependencies:
```bash
pip install -r requirements.txt
```

## šŸš€ Quick Start

1. Run the permissions fix script as administrator:
```bash
.\fix_permissions.bat
```

2. Start the server:
```bash
.\start_server.bat
```

3. In After Effects:
   - Go to File > Scripts > Run Script File...
   - Select `after_effects_script/ae_command_fix.jsx`

## šŸ“ Project Structure

```
after-effects-mcp/
ā”œā”€ā”€ after_effects_script/    # After Effects JSX scripts
ā”œā”€ā”€ server/                  # Python server code
ā”œā”€ā”€ learning_data/          # AI training data
ā”œā”€ā”€ requirements.txt        # Python dependencies
ā”œā”€ā”€ fix_permissions.bat     # Windows permission setup
ā”œā”€ā”€ start_server.bat        # Server launcher
└── README.md              # This file
```

## šŸ”§ Usage

### Sending Commands

Commands can be sent through:
1. Web UI interface
2. Direct command file creation
3. AI-powered natural language processing

Command format:
```json
{
  "action": "create_text_layer",
  "params": {
    "text": "Example Text",
    "fontSize": 72,
    "color": "#00AAFF"
  }
}
```

### Monitoring

- Use the MCP Status Monitor for real-time command tracking
- Check logs in the After Effects script panel
- Monitor server status through WebSocket connection

## šŸ” Troubleshooting

### Common Issues

1. "No command file found" in After Effects:
   - Verify C:\ae_temp directory exists
   - Check file permissions
   - Ensure server is running

2. Web UI shows success but nothing happens:
   - Check server status
   - Verify WebSocket connection
   - Check After Effects script panel logs

3. Permission errors:
   - Run fix_permissions.bat as administrator
   - Verify C:\ae_temp directory permissions
   - Check user account access rights

## šŸ¤ Contributing

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request

## šŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

## šŸ™ Acknowledgments

- Adobe After Effects team for the scripting API
- Contributors and testers
- Open source community

## šŸ“ž Support

For support:
1. Check the troubleshooting guide
2. Review the logs
3. Open an issue with:
   - Detailed error description
   - Steps to reproduce
   - System information
   - Log files