This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
Version 3.0.0 (2021-04-01) #1241
Closed
Closed
Changes from 250 commits
Commits
Show all changes
355 commits
Select commit
Hold shift + click to select a range
36ef3ec
Merge pull request #1145 from pypeclub/feature/anatomy_schema_modific…
mkolar 958551d
Merge pull request #1149 from pypeclub/bugfix/harmony_missing_module
mkolar 8083534
Merge pull request #1150 from pypeclub/bugfix/pype-root-determination
mkolar 34ad43a
temporary fix of short names from settings
iLLiCiTiT 30481e9
fix typos
antirotor 4f08208
Merge pull request #1157 from pypeclub/feature/ftrack_module_refactor
mkolar 8450e1b
Merge pull request #1158 from pypeclub/bugfix/anatomy_types_fix
mkolar 6337354
always register lists of callbacks as time may override them
iLLiCiTiT 13d3b42
store only application name to config
iLLiCiTiT 834aa9c
skip applications lookup if passed value is empty
iLLiCiTiT f4e11d6
pop applicaitons from data
iLLiCiTiT 166f623
don't care about old parent name on rename
iLLiCiTiT b166b81
task types are not overriden with new but only added new ones
iLLiCiTiT 19ab249
applications are not stored to data in sync to avalon event
iLLiCiTiT 63cc02e
fixed collapsible_key dicitonary
iLLiCiTiT a7d00d5
Merge pull request #1153 from pypeclub/bugfix/maya-better-redshift-su…
mkolar 0e8bfe8
Merge pull request #1155 from pypeclub/feature/maya-deadline-group-an…
mkolar ebd6c08
mongo handler cache anatomy keys
iLLiCiTiT 1d55c43
removed anatomy templates/roots entities
iLLiCiTiT 95d8f7f
AnatomyEntity makes sure that all children all overriden on project o…
iLLiCiTiT af1c18d
added methods for conversion to valid value types
iLLiCiTiT 68d20b9
loaded values from default/studio/project are tried to convert
iLLiCiTiT eec4119
implemented some convertion methods
iLLiCiTiT 561ad4b
setter methods use conversion method
iLLiCiTiT d0fec11
added method to convert project document to anatomy data
iLLiCiTiT 150adab
implemented way how to load and save anatomy data to project document
iLLiCiTiT 544869c
it is possible to define keys to query for custom attributes
iLLiCiTiT 21ba189
implemented join query keys
iLLiCiTiT 4408137
fix key query
iLLiCiTiT 85a03bd
implemented method that can convert changes string to value
iLLiCiTiT d40165e
removed duplicated property avalon_custom_attributes
iLLiCiTiT 40865b9
define query keys of custom attributes
iLLiCiTiT 1c7010b
implemented property cust_attr_types_by_id
iLLiCiTiT 0231c73
fixed ordered dict
iLLiCiTiT a6b8300
event value is converted to real value
iLLiCiTiT 2e569e7
use join function
iLLiCiTiT e98fe26
formatting changes
iLLiCiTiT 4c28395
renamed idle_logic to idle_threads
iLLiCiTiT 6908ae0
moved idle thread to threads file
iLLiCiTiT c502cc2
event sync convert hierarchical values to proper type
iLLiCiTiT 47a7fbe
implemented function to retrieve python type for passed custom attribute
iLLiCiTiT a91c036
event sync to avalon is using get_python_type_for_custom_attribute
iLLiCiTiT f0f4a1c
define query keys
iLLiCiTiT c8bc66a
sync to avalon action is also using proper value type
iLLiCiTiT c8f1e14
added some docstrings
iLLiCiTiT df12e9a
fixed and made faster new entity creation
iLLiCiTiT 236ad65
use precached values
iLLiCiTiT 202ba64
implemented settings changes interface
iLLiCiTiT af0736d
Ftrack module listens to settings changes
iLLiCiTiT 49141bc
implemented function to calculate changes
iLLiCiTiT ce35976
notify pype modules about settings changes
iLLiCiTiT 7f72d15
changed key `tools` to `tools_env`
iLLiCiTiT 88369d8
changed defaults settings
iLLiCiTiT bfc48ca
ftrack module has create_ftrack_setting method
iLLiCiTiT dbe8bd8
ftrack module updates changes from settings attributes
iLLiCiTiT 48981b6
fix anatomy overrides
iLLiCiTiT 4fc12b8
convert #1067 to 3.0
mkolar b994e14
Merge pull request #1147 from pypeclub/feature/idle_manager_with_sepa…
mkolar 89ee780
raw json cares about value types
iLLiCiTiT 0c23cf0
fixed list items in schemas
iLLiCiTiT 9f04cd6
raw json widget also validate value types
iLLiCiTiT f4a3f43
application arguments are separated
iLLiCiTiT ea75b49
removed with_arguments key from path schema
iLLiCiTiT 8b86b06
fixed SystemSettings initialization in project settings root
iLLiCiTiT d46f096
changed order of platforms
iLLiCiTiT bf5dce7
resaved executables and arguments
iLLiCiTiT a844b96
changed how arguments are prepared for launch context
iLLiCiTiT 15677f5
fixed local settings
iLLiCiTiT e22fb7b
fixed app definition
iLLiCiTiT d3515e6
hound fix
iLLiCiTiT 6d58c3b
Merge pull request #1151 from pypeclub/feature/modifiable_dict_requir…
mkolar 39433d7
Merge pull request #1161 from pypeclub/feature/sync_anatomy_modificat…
mkolar cfa9039
Merge branch 'develop' into feature/1139-anatomy-data-on-project-docu…
iLLiCiTiT dd51ccd
short name is by default empty string
iLLiCiTiT db748c8
Merge pull request #1169 from pypeclub/feature/raw_json_type
mkolar 9ada659
Merge remote-tracking branch 'origin/develop' into feature/applicatio…
mkolar 0ae39b5
add nukex to python2 vendor prehook
mkolar ab99fc2
Merge pull request #1170 from pypeclub/feature/application_arguments_…
mkolar c24823b
sync to avalon creates anatomy data if are not set
iLLiCiTiT a5ad0e8
added some docstrings
iLLiCiTiT 77627a1
ModulesManager can accept different settings data
iLLiCiTiT 9abb719
pass new data to create modules manager
iLLiCiTiT 8a44461
Merge branch 'develop' into feature/1139-anatomy-data-on-project-docu…
iLLiCiTiT 7d8d7f9
fix system settings attribute
iLLiCiTiT bfea62c
fix site settings
iLLiCiTiT 27c6613
added ability to exclude locals on studio settings getters
iLLiCiTiT 7c88137
fixed updates
iLLiCiTiT 94a729e
hound fix
iLLiCiTiT b940d3b
Merge pull request #1168 from pypeclub/feature/1139-anatomy-data-on-p…
mkolar 57447f2
numbers can be converted to string for text input and enum
iLLiCiTiT 5bdfc29
value type of enum must always be string
iLLiCiTiT 4c89ade
added path to exception
iLLiCiTiT 42752c4
using specific exceptions for schema errors
iLLiCiTiT 5c7ea9d
enum entity was abstracted to be able do more specific schema validat…
iLLiCiTiT 16e11a2
hound fix
iLLiCiTiT 8fae7bf
Merge pull request #1179 from pypeclub/feature/settings_exceptions
mkolar 771a8e2
rename master version to hero
mkolar 33f319d
opacity has defined min/max and decimals
iLLiCiTiT cf68e07
resaved values
iLLiCiTiT 75d9607
number entity entity can convert stringified number to to number type
iLLiCiTiT 5a07975
moved separator out of options entity top be visible even if options …
iLLiCiTiT 60e563b
specify more packages of pywin32 module
iLLiCiTiT 0885fde
Merge pull request #1182 from pypeclub/bugfix/pywin_import_error
mkolar e5cc0e4
Merge pull request #1181 from pypeclub/bugfix/extract_burnin_settings
mkolar 222c610
fix super call for python 2 compatibility
iLLiCiTiT 9bfaa84
anatomy_keys and attribute_keys are created on demand
iLLiCiTiT a018bf2
Merge pull request #1183 from pypeclub/bugfix/enum_super_call
mkolar fed92e1
Merge branch 'develop' into feature/rename_master_to_hero_version
mkolar 0197eaa
settings ui can catch exceptions
iLLiCiTiT 26809ba
fixed dialog arguments
iLLiCiTiT 92591d4
plugin template also have 'active' key in
iLLiCiTiT 722909b
resaved defaults of optional plugins with active key
iLLiCiTiT 19ce8f7
Merge pull request #1185 from pypeclub/feature/settings_error_catch
mkolar 095b10d
Merge pull request #1186 from pypeclub/feature/active_key_for_optiona…
mkolar 593de5e
fix check of attribute values
iLLiCiTiT d0c772d
Merge pull request #1187 from pypeclub/bugfix/fix_handler_properties
mkolar 694cc12
Delete test_localsystem.txt
mkolar 635347c
Merge pull request #1184 from pypeclub/feature/rename_master_to_hero_…
mkolar 93c771e
variant template expect 3 keys app_name app_variant and app_variant_l…
iLLiCiTiT 34b2276
all aplications are passing new keys to variants
iLLiCiTiT 6b2abab
resaved keys in defaults
iLLiCiTiT 80abe4b
added active key t oremaining optional plugins
iLLiCiTiT 28f8589
saved default values
iLLiCiTiT d55d133
replaced dots in default tools
iLLiCiTiT 1ba1cf9
nuke shortcuts have valid keys
iLLiCiTiT 220454a
added key -> label mapping to nuke shortcut implementation
iLLiCiTiT 96a8043
defined allowed key symbols and regex in constants
iLLiCiTiT 7f39cf5
implemented exception InvalidKeySymbols
iLLiCiTiT 01d0660
immutable dict is validating keys with allowed symbols
iLLiCiTiT 48a300c
mutable dictionary validate keys on change and tries to fix them on load
iLLiCiTiT f5e9096
added key validation to roots entity
iLLiCiTiT 2567fee
added key validations to modifiable dict widget
iLLiCiTiT 994238a
better key validation
iLLiCiTiT 9a0070e
fixed modifiable dict collapsible key widget
iLLiCiTiT 73df415
extract review use None as value of width and height
iLLiCiTiT af300ff
added width and height items to extract review output definitions
iLLiCiTiT 6be4414
number entity can expect default value
iLLiCiTiT ea6f21e
resaved defaults of extract review plugin
iLLiCiTiT 712670e
moved project plugin paths to project settings
iLLiCiTiT bba39ff
save defaults of project plugins
iLLiCiTiT 2b4890e
removed usage of PYPE_PROJECT_PLUGINS
iLLiCiTiT 0b3953d
fix PUBLISH_PATH variable in celaction cli.py
iLLiCiTiT 960304a
removed usage of STUDIO_PLUGINS_PATH
iLLiCiTiT 1d279b3
register plugins from project settings on pype install
iLLiCiTiT 1089c5f
it is possible to define project specific environments
iLLiCiTiT 71c9fb4
implemented function to apply project specific environments
iLLiCiTiT 5793f98
added some docstring
iLLiCiTiT c98f4d8
standalone publisher sets project environments before publish is started
iLLiCiTiT 6c74ea0
added new function to lib's init file
iLLiCiTiT 6eb7921
removed celaction publish variant
iLLiCiTiT 07fb637
dashes are used as version serparators instead of underscore on apps
iLLiCiTiT 2fbe5d8
tools are dynamic dictionaries
iLLiCiTiT ddd5cbb
changed exception type on root entity
iLLiCiTiT c24ba96
added schema validation on object_type key in mutable dict item
iLLiCiTiT 9582d9f
resaved tools
iLLiCiTiT 76bcca4
changed how tools are used
iLLiCiTiT e3c4492
fix tool name in create update attriutes action
iLLiCiTiT 18a56cc
update houdini menu
mkolar 2ba85e8
Merge pull request #1195 from pypeclub/feature/update_houdini
mkolar 737e35a
update workfiles tool in houdini
mkolar f8b5edc
Merge pull request #1189 from pypeclub/feature/remaining_active_key_f…
mkolar bcae09e
Merge branch 'develop' into feature/key_validations
mkolar c950453
Merge pull request #1192 from pypeclub/feature/extract_review_with_re…
mkolar 68e5e7d
Merge pull request #1193 from pypeclub/feature/project_plugin_paths
mkolar 5d61014
fix houdini defaults
iLLiCiTiT 8b4f462
removed "mtoa" from mtoa variants
iLLiCiTiT 227e1ae
enhanced labels of tools in enum items
iLLiCiTiT 6048477
removed variants label and variants are as collapsible keys
iLLiCiTiT d9c263b
fixed tools labels getting
iLLiCiTiT 5544f93
implemented prelaunch hook that will try to install PySide2 to blender
iLLiCiTiT 6520dd1
make prelaunch hook not critical
iLLiCiTiT 6cff8c5
Nuke: adding keys and values to settings for Loaders
jakubjezek001 0d0dd26
Nuke: adding Loaders with template for name of node
jakubjezek001 73aeda9
implementing #1114
jakubjezek001 e9b4e7e
show error message as message in error detail
iLLiCiTiT 449334d
Deadline: adding limit groups
jakubjezek001 6f68a7c
removed usage of settings for ftrack mongo names
iLLiCiTiT b29dbc1
removed settings of ftrack mongo variables from settings
iLLiCiTiT 1c469d3
catch exceptions on save in settings ui
iLLiCiTiT da869ef
Merge pull request #1190 from pypeclub/feature/key_validations
mkolar 766199e
Merge pull request #1205 from pypeclub/feature/3.0_error_message_in_p…
mkolar 5d0ef4f
Merge pull request #1209 from pypeclub/feature/remove_ftrack_mongo_se…
mkolar 48faec3
bulk mov instance collecting separated from batch instances
iLLiCiTiT e22cb6a
moved `get_subset_name` logic from pype.plugin to pype.lib
iLLiCiTiT f34d25f
implemented validator of task name existence on asset document
iLLiCiTiT 62db507
removed unused import
iLLiCiTiT bc09f31
check for full match instead of simple match
iLLiCiTiT 687e7c6
fix standalone publisher
iLLiCiTiT def9452
aded python 2 compatibility for fullmatch
iLLiCiTiT 0ed283f
Merge pull request #1210 from pypeclub/feature/basic_save_catch_setti…
mkolar d81625c
reimplemented pype's workfiles tool in nuke
iLLiCiTiT 6d198ab
removed unnecessary function
iLLiCiTiT c8e2e77
remove unused import
iLLiCiTiT f8a220d
settings are stored as dictionaries instead of json string
iLLiCiTiT fd64660
OTIO: adding python-2 version to `pype.vendor`
jakubjezek001 824be75
created new project config schema validating new keys
iLLiCiTiT 43ac74c
created new project schema using new config reference
iLLiCiTiT 302a00c
sync to avalon is using new schemas
iLLiCiTiT 7a45a1a
anatomy handler can handle not existing projects
iLLiCiTiT c5b10b9
Fix - handle duplication of Task name
kalisp 52b1619
removed env_group_key from application schemas
iLLiCiTiT 6fa65a9
removed previous implementation of Application object
iLLiCiTiT dcdbae5
implemented application group class it's object holds environments
iLLiCiTiT 68954e0
implemented new Application class which use more data from group and …
iLLiCiTiT be66e4c
added docstring to ApplicationGroup
iLLiCiTiT f5a046b
ApplicationGroup creates objects of Application class
iLLiCiTiT aa0b321
ApplicationManager is using new classes to get applications
iLLiCiTiT b6b1ab4
reimplemented require Application methods
iLLiCiTiT a507d78
fixed attributes usage
iLLiCiTiT 9a18da3
Implemented EnvironmentToolGroup to hold tool group
iLLiCiTiT ed148c7
renamed ApplicationTool to EnvironmentTool and changed what data holds
iLLiCiTiT 19313b0
ApplicationManager use new tools classes to define it's tools
iLLiCiTiT 1a4abd7
changed how environments for apps and tools are retrieved
iLLiCiTiT 9f14f89
removed usage of "settings_env" key in launch context
iLLiCiTiT 0caa772
removed label and icon from variants
iLLiCiTiT f1b154a
group does not have to have set label
iLLiCiTiT fb790c7
Merge pull request #1198 from pypeclub/feature/blender_pyside_install…
mkolar b1492cf
Merge pull request #1201 from pypeclub/3.0/feature/1100-nuke-read-con…
mkolar a26529e
Merge pull request #1203 from pypeclub/3.0/bugfix/1089-nuke-avalontab…
mkolar 07e9b44
Merge pull request #1212 from pypeclub/feature/3.0_bulk_mov_strict_task
mkolar e8fe8f2
Merge pull request #1213 from pypeclub/bugfix/3.0_profile_regex_fix
mkolar 0f9c845
Merge pull request #1219 from pypeclub/bugfix/1216-workfiles-tool-for…
mkolar 1404576
removed SettingsFileHandler which is not and can't be used
iLLiCiTiT 6221b6a
hide expainding button if content layout does not have any widget
iLLiCiTiT e3d09f2
Merge pull request #1223 from pypeclub/bugfix/new_project_schemas
mkolar 4c44d42
Merge pull request #1222 from pypeclub/3.0/feature/python2-OpenTimeli…
mkolar 7f49d49
Merge pull request #1221 from pypeclub/feature/store_settings_as_dict
mkolar 56c4ae7
removed studio soft key from general and replaced with pype_path key
iLLiCiTiT 8586301
defined constant for global settings type
iLLiCiTiT 969b2de
resaved defaults
iLLiCiTiT cd9254b
settings handler saves pype_path from system settings to global setti…
iLLiCiTiT a944227
removed unused function load_environments from igniter
iLLiCiTiT e7781a4
added function to load global settings from mongo
iLLiCiTiT b98fd5d
modified `get_pype_path_from_db` to use `get_pype_global_settings` fu…
iLLiCiTiT c51f311
changed how paths are checked
iLLiCiTiT 4eab334
fix label issue
iLLiCiTiT a15f879
Merge pull request #1228 from pypeclub/feature/apps_without_env_groups
mkolar e8c5221
Merge branch 'develop' into feature/global_settings
iLLiCiTiT 49fafb7
Merge pull request #1225 from pypeclub/fix/harmony_task_duplication_i…
mkolar 75f9fd7
close validation mongo connection
iLLiCiTiT ae9bf0c
Merge pull request #1232 from pypeclub/feature/remove_settings_file_h…
mkolar 77fbc0b
Merge pull request #1233 from pypeclub/feature/hide_expanding_btn
mkolar 26a4c68
Merge pull request #1207 from pypeclub/3.0/feature/1164-nuke-deadline…
mkolar 86755f9
fix global settings dict hierarchy
iLLiCiTiT fae5a65
added `url` argument back to docstring
iLLiCiTiT 3280d1a
removed forgotten line
iLLiCiTiT fc103ec
auto create new item on getitem in mutable dict
iLLiCiTiT 9bb1d87
added sequence tag to extract review profiles
iLLiCiTiT ef7188b
Merge pull request #1239 from pypeclub/feature/minor_settings_changes
mkolar a6dc83a
Merge pull request #1237 from pypeclub/feature/global_settings
mkolar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
import os | ||
import subprocess | ||
from pype.lib import PreLaunchHook | ||
|
||
|
||
class InstallPySideToBlender(PreLaunchHook): | ||
"""Install Qt binding to blender's python packages. | ||
|
||
Prelaunch hook does 2 things: | ||
1.) Blender's python packages are pushed to the beginning of PYTHONPATH. | ||
2.) Check if blender has installed PySide2 and will try to install if not. | ||
|
||
For pipeline implementation is required to have Qt binding installed in | ||
blender's python packages. | ||
|
||
Prelaunch hook can work only on Windows right now. | ||
""" | ||
|
||
app_groups = ["blender"] | ||
platforms = ["windows"] | ||
|
||
def execute(self): | ||
# Prelaunch hook is not crutial | ||
try: | ||
self.inner_execute() | ||
except Exception: | ||
self.log.warning( | ||
"Processing of {} crashed.".format(self.__class__.__name__), | ||
exc_info=True | ||
) | ||
|
||
def inner_execute(self): | ||
# Get blender's python directory | ||
executable = self.launch_context.executable.executable_path | ||
# Blender installation contain subfolder named with it's version where | ||
# python binaries are stored. | ||
version_subfolder = self.launch_context.app_name.split("_")[1] | ||
pythond_dir = os.path.join( | ||
os.path.dirname(executable), | ||
version_subfolder, | ||
"python" | ||
) | ||
|
||
# Change PYTHONPATH to contain blender's packages as first | ||
python_paths = [ | ||
os.path.join(pythond_dir, "lib"), | ||
os.path.join(pythond_dir, "lib", "site-packages"), | ||
] | ||
python_path = self.launch_context.env.get("PYTHONPATH") or "" | ||
for path in python_path.split(os.pathsep): | ||
if path: | ||
python_paths.append(path) | ||
|
||
self.launch_context.env["PYTHONPATH"] = os.pathsep.join(python_paths) | ||
|
||
# Get blender's python executable | ||
python_executable = os.path.join(pythond_dir, "bin", "python.exe") | ||
if not os.path.exists(python_executable): | ||
self.log.warning( | ||
"Couldn't find python executable for blender. {}".format( | ||
executable | ||
) | ||
) | ||
return | ||
|
||
# Check if PySide2 is installed and skip if yes | ||
if self.is_pyside_installed(python_executable): | ||
return | ||
|
||
# Install PySide2 in blender's python | ||
self.install_pyside_windows(python_executable) | ||
|
||
def install_pyside_windows(self, python_executable): | ||
"""Install PySide2 python module to blender's python. | ||
|
||
Installation requires administration rights that's why it is required | ||
to use "pywin32" module which can execute command's and ask for | ||
administration rights. | ||
""" | ||
try: | ||
import win32api | ||
import win32con | ||
import win32process | ||
import win32event | ||
import pywintypes | ||
from win32comext.shell.shell import ShellExecuteEx | ||
from win32comext.shell import shellcon | ||
except Exception: | ||
self.log.warning("Couldn't import \"pywin32\" modules") | ||
return | ||
|
||
try: | ||
# Parameters | ||
# - use "-m pip" as module pip to install PySide2 and argument | ||
# "--ignore-installed" is to force install module to blender's | ||
# site-packages and make sure it is binary compatible | ||
parameters = "-m pip install --ignore-installed PySide2" | ||
|
||
# Execute command and ask for administrator's rights | ||
process_info = ShellExecuteEx( | ||
nShow=win32con.SW_SHOWNORMAL, | ||
fMask=shellcon.SEE_MASK_NOCLOSEPROCESS, | ||
lpVerb="runas", | ||
lpFile=python_executable, | ||
lpParameters=parameters, | ||
lpDirectory=os.path.dirname(python_executable) | ||
) | ||
process_handle = process_info["hProcess"] | ||
obj = win32event.WaitForSingleObject( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. local variable 'obj' is assigned to but never used |
||
process_handle, win32event.INFINITE | ||
) | ||
returncode = win32process.GetExitCodeProcess(process_handle) | ||
if returncode == 0: | ||
self.log.info( | ||
"Successfully installed PySide2 module to blender." | ||
) | ||
return | ||
except pywintypes.error: | ||
pass | ||
|
||
self.log.warning("Failed to instal PySide2 module to blender.") | ||
|
||
def is_pyside_installed(self, python_executable): | ||
"""Check if PySide2 module is in blender's pip list. | ||
|
||
Check that PySide2 is installed directly in blender's site-packages. | ||
It is possible that it is installed in user's site-packages but that | ||
may be incompatible with blender's python. | ||
""" | ||
# Get pip list from blender's python executable | ||
args = [python_executable, "-m", "pip", "list"] | ||
process = subprocess.Popen(args, stdout=subprocess.PIPE) | ||
stdout, _ = process.communicate() | ||
lines = stdout.decode().split("\r\n") | ||
# Second line contain dashes that define maximum length of module name. | ||
# Second column of dashes define maximum length of module version. | ||
package_dashes, *_ = lines[1].split(" ") | ||
package_len = len(package_dashes) | ||
|
||
# Got through printed lines starting at line 3 | ||
for idx in range(2, len(lines)): | ||
line = lines[idx] | ||
if not line: | ||
continue | ||
package_name = line[0:package_len].strip() | ||
if package_name.lower() == "pyside2": | ||
return True | ||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
from avalon import pipeline, houdini | ||
from avalon import api, houdini | ||
import hou | ||
|
||
|
||
def main(): | ||
print("Installing Avalon ...") | ||
pipeline.install(houdini) | ||
api.install(houdini) | ||
|
||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'win32api' imported but unused