Development Environment#

This guide will walk you through the steps to set up a development environment for the UV Flow Blender addon using Visual Studio Code (VS Code) and the ‘Blender Development’ extension by Jacques Lucke.

Prerequisites#

Before you begin, ensure you have the following installed on your system:

  • Python: Blender comes with its own Python, but having Python installed can be useful for additional scripts.

  • Git: Required for cloning the repository.

Installing Visual Studio Code#

  1. Download Visual Studio Code: Go to the Visual Studio Code website and download the installer for your operating system.

  2. Install Visual Studio Code: Run the installer and follow the prompts to complete the installation.

Installing Blender#

  1. Download Blender: Visit the Blender website and download the latest version of Blender.

  2. Install Blender: Run the installer and follow the instructions to install Blender on your system.

Installing the Blender Development Extension#

  1. Open Visual Studio Code: Launch VS Code after installation.

  2. Access Extensions: Click on the Extensions icon in the Activity Bar on the side of the window or press Ctrl+Shift+X.

  3. Search for ‘Blender Development’: In the search bar, type “Blender Development” and find the extension by Jacques Lucke.

  4. Install the Extension: Click the Install button to add the extension to your VS Code.

Cloning the UV Flow Repository#

  1. Open a Terminal: In VS Code, open a new terminal by selecting Terminal > New Terminal from the top menu.

  2. Clone the Repository: Run the following command to clone the UV Flow repository:

    git clone https://github.com/cgcookie/uvflow.git
    
  3. Navigate to the Project Directory: Change into the cloned directory:

    cd uvflow
    

Running UV Flow in Blender#

  1. Start Blender: You can start Blender directly from VS Code using the extension.

  2. Choose Blender Executable:

    • Open the Command Palette by pressing Ctrl+Shift+P.

    • Type “Blender: Build and Start” and select it.

    • Click on “Choose a new Blender executable” to specify the path to your Blender executable. This allows the extension to know which Blender version to use. You can link multiple Blender versions if needed.

  3. Enable the Addon:

    • Don’t worry, the addon should be automatically enabled, thanks to the VSCode extension! :-)

  4. Reload Addons After Modifications:

    • Whenever you make changes to the addon code, you need to reload the addon in Blender. Open the Command Palette again and run the command “Blender: Reload Addons” to see your changes take effect.

  5. Test the Addon: You can now test the functionality of the UV Flow addon within Blender.

Conclusion#

You have successfully set up your development environment for the UV Flow Blender addon using Visual Studio Code and the ‘Blender Development’ extension. You can now start developing and testing your addon efficiently. Happy coding!