Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Version] Bump version to v0.6.0 #15

Merged
merged 115 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from 111 commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
442196d
delete extra spaces
HaiyiMei Oct 24, 2023
bf9db43
[Fix] Bugs in rpc
HaiyiMei Oct 25, 2023
acfb5ff
[Fix] remove theme path for fixing search stuck
HaiyiMei Oct 25, 2023
c0534b5
[Fix] typo
HaiyiMei Oct 27, 2023
312cc34
[Fix] Bugs in camera param
HaiyiMei Oct 30, 2023
9b2644a
[Fix] Typos and improve docstring of `motion.py`
HaiyiMei Oct 30, 2023
d4a9392
add detailed error
HaiyiMei Nov 1, 2023
fbd92dc
[Fix] SMPLMotion BONE_NAMES
HaiyiMei Nov 1, 2023
75cc595
[Fix] bug
HaiyiMei Nov 1, 2023
ccd3fd5
[Fix] bug
HaiyiMei Nov 1, 2023
9ebc0e3
update CLI:
HaiyiMei Nov 2, 2023
9a7884d
default:
HaiyiMei Nov 2, 2023
ad1deb4
[Fix] bugs
HaiyiMei Nov 2, 2023
254d7ec
Optimize Unreal Mesh Operator
HaiyiMei Nov 2, 2023
9d94e4f
pre-commit
HaiyiMei Nov 2, 2023
8c0b7f9
move anim to utils
HaiyiMei Nov 6, 2023
0e731d2
clear `RPCFactory` when close
HaiyiMei Nov 7, 2023
d21d817
add comment
HaiyiMei Nov 10, 2023
56a9c7b
Update comment
HaiyiMei Nov 10, 2023
d7762e3
pre-commit
HaiyiMei Nov 10, 2023
d112af0
add material class
wentww Nov 13, 2023
648f989
fix bug
wentww Nov 15, 2023
861bc30
add docstrings
wentww Nov 15, 2023
949a23e
pre-commit
wentww Nov 15, 2023
923a197
Merge pull request #1 from wentww/main
HaiyiMei Nov 16, 2023
9345a20
[Feature] add cli of vis_smplx
HaiyiMei Nov 16, 2023
3937af4
Merge branch 'main' of github.com:HaiyiMei/xrfeitoria
HaiyiMei Nov 16, 2023
42f2b50
pre-commit
HaiyiMei Nov 16, 2023
285a6f6
Add try-except block
HaiyiMei Nov 16, 2023
7717487
add `dest_path` for `import_anim`
HaiyiMei Nov 20, 2023
5cb998b
Fix motion data insertion bug and set frame range
HaiyiMei Nov 20, 2023
84d84b8
Add Readme
HaiyiMei Dec 4, 2023
2960baf
Add option to use flat hand mean pose in
HaiyiMei Dec 4, 2023
5336af4
polish setup_logger
HaiyiMei Dec 5, 2023
4d00478
add feature of `reload_rpc_code`
HaiyiMei Dec 5, 2023
1a35682
fix bug of blender's mask
wentww Dec 7, 2023
a1d65e2
pre-commit
wentww Dec 7, 2023
6cab0c4
add PrimDiffusion
HaiyiMei Dec 9, 2023
cf62d4f
SynBody
HaiyiMei Dec 9, 2023
6de395e
add `dump_humandata` for `Motion`
HaiyiMei Dec 12, 2023
2d4d160
add output engine_out when error
HaiyiMei Dec 12, 2023
494ff9c
polish sample07
HaiyiMei Dec 12, 2023
ef4ec5b
bug fix
HaiyiMei Dec 12, 2023
9d965f7
pre-commit
HaiyiMei Dec 12, 2023
3e61b13
bug fix
HaiyiMei Dec 12, 2023
8cc369f
update docstring
HaiyiMei Dec 12, 2023
92ac442
update comments
HaiyiMei Dec 12, 2023
4a97c8c
polish logger
HaiyiMei Dec 12, 2023
e7b29c5
add `motion_data` in `sequence.spawn_actor` in ue
HaiyiMei Dec 12, 2023
f477bf2
add render
HaiyiMei Dec 18, 2023
9a22906
fix
HaiyiMei Dec 18, 2023
c4ce96b
add debug log for rendering progress
HaiyiMei Dec 21, 2023
6b83fb7
add `seq_dir` for `Sequence.open()` in unreal
HaiyiMei Dec 22, 2023
58324b4
Add set_playback method to Sequence class
HaiyiMei Dec 25, 2023
107c3be
pre-commit
HaiyiMei Dec 26, 2023
8e51f06
Update `set_camera_cut_playback` for Sequence in UE
HaiyiMei Dec 26, 2023
10f2ccb
[fix bug]save seq properties when closing seq
wentww Dec 27, 2023
0b0bef3
Fix pass_index assignment for actor children
HaiyiMei Dec 28, 2023
53f608e
add `from_amass_data` for `SMPLMotion`
HaiyiMei Dec 29, 2023
91ddfbf
Add: `apply_shape_keys` for blender
HaiyiMei Dec 29, 2023
d611091
add `set_active_level` in `blender_functions`
HaiyiMei Dec 29, 2023
c769fe0
[fix bug] add resolution to sequence properties
wentww Dec 29, 2023
f724394
Merge branch 'main' of https://github.com/HaiyiMei/xrfeitoria
wentww Dec 29, 2023
1f7312b
pre-commit
wentww Dec 29, 2023
ac3fef4
rename
HaiyiMei Jan 2, 2024
aeb71f4
Copy motion instances in derived classes
HaiyiMei Jan 3, 2024
efcd18e
Add `__repr__` method to ActorBase, CameraBase, ObjectBase, and Seque…
HaiyiMei Jan 3, 2024
d817064
Add load_humandata_motion function to anim utils
HaiyiMei Jan 3, 2024
4d49206
Refactor import statements in 07_amass.py
HaiyiMei Jan 3, 2024
5defe13
Fix Unreal engine version extraction in runner.py
HaiyiMei Jan 3, 2024
d762cec
[Fix] Get ue version
HaiyiMei Jan 5, 2024
7cec275
[Fix] RPC server stopping unexpectedly
HaiyiMei Jan 8, 2024
abadc7e
[Update] refactor `Sequence`
HaiyiMei Jan 12, 2024
a188c98
add `replace` for `import_asset` and `import_anim`
HaiyiMei Jan 12, 2024
e2d1db1
[Fix] misc bugs
HaiyiMei Jan 12, 2024
7af4669
[Fix] use `_blank` in href
HaiyiMei Jan 13, 2024
dfdb6ed
[Fix] Get rid of `_blank`
HaiyiMei Jan 13, 2024
66ffd3f
Add GitHub corner and update HTML context
HaiyiMei Jan 13, 2024
15eae4a
[Fix] logger msg
HaiyiMei Jan 15, 2024
c737175
Update:
HaiyiMei Jan 16, 2024
b6de86c
pre-commit
HaiyiMei Jan 16, 2024
44115b8
[Fix]
HaiyiMei Jan 18, 2024
919aa41
- Add export_audio option to RendererUnreal
HaiyiMei Jan 18, 2024
9766571
pre-commit
HaiyiMei Jan 18, 2024
c1df2fa
[Fix] misc bugs
HaiyiMei Jan 18, 2024
98d8282
accept XRFEITORIA_VERSION from env
maoXyzt Jan 19, 2024
b0a437a
[Fix] Should add `ImportError` in except
HaiyiMei Jan 19, 2024
2a6702e
Refactor error message in RPCRunner class
HaiyiMei Jan 21, 2024
d12997e
`engine_running` set to False when accidentally exit
HaiyiMei Jan 22, 2024
eb1c5c7
add instructions on develop plugins
HaiyiMei Jan 22, 2024
93729c2
optimize `MotionFrame`
HaiyiMei Jan 22, 2024
6668424
fix use of ImageFileFormatEnum
maoXyzt Jan 22, 2024
92484a3
Merge branch 'main' of https://github.com/HaiyiMei/xrfeitoria
maoXyzt Jan 22, 2024
a3d0226
Add FAQ section to README
HaiyiMei Jan 22, 2024
15b2e3c
Merge branch 'main' of github.com:HaiyiMei/xrfeitoria
HaiyiMei Jan 22, 2024
22d5912
Fix sequence binding issue and stop engine process
HaiyiMei Jan 23, 2024
ada29d7
Update read XRFeitoria version
HaiyiMei Jan 23, 2024
5369d55
Fix UnicodeEncodingError during logging
maoXyzt Jan 23, 2024
ba1d163
cancel logging wraps introduced by rich
maoXyzt Jan 23, 2024
f93d86b
Fix type hint and pre-commit
HaiyiMei Jan 23, 2024
ac18fc9
add support for ue5.1
HaiyiMei Jan 23, 2024
3d05f32
no print
HaiyiMei Jan 23, 2024
58f1ada
Optimize
HaiyiMei Jan 24, 2024
182d4e9
Fix upper/lower case
HaiyiMei Jan 24, 2024
17a3e7a
resolve().parents
HaiyiMei Jan 24, 2024
c13ee40
catch RPC runner start and stop exceptions
HaiyiMei Jan 24, 2024
12e956e
optimize order
HaiyiMei Jan 24, 2024
46fee87
optimize publish plugin
HaiyiMei Jan 24, 2024
3290e45
fix bug
HaiyiMei Jan 24, 2024
a9b42d3
Update copyright information and add MarketplaceURL
HaiyiMei Jan 25, 2024
f5b7341
Update copyright notices
HaiyiMei Jan 25, 2024
6ec2877
Update src/XRFeitoriaBpy/core/factory.py
HaiyiMei Jan 26, 2024
9dca9a9
`filter_names` set to tuple
HaiyiMei Jan 26, 2024
dfcb3db
bug fix
HaiyiMei Jan 26, 2024
a8eda2e
Fix plugin version extraction in RPCRunner
HaiyiMei Jan 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,3 @@ For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ src/XRFeitoriaUnreal/Binaries/
**/output/

