This project integrates a Digital Content Creation (DCC) application (Blender) with a local server to manage object transforms and a simple inventory system. The project includes a Blender plugin, a Flask server, an SQLite database, and a PySide6 UI for inventory management. Video Demo : Link
- Object selection and transform controls (position, rotation, scale).
- Endpoint dropdown to select server function.
- Submit button to send selected object's transform data to the server.
- Endpoints to handle transforms, file paths, and inventory management.
- 10-second delay for all responses.
- Logs received requests to the terminal.
- Correct status codes (200, 400, 404).
- Stores items and quantities in an inventory.
- Displays inventory from the database.
- Buttons to buy/return items, updating the database and the DCC plugin's display.
- Responsive UI that does not freeze while waiting for server responses.
- Single-binary packaging (Standlone Application : PyInstaller).
- Python 3.8+
- Blender 2.82+
- Virtual environment (recommended)
-
Clone the repository:
git clone https://github.com/konavivekramakrishna/VigaHack.git cd VigaHack
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use: venv\Scripts\activate
-
Install the required packages:
pip install -r requirements.txt
-
Set up the SQLite database:
python -m server.database
-
Navigate to the
server
directory:cd server
-
Run the Flask server:
flask run
- Open Blender.
- Install the plugin from Edit -> Preferences -> Addon -> Install From Disk >
plugin.py
. - Use the plugin panel to select objects, adjust transforms, and send data to the server.
-
Navigate to the
frontend
directory:cd frontend
-
Run the inventory UI:
python inventory_ui.py
POST /transform
: Takes all transforms (position, rotation, scale).POST /translation
: Takes only position.POST /rotation
: Takes only rotation.POST /scale
: Takes only scale.POST /add-item
: Adds an item to the database (name, quantity).DELETE /remove-item
: Removes an item from the database (by name).PUT /update-quantity
: Updates an item's quantity (name, new quantity).
The project uses SQLite to store inventory items and their quantities. The database is set up automatically by running the python -m server.database
command.
The PySide6 UI displays the inventory and allows users to perform CRUD operations on items. It communicates with the Flask server to update the database and refresh the display.
The project includes unit tests for the server endpoints. To run the tests:
-
Start the server:
flask run
-
Run the tests with pytest:
pytest
This project is licensed under the MIT License. See the LICENSE file for details.