Steve Pham cd07167884 Python Relocation (#17540) 10 månader sedan
..
resources 59ef6f983f Removes Driller from ScriptCanvas 3 år sedan
README.md 947ca29f6a cleanup top-level inits and boilerplate 2 år sedan
__init__.py dce1fa72a7 cleanup and readme update 2 år sedan
base_widget.py b779f358d0 Refactor DCCsi to work better with O3DE changes (#4226) 3 år sedan
custom_treemodel.py b779f358d0 Refactor DCCsi to work better with O3DE changes (#4226) 3 år sedan
help_menu.py 5118db37a5 Update Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/shared/ui/help_menu.py 2 år sedan
puic_utils.py b87d23aed4 can successfully launch wing from o3de menu 2 år sedan
qt_settings.py 947ca29f6a cleanup top-level inits and boilerplate 2 år sedan
qtextedit_stdout.py cd07167884 Python Relocation (#17540) 10 månader sedan
samples.py 0291be764c attempt to get gem to boostrap correctly in o3de editor. 2 år sedan
templates.py b779f358d0 Refactor DCCsi to work better with O3DE changes (#4226) 3 år sedan
utils.py 947ca29f6a cleanup top-level inits and boilerplate 2 år sedan

README.md

Copyright (c) Contributors to the Open 3D Engine Project.For complete copyright and license terms please see the LICENSE at the root of this distribution.

SPDX-License-Identifier: Apache-2.0 OR MIT

DCCsi PySide2-tools

This readme contains information for developers who would like to use the PySide2-tools with their custom scripting/tools in O3DE.

Note: we do not install these with O3DE or the DCCsi

Use at your own risk, you are responsible for abiding by licensing and usage rights as defined in the repo: pyside2-tools/LICENSE-uic at dev · pyside/pyside2-tools · GitHub

This guide assumes you are working with the O3DE engine source, and the DccScriptingInterface Gem (aka DCCsi) however this should also work with installed builds with minor modifications to the steps provided below.

Basic steps:

You will want to clone the following repo:

GitHub - pyside/pyside2-toolsGitHub - pyside/pyside2-tools

These instructions are specific to working within the dccsi, you could modify them for more general use.

Clone repo into the DCCsi

This location in the DCCsi auto-bootstraps 3rdParty libs:

    3rdParty\Python\Lib\3.x\3.10.x

So you can safely clone or install a package here, this location is already configured in the .gitignore so that these packages don't accidentally get committed back to the source repo (but it's still best to also follow the steps after cloning to exclude the sub-repo)

# change dir to dccsi
> cd c:\path\to\o3de\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface

# clone the pyside2-tools repo
> git clone https://github.com/pyside/pyside2-tools .\3rdParty\Python\Lib\3.x\3.10.x\site-packages\pyside2tools

Notes: Python wont allow '-' as a character in a package name for imports, as this is a restricted character. Be careful the instructions above use 'pyside2tool' and not 'pyside2-tools' as the name of local repo folder.

if you'd like to see how other pkgs are installed into this location for dcc tools, see < dccsi >/foundation.py

Exclude from O3DE engine repo

Location and open the following file in a txt editor

open > c:/path/to/o3de/.git/info/exclude

Exclude the pyside2-tools repo clone

# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# 
# *~
C:/path/to/o3de/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/3rdParty/Python/Lib/3.x/3.10.x/site-packages/pyside2tools

Use the pyside2uic as a Python Package

You will need to make two slight changes to be able to use the pyside2uic as a import package in python tools.

First make an init file in the root:

3.10.x\site-packages\pyside2tools\__init__.py

(optional) open that init in an editor and add the following code

__all__ = ['pyside2uic']

Now find the following file, copy and rename

From:

    site-packages\pyside2tools\pyside2uic\__init__.py.in

To:

    site-packages\pyside2tools\pyside2uic\__init__.py

Now from scripts within the DCCsi, or tools that bootstrap the DCCsi, this should be usable as a Python import package.