# Python
scripts/
xrfeitoria/version.py

# Tutorials
Expand Down
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div align="center">

[![Documentation](https://readthedocs.org/projects/xrfeitoria/badge/?version=latest)](https://xrfeitoria.readthedocs.io/en/latest/?badge=latest)
[![actions](https://github.com/openxrlab/xrfeitoria/workflows/lint/badge.svg)](https://github.com/openxrlab/xrfeitoria/actions)
[![actions](https://github.com/openxrlab/xrfeitoria/actions/workflows/lint.yml/badge.svg)](https://github.com/openxrlab/xrfeitoria/actions)
[![PyPI](https://img.shields.io/pypi/v/xrfeitoria)](https://pypi.org/project/xrfeitoria/)
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Expand Down Expand Up @@ -75,23 +75,45 @@ The reference documentation is available on [readthedocs](https://xrfeitoria.rea
There are several [tutorials](/tutorials/).
You can read them [here](https://xrfeitoria.readthedocs.io/en/latest/src/Tutorials.html).


### Sample codes

There are several [samples](/samples/).
Please follow the instructions [here](/samples/README.md).

### Use plugins under development

Details can be found [here](https://xrfeitoria.readthedocs.io/en/latest/faq.html#how-to-use-the-plugin-of-blender-unreal-under-development).

If you want to publish plugins of your own, you can use the following command:

```powershell
# install xrfeitoria first
cd xrfeitoria
pip install .

# for instance, build plugins for Blender, UE 5.1, UE 5.2, and UE 5.3 on Windows.
# using powershell where backtick(`) is the line continuation character.
python -m xrfeitoria.utils.publish_plugins `
-u "C:/Program Files/Epic Games/UE_5.1/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
-u "C:/Program Files/Epic Games/UE_5.2/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
-u "C:/Program Files/Epic Games/UE_5.3/Engine/Binaries/Win64/UnrealEditor-Cmd.exe"
```

### Frequently Asked Questions

Please refer to [FAQ](https://xrfeitoria.readthedocs.io/en/latest/faq.html).


## :rocket: Amazing Projects Using XRFeitoria

| Project | Teaser | Engine |
| :---: | :---: | :---: |
| [Synbody: Synthetic Dataset with Layered Human Models for 3D Human Perception and Modeling](https://synbody.github.io/) | <a href=https://synbody.github.io/><img src="https://synbody.github.io/static/teaser.png"/></a> | Unreal Engine / Blender |
| [Zolly: Zoom Focal Length Correctly for Perspective-Distorted Human Mesh Reconstruction](https://wenjiawang0312.github.io/projects/zolly/) | <a href=https://wenjiawang0312.github.io/projects/zolly/><img src="https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrfeitoria/pics/zolly.jpg"/></a> | Blender |
| [SHERF: Generalizable Human NeRF from a Single Image](https://skhu101.github.io/SHERF/) | <a href=https://skhu101.github.io/SHERF/><img src="https://github.com/skhu101/SHERF/raw/main/img/SHERF_teaser.png"/></a> | Blender |
| [MatrixCity: A Large-scale City Dataset for City-scale Neural Rendering and Beyond](https://city-super.github.io/matrixcity/) | <a href=https://city-super.github.io/matrixcity/><img src="https://city-super.github.io/matrixcity/img/teaser.jpg"/></a> | Unreal Engine |
| [SynBody: Synthetic Dataset with Layered Human Models for 3D Human Perception and Modeling](https://synbody.github.io/) | <a href=https://synbody.github.io/><img src="https://synbody.github.io/static/teaser.png"></a> | Unreal Engine / Blender |
| [Zolly: Zoom Focal Length Correctly for Perspective-Distorted Human Mesh Reconstruction](https://wenjiawang0312.github.io/projects/zolly/) | <a href=https://wenjiawang0312.github.io/projects/zolly/><img src="https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrfeitoria/pics/zolly.jpg"></a> | Blender |
| [SHERF: Generalizable Human NeRF from a Single Image](https://skhu101.github.io/SHERF/) | <a href=https://skhu101.github.io/SHERF/><img src="https://github.com/skhu101/SHERF/raw/main/img/SHERF_teaser.png"></a> | Blender |
| [MatrixCity: A Large-scale City Dataset for City-scale Neural Rendering and Beyond](https://city-super.github.io/matrixcity/) | <a href=https://city-super.github.io/matrixcity/><img src="https://city-super.github.io/matrixcity/img/teaser.jpg"></a> | Unreal Engine |
| [HumanLiff: Layer-wise 3D Human Generation with Diffusion Model](https://skhu101.github.io/HumanLiff/) | <a href=https://skhu101.github.io/HumanLiff/><img src="https://skhu101.github.io/HumanLiff/HumanLiff%20-%20Project%20Page_files/SHERF_teaser.png"/></a> | Blender |
| [PrimDiffusion: Volumetric Primitives Diffusion for 3D Human Generation](https://frozenburning.github.io/projects/primdiffusion/) | <a href=https://frozenburning.github.io/projects/primdiffusion/><img src="https://openxrlab-share.oss-cn-hongkong.aliyuncs.com/xrfeitoria/pics/PrimDiffusion.png"></a> | Blender |

## License

Expand Down
113 changes: 113 additions & 0 deletions docs/en/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<!-- borrowed from https://github.com/Delgan/loguru/blob/master/docs/_templates/layout.html -->
{% extends '!layout.html' %}
{% block document %}
{{super()}}

<div class="github-corner">
<svg width="120" height="120" viewBox="0 0 250 250">
<a fill="transparent" href="https://github.com/{{github_user}}/{{github_repo}}" style="pointer-events:auto">
<path d="M0,0 L250,250 L250,0 Z"></path>
</a>
<g class="octocat">
<path fill="#343131" d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z" ></path>
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
fill="#ffffff" style="transform-origin: 130px 106px;" class="octo-arm"></path>
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="#ffffff" class="octo-body"></path>
<text x="240px" y="-10px" class="octo-click-text" stroke="#ffffff" fill="#ffffff">CLICK</text>
<g class="octo-glasses" visibility="hidden">
<svg fill="#343131" width="640" height="480">
<defs>
<symbol id="glasses" viewBox="0 0 512 512">
<path d="m465.4,247c-2.2,-22 -12.4,-43 -28.9,-58.4c-17.1,-15.9 -39.3,-24.7 -62.7,-24.7c-41.5,0 -77.3,27.4 -88.5,67c-7,-7 -18.5,-11.7 -29.3,-11.7c-10.8,0 -22.3,4.7 -29.3,11.7c-11.2,-39.6 -47,-67 -88.5,-67c-23.3,0 -45.6,8.7 -62.7,24.6c-16.5,15.5 -26.7,36.5 -28.9,58.5l-14.6,0l0,18l14.6,0c2.2,22 12.4,43 28.9,58.4c17.1,15.9 39.3,24.7 62.7,24.7c50.8,0 92.1,-41.2 92.1,-92c0,-0.1 0,-0.1 0,-0.1l0,0c0,-9.9 11.5,-21.6 25.7,-21.6s25.7,11.7 25.7,21.6l0,0c0,0 0,0 0,0.1c0,50.8 41.3,92 92.1,92c23.3,0 45.6,-8.7 62.7,-24.7c16.5,-15.4 26.7,-36.5 28.9,-58.5l14.6,0l0,-18l-14.6,0l0,0.1z" />
</symbol>
</defs>
<g>
<use x="530" y="-70" xlink:href="#glasses" transform="rotate(45 100,75) matrix(0.185,0,0,0.185,0,0) " />
</g>
</svg>
</g>
</g>
</svg>
</div>

<style>
.github-corner {
pointer-events: none;
position: absolute;
top: 0;
right: 0;
border: 0;
mix-blend-mode: darken;
}
.github-corner:hover .octocat{
transform-origin: center;
animation: octocat-grow 5s ease-in-out forwards;
}
@keyframes octocat-grow{
16%, 66%{
transform: scale(1.2);
}
33%{
transform: scale(1.1);
}
50%, 100%{
transform: scale(1.3);
}
83%{
transform: scale(1.4);
}
}
.octo-click-text {
font-weight: normal;
text-anchor: middle;
font-family: 'Avenir', Helvetica, Arial, sans-serif;
font-size: 20px;
stroke-width: 2px;
transform: rotate(45deg);
opacity: 0;
}
.github-corner:hover .octo-click-text {
animation: octocat-text 5s linear forwards
}
@keyframes octocat-text {
99% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.github-corner:hover .octo-arm{
animation: octocat-wave 400ms linear infinite;
}
@keyframes octocat-wave {
0%,50%,100% {
transform: rotate(0)
}
25% {
transform: rotate(-25deg)
}
75% {
transform: rotate(10deg)
}
}
.github-corner .octo-glasses{
visibility: visible;
opacity: 0;
transition: opacity 5s;
}
.github-corner:hover .octo-glasses{
opacity: 1;
animation: octocat-glass-wiggle 400ms linear forwards;
animation-delay: 4s;
}
@keyframes octocat-glass-wiggle {
0%, 50%, 100% {
transform: translateX(0px) translateY(0px);
}
25%, 75% {
transform: translateX(3px) translateY(-3px);
}
}
</style>
{% endblock %}
14 changes: 8 additions & 6 deletions docs/en/apis/sequence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ xrfeitoria.sequence
xrfeitoria.sequence.sequence_base.SequenceBase
xrfeitoria.sequence.sequence_blender.SequenceBlender
xrfeitoria.sequence.sequence_unreal.SequenceUnreal
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperBase
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperBlender
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperUnreal
:parts: 1
:align: center
:skip-classes: abc.ABC
Expand All @@ -22,6 +19,11 @@ xrfeitoria.sequence
xrfeitoria.sequence.sequence_base.SequenceBase
xrfeitoria.sequence.sequence_blender.SequenceBlender
xrfeitoria.sequence.sequence_unreal.SequenceUnreal
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperBase
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperBlender
xrfeitoria.sequence.sequence_wrapper.SequenceWrapperUnreal

----

.. autosummary::
:toctree: generated/
:template: custom-module.rst

xrfeitoria.sequence.sequence_wrapper
10 changes: 10 additions & 0 deletions docs/en/apis/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ Remote Functions
xrfeitoria.utils.functions.blender_functions
xrfeitoria.utils.functions.unreal_functions

Animation utils
---------------

.. autosummary::
:toctree: generated/
:template: custom-module.rst

xrfeitoria.utils.anim.motion
xrfeitoria.utils.anim.utils

RPC runner
----------

Expand Down
5 changes: 4 additions & 1 deletion docs/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_context = {
'github_user': 'openxrlab',
'github_repo': 'xrfeitoria',
}
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_css_files = ['override.css'] # override py property
html_theme_options = {
'navigation_depth': 3,
Expand Down
91 changes: 90 additions & 1 deletion docs/en/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,97 @@ We list some common troubles faced by many users and their corresponding solutio
Feel free to enrich the list if you find any frequent issues and have ways to help others to solve them.
If the contents here do not cover your issue, do not hesitate to create an issue!

-----------

API
----

.. _FAQ-Plugin:

How to use the plugin of Blender/Unreal under development
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

First you should clone the repo of XRFeitoria, and maybe modify the code of the plugin under ``src/XRFeitoriaBlender`` or ``src/XRFeitoriaUnreal``.
Then you can use the plugin under development by setting ``dev_plugin=True`` in :class:`init_blender <xrfeitoria.factory.init_blender>` or :class:`init_unreal <xrfeitoria.factory.init_unreal>`.

You can install the plugin by:

.. tabs::
.. tab:: Blender
.. code-block:: bash
:linenos:

git clone https://github.com/openxrlab/xrfeitoria.git
cd xrfeitoria
pip install -e .
python -c "import xrfeitoria as xf; xf.init_blender(replace_plugin=True, dev_plugin=True)"

# or through the code in tests
python -m tests.blender.init --dev [-b]

.. tab:: Unreal
.. code-block:: bash
:linenos:

git clone https://github.com/openxrlab/xrfeitoria.git
cd xrfeitoria
pip install -e .
python -c "import xrfeitoria as xf; xf.init_unreal(replace_plugin=True, dev_plugin=True)"

# or through the code in tests
python -m tests.unreal.init --dev [-b]


Build plugins
^^^^^^^^^^^^^^

If you want to publish plugins of your own, you can use the following command:

.. code-block:: powershell
:linenos:

# install xrfeitoria first
cd xrfeitoria
pip install .

# for instance, build plugins for Blender, UE 5.1, UE 5.2, and UE 5.3 on Windows.
# using powershell where backtick(`) is the line continuation character.
python -m xrfeitoria.utils.publish_plugins `
-u "C:/Program Files/Epic Games/UE_5.1/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
-u "C:/Program Files/Epic Games/UE_5.2/Engine/Binaries/Win64/UnrealEditor-Cmd.exe" `
-u "C:/Program Files/Epic Games/UE_5.3/Engine/Binaries/Win64/UnrealEditor-Cmd.exe"

Please check the path ``./src/dist`` for the generated plugins.
``XRFeitoriaBlender`` will be archived by default, and ``XRFeitoriaUnreal`` will only be built when you specify the Unreal editor path.
Make sure you have installed the corresponding Unreal Engine and Visual Studio before building the unreal plugin.

Find out the plugin version in ``./xrfeitoria/version.py``. Or by:

.. code-block:: bash

>>> python -c "import xrfeitoria; print(xrfeitoria.__version__)"
0.6.1.dev10+gd12997e.d20240122

You can set the environment variable ``XRFEITORIA__DIST_ROOT`` and ``XRFEITORIA__VERSION`` to change the plugins used by XRFeitoria.
Run your code ``xxx.py`` like:

.. tabs::
.. tab:: UNIX

.. code-block:: bash

XRFEITORIA__VERSION=$(python -c "import xrfeitoria; print(xrfeitoria.__version__)") \
XRFEITORIA__DIST_ROOT=src/dist \
python xxx.py

.. tab:: Windows

.. code-block:: powershell

$env:XRFEITORIA__VERSION=$(python -c "import xrfeitoria; print(xrfeitoria.__version__)")
$env:XRFEITORIA__DIST_ROOT="src/dist"; `
python xxx.py

.. _FAQ-stencil-value:

What is ``stencil_value``
Expand Down Expand Up @@ -59,10 +147,11 @@ you can set the environment variable ``BLENDER_PORT`` or ``UNREAL_PORT`` to chan

.. tab:: Windows

.. code-block:: bash
.. code-block:: powershell

$env:BLENDER_PORT=50051; python xxx.py

-----------

Known Issues
-------------
Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ dependencies = [
dynamic = ['version']

[project.optional-dependencies]
all = ["xrfeitoria[doc,vis]"]
all = ["xrfeitoria[anim,doc,vis]"]
anim = [
"scipy>1,<2"
]
doc = [
"autodoc_pydantic==2.0.1",
"docutils",
Expand All @@ -60,7 +63,7 @@ doc = [
"sphinx-tabs==3.4.1",
"enum-tools[sphinx]",
]
vis=[
vis = [
"matplotlib>=3.4,<4",
"opencv-python>=4,<5",
"flow_vis==0.1",
Expand All @@ -72,7 +75,9 @@ vis=[
"Documentation" = "https://xrfeitoria.readthedocs.io/en/latest/"

[project.scripts]
xf-render = "xrfeitoria.cmd.render:app"
xf-render = "xrfeitoria.cmd.blender.render:app"
xf-install-plugin = "xrfeitoria.cmd.blender.install_plugin:app"
xf-smplx = "xrfeitoria.cmd.blender.vis_smplx:app"

[tool.black]
line-length = 120
Expand Down
1 change: 1 addition & 0 deletions samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ python -m samples.blender.03_basic_render [-b] [--debug]
python -m samples.blender.04_staticmesh_render [-b] [--debug]
python -m samples.blender.05_skeletalmesh_render [-b] [--debug]
python -m samples.blender.06_custom_usage [-b] [--debug]
python -m samples.blender.07_amass
```

## Unreal
Expand Down
Loading
Loading