{"id":18782141,"url":"https://github.com/gpuopen-librariesandsdks/blenderusdhydraaddon","last_synced_at":"2025-04-05T15:08:43.093Z","repository":{"id":37822483,"uuid":"306386316","full_name":"GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon","owner":"GPUOpen-LibrariesAndSDKs","description":"This add-on allows you to assemble and compose USD data with Blender data and render it all using various renderers via Hydra.","archived":false,"fork":false,"pushed_at":"2023-11-29T18:50:39.000Z","size":856,"stargazers_count":380,"open_issues_count":20,"forks_count":38,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-03-29T14:09:54.618Z","etag":null,"topics":["blender","materialx","rendering","usd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GPUOpen-LibrariesAndSDKs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-22T15:48:30.000Z","updated_at":"2025-03-23T11:22:33.000Z","dependencies_parsed_at":"2023-02-13T22:01:02.679Z","dependency_job_id":"2b4ef4cb-794e-4563-a7cf-8dfac5393564","html_url":"https://github.com/GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FBlenderUSDHydraAddon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FBlenderUSDHydraAddon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FBlenderUSDHydraAddon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FBlenderUSDHydraAddon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GPUOpen-LibrariesAndSDKs","download_url":"https://codeload.github.com/GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353746,"owners_count":20925329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blender","materialx","rendering","usd"],"created_at":"2024-11-07T20:35:01.316Z","updated_at":"2025-04-05T15:08:43.070Z","avatar_url":"https://github.com/GPUOpen-LibrariesAndSDKs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blender USD Hydra Addon\r\n\r\nWith Pixar's USD system emerging as a powerful tool for 3D graphics pipelines and interchange. This addon uses AMD Radeon™ ProRender renderer in USD Hydra rendering system in Blender.\r\n\r\n## Additional Documentation\r\n- [Pixar USD](https://graphics.pixar.com/usd/docs/index.html)\r\n- [Hydra](https://graphics.pixar.com/usd/docs/USD-Glossary.html#USDGlossary-Hydra)\r\n- [MaterialX](http://www.materialx.org/)\r\n\r\n## Requirements\r\nCurrently, this addon works only with [Blender 4.0+](https://www.blender.org/download/) in Windows, Mac OS and Linux.\r\n\r\nOn the [releases](https://github.com/GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon/releases) page are prebuilt versions of the ready to install addon. \r\n\r\n## Installing Add-on\r\n\r\nDownload the add-on from the releases page [releases](https://github.com/GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon/releases). Open Blender preferences and got to the Add-ons section click Install button and pick the add-on in File Browser. Enable the add-on from the Add-ons section.\r\n\r\n## Usage\r\n### Rendering\r\nAt a simple level, this functions similar to any render addon to Blender, like Cycles or EEVEE which are included in Blender. Simply select the render engine (in this case \"Hydra RPR\") and render using the `F12` key or starting a viewport render.\r\n\r\n## Contributing\r\n### Build Requirements\r\n- Latest Blender precompiled libraries. Clone repository [Blender](https://projects.blender.org/blender/blender) and follow [instructions](https://wiki.blender.org/wiki/Building_Blender#:~:text=for%20Developers.-,Library%20Dependencies,-Details%20on%20obtaining) \r\n- [Python 3.10 x64](https://www.python.org/ftp/python/3.10.11/python-3.10.11.exe) _(Blender 4.0+ uses 3.10)_\r\n  - requirements.txt\r\n\r\n- [Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/) _(Windows only)_\r\n- [CMake 3.22.2+](https://cmake.org/download/). Make sure it's added to the PATH environment variable\r\n- Subversion client, such as [TortoiseSVN](https://tortoisesvn.net/downloads.html)\r\n- [Git for Windows](https://gitforwindows.org/)\r\n\r\n### Recommended software\r\n- [epydoc](http://epydoc.sourceforge.net/) - enable PyCharm to parse Core's documentation. Use `py -m pip install epydoc` with your selected python interpreter or install it from PyCharm.\r\n- [PyCharm Community Edition](https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=windows\u0026code=PCC) - recommended for coding, possible to enable intellisense(limited) for Blender code.\r\n- [Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads) - has a powerful python extension, possible to enable intellisense for Blender, provides remote debugging in Blender.\r\n\r\n### Coding Conventions\r\nAim is to conform to [pep8](https://www.python.org/dev/peps/pep-0008/). \r\nAt minimum it's 4 spaces for indentation, sources are utf-8, there's `.gitconfig` in the root of the project - please set you editor to use it (for most simplicity). PyCharm default setting are fine and seems that it also picks up `.editorconfig` automatically also, [Tortoise](https://tortoisegit.org/) Merge has a checkbox 'Enable EditorConfig', for Visual Studio there's [EditorConfig extension](https://visualstudiogallery.msdn.microsoft.com/c8bccfe2-650c-4b42-bc5c-845e21f96328).\r\n\r\n### Git\r\nWe try to avoid merge commits, the easiest way to do it. This one rejects merges that would result in merge commit:\r\n```commandline\r\n\u003e git config [--global] merge.ff only\r\n```\r\nConverts pull to do, essentially, fetch\u0026rebase:\r\n```commandline\r\n\u003e git config [--global] pull.rebase true\r\n```\r\nAlso, make more meaningful commits (one commit per feature) the easy way. This will create a single change set from multiple commits coming from `\u003cbranch\u003e`:\r\n```commandline\r\n\u003e git merge \u003cbranch\u003e --squash \r\n```\r\n\r\n### ThirdParty libraries\r\nThere is ThirdParty repositories included to the project as a submodules. Please update submodules:\r\n- `deps/MaterialX` https://github.com/AcademySoftwareFoundation/MaterialX\r\n- `deps/RadeonProRenderUSD` https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRenderUSD\r\n- `deps/USD` https://github.com/PixarAnimationStudios/OpenUSD\r\n\r\nAll of them are included via SSH protocol. You will need to create and install [SSH keys](https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh).\r\n\r\nOnce SSH keys are installed update/checkout submodules for active branch:\r\n```commandline\r\n\u003e git submodule update --init -f --recursive\r\n```\r\n\r\n### Build\r\nRequire `python 3.10+` to be set by default.\r\n\r\n#### Windows:\r\nDownload Blender precompiled libraries.\r\n```commandline\r\nsvn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64_vc15\r\n```\r\nUse cmd.exe or any other command prompt.\r\n```commandline\r\n\u003e git clone https://github.com/GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon\r\n\u003e cd BlenderUSDHydraAddon\r\n\u003e git submodule update --init --recursive\r\n\u003e python build.py -all\r\n```\r\n\r\n#### Mac OS:\r\nDownload Blender precompiled libraries.\r\n```commandline\r\nsvn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_darwin\r\n```\r\n```commandline\r\n\u003e git clone https://github.com/GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon\r\n\u003e cd BlenderUSDHydraAddon\r\n\u003e git submodule update --init --recursive\r\n\u003e python tools/build.py -all\r\n```\r\n\r\n#### Linux:\r\nDownload Blender precompiled libraries.\r\n```commandline\r\nsvn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/linux_x86_64_glibc_228\r\n```\r\n```commandline\r\n\u003e git clone https://github.com/GPUOpen-LibrariesAndSDKs/BlenderUSDHydraAddon\r\n\u003e cd BlenderUSDHydraAddon\r\n\u003e git submodule update --init --recursive\r\n\u003e python tools/build.py -all\r\n```\r\n\r\nFor building on non-default system python version you should change it with `update-alternatives --config python` command or via setting venv.\r\n\r\n#### Build tool\r\nYou can build project using `build.py` with different flag combinations. It allows you to create a folder with binaries and pack all the necessary files for development to `/install` folder. Also `build.py` provides a variety of ways to make a project builds:\r\n- `-all` - builds all binaries, equals to `-materialx -usd -hdrpr -addon` \r\n- `-usd` - builds usd binaries\r\n- `-hdrpr` - builds HdRPR plugin binaries\r\n- `-materialx` - builds MaterialX binaries\r\n- `-bin-dir \u003cbin dir\u003e` - define path to build binaries. _Default_: `bin`\r\n- `-bl-libs-dir \u003clibs_dir\u003e` - define path to Blender precompiled libraries. _Default_: `../lib/\u003cOS related name\u003e`\r\n- `-clean` - removes binaries folder before build, for example: `-all -clean` remove all folders in `\u003cbin dir\u003e`, `-usd -hdrpr -clean` removes only `\u003cbin dir\u003e/Usd` and `\u003cbin dir\u003e/HdRPR`\r\n- `-G \u003cbuilder name\u003e` - set builder, passing with `-all`, `-materialx`, `-usd` and `-hdrpr`. _Example_: `-G \"Visual Studio 16 2019\"`, `-G \"Xcode\"`\r\n- `-addon` - generates zip archive with plugin to `./install` folder\r\n\r\nArguments are mostly used to skip build unneeded binaries. For example:\r\n```commandline\r\n\u003e python build.py -hdrpr -addon\r\n```\r\n### Debugging\r\n#### Visual Studio 2022\r\nRecommended software for debugging, has really nice mixed python and C stack debugging. Provides to you ability of interactive code evaluation. You can make breakpoints move step by step, watch variables and etc.\r\n\r\n##### 1. Run Blender with the Add-on\r\nMake sure you have no installed addon for Blender version you want to use; remove installed version if needed.\r\n\r\n##### 2. Attach Visual Studio to process\r\nPress menu Debug -\u003e Attach to Process... or use hotkey`Ctrl+Alt+P`. In opened window choose Blender process, now you connected and allowed to debug.\r\nAlso use build-in Python debugger in realtime. Turn on with `Debug -\u003e Windows -\u003e Python Debug Interactive. \r\n\r\n#### Blender\r\n The easiest way to [build Blender](https://wiki.blender.org/wiki/Building_Blender/Windows) in Release or RelWithDebInfo and add `#pragma optimize( \"\", off )`.\r\n\r\n#### PyCharm\r\n```python\r\nimport pydevd\r\npydevd.settrace('localhost', port=52128, stdoutToServer=True, stderrToServer=True, suspend=False)\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpuopen-librariesandsdks%2Fblenderusdhydraaddon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpuopen-librariesandsdks%2Fblenderusdhydraaddon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpuopen-librariesandsdks%2Fblenderusdhydraaddon/lists"}