PrEditor 0.0.0.dev1__py2.py3-none-any.whl → 0.1.0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of PrEditor might be problematic. Click here for more details.

Files changed (363) hide show
  1. PrEditor-0.1.0.dist-info/LICENSE +165 -0
  2. PrEditor-0.1.0.dist-info/METADATA +212 -0
  3. PrEditor-0.1.0.dist-info/RECORD +149 -0
  4. {PrEditor-0.0.0.dev1.dist-info → PrEditor-0.1.0.dist-info}/WHEEL +1 -1
  5. PrEditor-0.1.0.dist-info/entry_points.txt +18 -0
  6. PrEditor-0.1.0.dist-info/top_level.txt +1 -0
  7. preditor/__init__.py +301 -0
  8. {blurdev → preditor}/__main__.py +13 -13
  9. preditor/about_module.py +166 -0
  10. preditor/cli.py +192 -0
  11. {blurdev → preditor}/contexts.py +119 -119
  12. preditor/cores/core.py +65 -0
  13. preditor/dccs/maya/PrEditor_maya.mod +2 -0
  14. preditor/dccs/maya/plug-ins/PrEditor_maya.py +108 -0
  15. preditor/debug.py +294 -0
  16. blurdev/scintilla/delayable_engine.py → preditor/delayable_engine/__init__.py +310 -299
  17. blurdev/scintilla/delayables/base.py → preditor/delayable_engine/delayables.py +85 -85
  18. {blurdev → preditor}/enum.py +728 -1003
  19. {blurdev → preditor}/gui/__init__.py +84 -125
  20. preditor/gui/app.py +159 -0
  21. {blurdev → preditor}/gui/codehighlighter.py +209 -219
  22. {blurdev → preditor}/gui/completer.py +226 -236
  23. {blurdev → preditor}/gui/console.py +801 -858
  24. {blurdev → preditor}/gui/dialog.py +200 -216
  25. preditor/gui/drag_tab_bar.py +190 -0
  26. preditor/gui/editor_chooser.py +57 -0
  27. {blurdev → preditor}/gui/errordialog.py +100 -97
  28. preditor/gui/fuzzy_search/fuzzy_search.py +93 -0
  29. preditor/gui/group_tab_widget/__init__.py +319 -0
  30. preditor/gui/group_tab_widget/grouped_tab_menu.py +35 -0
  31. preditor/gui/group_tab_widget/grouped_tab_models.py +108 -0
  32. preditor/gui/group_tab_widget/grouped_tab_widget.py +75 -0
  33. preditor/gui/group_tab_widget/one_tab_widget.py +54 -0
  34. preditor/gui/level_buttons.py +349 -0
  35. {blurdev → preditor}/gui/logger_window_handler.py +46 -45
  36. {blurdev → preditor}/gui/loggerwindow.py +1205 -1417
  37. {blurdev → preditor}/gui/newtabwidget.py +69 -68
  38. {blurdev → preditor}/gui/redmine_login_dialog.py +63 -61
  39. {blurdev → preditor}/gui/set_text_editor_path_dialog.py +59 -57
  40. preditor/gui/ui/editor_chooser.ui +93 -0
  41. {blurdev → preditor}/gui/ui/errordialog.ui +81 -81
  42. {blurdev → preditor}/gui/ui/loggerwindow.ui +1030 -864
  43. {blurdev → preditor}/gui/ui/redmine_login_dialog.ui +124 -124
  44. {blurdev → preditor}/gui/ui/set_text_editor_path_dialog.ui +149 -149
  45. {blurdev → preditor}/gui/window.py +183 -199
  46. preditor/gui/workbox_mixin.py +357 -0
  47. preditor/gui/workbox_text_edit.py +117 -0
  48. preditor/gui/workboxwidget.py +276 -0
  49. preditor/logging_config.py +52 -0
  50. preditor/osystem.py +401 -0
  51. preditor/plugins.py +65 -0
  52. preditor/prefs.py +74 -0
  53. {blurdev → preditor}/resource/environment_variables.html +26 -38
  54. {blurdev → preditor}/resource/error_mail.html +85 -85
  55. {blurdev → preditor}/resource/error_mail_inline.html +41 -41
  56. preditor/resource/img/README.md +7 -0
  57. preditor/resource/img/arrow_forward.png +0 -0
  58. preditor/resource/img/check-bold.png +0 -0
  59. preditor/resource/img/chevron-down.png +0 -0
  60. preditor/resource/img/chevron-up.png +0 -0
  61. preditor/resource/img/close-thick.png +0 -0
  62. preditor/resource/img/comment-edit.png +0 -0
  63. preditor/resource/img/content-copy.png +0 -0
  64. preditor/resource/img/content-cut.png +0 -0
  65. preditor/resource/img/content-duplicate.png +0 -0
  66. preditor/resource/img/content-paste.png +0 -0
  67. preditor/resource/img/content-save.png +0 -0
  68. preditor/resource/img/debug_disabled.png +0 -0
  69. preditor/resource/img/eye-check.png +0 -0
  70. preditor/resource/img/file-plus.png +0 -0
  71. preditor/resource/img/file-remove.png +0 -0
  72. preditor/resource/img/format-align-left.png +0 -0
  73. preditor/resource/img/format-letter-case-lower.png +0 -0
  74. preditor/resource/img/format-letter-case-upper.png +0 -0
  75. preditor/resource/img/information.png +0 -0
  76. preditor/resource/img/logging_critical.png +0 -0
  77. preditor/resource/img/logging_custom.png +0 -0
  78. preditor/resource/img/logging_debug.png +0 -0
  79. preditor/resource/img/logging_error.png +0 -0
  80. preditor/resource/img/logging_info.png +0 -0
  81. preditor/resource/img/logging_not_set.png +0 -0
  82. preditor/resource/img/logging_warning.png +0 -0
  83. preditor/resource/img/marker.png +0 -0
  84. preditor/resource/img/play.png +0 -0
  85. preditor/resource/img/playlist-play.png +0 -0
  86. preditor/resource/img/plus-minus-variant.png +0 -0
  87. preditor/resource/img/preditor.ico +0 -0
  88. preditor/resource/img/preditor.png +0 -0
  89. preditor/resource/img/preditor.psd +0 -0
  90. preditor/resource/img/preditor.svg +44 -0
  91. preditor/resource/img/restart.svg +1 -0
  92. preditor/resource/img/skip-forward-outline.png +0 -0
  93. preditor/resource/img/skip-next-outline.png +0 -0
  94. preditor/resource/img/skip-next.png +0 -0
  95. preditor/resource/img/skip-previous.png +0 -0
  96. preditor/resource/img/subdirectory-arrow-right.png +0 -0
  97. preditor/resource/img/text-search-variant.png +0 -0
  98. {blurdev → preditor}/resource/lang/python.json +30 -30
  99. preditor/resource/settings.ini +25 -0
  100. {blurdev/resource/stylesheet/logger → preditor/resource/stylesheet}/Bright.css +56 -61
  101. {blurdev → preditor}/resource/stylesheet/Dark.css +190 -132
  102. {blurdev → preditor}/scintilla/__init__.py +22 -28
  103. preditor/scintilla/delayables/__init__.py +11 -0
  104. {blurdev → preditor}/scintilla/delayables/smart_highlight.py +94 -93
  105. {blurdev → preditor}/scintilla/delayables/spell_check.py +173 -172
  106. {blurdev → preditor}/scintilla/documenteditor.py +2039 -2115
  107. {blurdev → preditor}/scintilla/finddialog.py +68 -81
  108. {blurdev → preditor}/scintilla/lang/__init__.py +80 -93
  109. {blurdev → preditor}/scintilla/lang/config/bash.ini +15 -15
  110. {blurdev → preditor}/scintilla/lang/config/batch.ini +14 -14
  111. {blurdev → preditor}/scintilla/lang/config/cpp.ini +19 -19
  112. {blurdev → preditor}/scintilla/lang/config/css.ini +19 -19
  113. {blurdev → preditor}/scintilla/lang/config/eyeonscript.ini +17 -17
  114. {blurdev → preditor}/scintilla/lang/config/html.ini +21 -21
  115. {blurdev → preditor}/scintilla/lang/config/javascript.ini +24 -24
  116. {blurdev → preditor}/scintilla/lang/config/lua.ini +16 -16
  117. {blurdev → preditor}/scintilla/lang/config/maxscript.ini +20 -20
  118. {blurdev → preditor}/scintilla/lang/config/mel.ini +18 -18
  119. {blurdev → preditor}/scintilla/lang/config/mu.ini +22 -22
  120. {blurdev → preditor}/scintilla/lang/config/nsi.ini +5 -5
  121. {blurdev → preditor}/scintilla/lang/config/perl.ini +19 -19
  122. {blurdev → preditor}/scintilla/lang/config/puppet.ini +19 -19
  123. {blurdev → preditor}/scintilla/lang/config/python.ini +28 -28
  124. {blurdev → preditor}/scintilla/lang/config/ruby.ini +19 -19
  125. {blurdev → preditor}/scintilla/lang/config/sql.ini +7 -7
  126. {blurdev → preditor}/scintilla/lang/config/xml.ini +21 -21
  127. {blurdev → preditor}/scintilla/lang/config/yaml.ini +18 -18
  128. {blurdev → preditor}/scintilla/lang/language.py +240 -250
  129. preditor/scintilla/lexers/__init__.py +0 -0
  130. {blurdev → preditor}/scintilla/lexers/cpplexer.py +21 -30
  131. {blurdev → preditor}/scintilla/lexers/javascriptlexer.py +25 -34
  132. {blurdev → preditor}/scintilla/lexers/maxscriptlexer.py +234 -253
  133. {blurdev → preditor}/scintilla/lexers/mellexer.py +368 -376
  134. {blurdev → preditor}/scintilla/lexers/mulexer.py +32 -41
  135. {blurdev → preditor}/scintilla/lexers/pythonlexer.py +41 -50
  136. {blurdev → preditor}/scintilla/ui/finddialog.ui +160 -160
  137. preditor/settings.py +71 -0
  138. preditor/stream/__init__.py +80 -0
  139. preditor/stream/director.py +56 -0
  140. preditor/stream/manager.py +74 -0
  141. preditor/streamhandler_helper.py +46 -0
  142. preditor/utils/__init__.py +0 -0
  143. preditor/utils/cute.py +30 -0
  144. preditor/utils/stylesheets.py +54 -0
  145. {blurdev → preditor}/version.py +5 -5
  146. preditor/weakref.py +363 -0
  147. PrEditor-0.0.0.dev1.dist-info/METADATA +0 -51
  148. PrEditor-0.0.0.dev1.dist-info/RECORD +0 -279
  149. PrEditor-0.0.0.dev1.dist-info/top_level.txt +0 -1
  150. blurdev/__init__.py +0 -356
  151. blurdev/cores/__init__.py +0 -98
  152. blurdev/cores/application.py +0 -26
  153. blurdev/cores/core.py +0 -634
  154. blurdev/debug.py +0 -593
  155. blurdev/external.py +0 -391
  156. blurdev/gui/level_buttons.py +0 -585
  157. blurdev/gui/workboxwidget.py +0 -205
  158. blurdev/logger.py +0 -238
  159. blurdev/osystem.py +0 -813
  160. blurdev/prefs.py +0 -33
  161. blurdev/protocols/__init__.py +0 -71
  162. blurdev/protocols/write_std_output_handler.py +0 -83
  163. blurdev/resource/designer_plugins.xml +0 -9
  164. blurdev/resource/error_email_old.html +0 -41
  165. blurdev/resource/img/add.png +0 -0
  166. blurdev/resource/img/ajax-loader.gif +0 -0
  167. blurdev/resource/img/application.png +0 -0
  168. blurdev/resource/img/applications.png +0 -0
  169. blurdev/resource/img/assburner.png +0 -0
  170. blurdev/resource/img/assfreezer.png +0 -0
  171. blurdev/resource/img/bar.gif +0 -0
  172. blurdev/resource/img/blank.png +0 -0
  173. blurdev/resource/img/blurdev.png +0 -0
  174. blurdev/resource/img/calendar_disabled.png +0 -0
  175. blurdev/resource/img/calendar_enabled.png +0 -0
  176. blurdev/resource/img/cancel.png +0 -0
  177. blurdev/resource/img/custom.png +0 -0
  178. blurdev/resource/img/debug_high.png +0 -0
  179. blurdev/resource/img/debug_low.png +0 -0
  180. blurdev/resource/img/debug_mid.png +0 -0
  181. blurdev/resource/img/debug_off.png +0 -0
  182. blurdev/resource/img/django.png +0 -0
  183. blurdev/resource/img/doc.png +0 -0
  184. blurdev/resource/img/edit.png +0 -0
  185. blurdev/resource/img/elemental.png +0 -0
  186. blurdev/resource/img/explore.png +0 -0
  187. blurdev/resource/img/favorite.png +0 -0
  188. blurdev/resource/img/file.png +0 -0
  189. blurdev/resource/img/folder.png +0 -0
  190. blurdev/resource/img/ide/add.png +0 -0
  191. blurdev/resource/img/ide/add_note.png +0 -0
  192. blurdev/resource/img/ide/arrow_down.png +0 -0
  193. blurdev/resource/img/ide/arrow_up.png +0 -0
  194. blurdev/resource/img/ide/check.png +0 -0
  195. blurdev/resource/img/ide/class.png +0 -0
  196. blurdev/resource/img/ide/clean.png +0 -0
  197. blurdev/resource/img/ide/clearlog.png +0 -0
  198. blurdev/resource/img/ide/close.png +0 -0
  199. blurdev/resource/img/ide/comment_add.png +0 -0
  200. blurdev/resource/img/ide/comment_remove.png +0 -0
  201. blurdev/resource/img/ide/comment_toggle.png +0 -0
  202. blurdev/resource/img/ide/console.png +0 -0
  203. blurdev/resource/img/ide/copy.png +0 -0
  204. blurdev/resource/img/ide/copylstrip.png +0 -0
  205. blurdev/resource/img/ide/cut.png +0 -0
  206. blurdev/resource/img/ide/edit.png +0 -0
  207. blurdev/resource/img/ide/find.png +0 -0
  208. blurdev/resource/img/ide/find_replace.png +0 -0
  209. blurdev/resource/img/ide/findnext.png +0 -0
  210. blurdev/resource/img/ide/findprev.png +0 -0
  211. blurdev/resource/img/ide/folder_find.png +0 -0
  212. blurdev/resource/img/ide/function.png +0 -0
  213. blurdev/resource/img/ide/git-bash.png +0 -0
  214. blurdev/resource/img/ide/git-gui.png +0 -0
  215. blurdev/resource/img/ide/gitk.png +0 -0
  216. blurdev/resource/img/ide/goto.png +0 -0
  217. blurdev/resource/img/ide/goto_def.png +0 -0
  218. blurdev/resource/img/ide/help.png +0 -0
  219. blurdev/resource/img/ide/highlighter.png +0 -0
  220. blurdev/resource/img/ide/lowercase.png +0 -0
  221. blurdev/resource/img/ide/newfile.png +0 -0
  222. blurdev/resource/img/ide/newfolder.png +0 -0
  223. blurdev/resource/img/ide/newproject.png +0 -0
  224. blurdev/resource/img/ide/newwizard.png +0 -0
  225. blurdev/resource/img/ide/open.png +0 -0
  226. blurdev/resource/img/ide/paste.png +0 -0
  227. blurdev/resource/img/ide/pdb_continue.png +0 -0
  228. blurdev/resource/img/ide/pdb_down.png +0 -0
  229. blurdev/resource/img/ide/pdb_next.png +0 -0
  230. blurdev/resource/img/ide/pdb_step.png +0 -0
  231. blurdev/resource/img/ide/pdb_up.png +0 -0
  232. blurdev/resource/img/ide/plus_minus.png +0 -0
  233. blurdev/resource/img/ide/preferences.png +0 -0
  234. blurdev/resource/img/ide/project_find.png +0 -0
  235. blurdev/resource/img/ide/python.png +0 -0
  236. blurdev/resource/img/ide/pyular.png +0 -0
  237. blurdev/resource/img/ide/qt.png +0 -0
  238. blurdev/resource/img/ide/quit.png +0 -0
  239. blurdev/resource/img/ide/redo.png +0 -0
  240. blurdev/resource/img/ide/refresh.png +0 -0
  241. blurdev/resource/img/ide/remove.png +0 -0
  242. blurdev/resource/img/ide/ruler.png +0 -0
  243. blurdev/resource/img/ide/run.png +0 -0
  244. blurdev/resource/img/ide/runall.png +0 -0
  245. blurdev/resource/img/ide/runallclear.png +0 -0
  246. blurdev/resource/img/ide/runselected.png +0 -0
  247. blurdev/resource/img/ide/runselectedclear.png +0 -0
  248. blurdev/resource/img/ide/save.png +0 -0
  249. blurdev/resource/img/ide/saveas.png +0 -0
  250. blurdev/resource/img/ide/sdk.png +0 -0
  251. blurdev/resource/img/ide/separator.png +0 -0
  252. blurdev/resource/img/ide/tabbed.png +0 -0
  253. blurdev/resource/img/ide/tile.png +0 -0
  254. blurdev/resource/img/ide/toolbar.png +0 -0
  255. blurdev/resource/img/ide/undo.png +0 -0
  256. blurdev/resource/img/ide/uppercase.png +0 -0
  257. blurdev/resource/img/ide/view_as.png +0 -0
  258. blurdev/resource/img/ide/windowed.png +0 -0
  259. blurdev/resource/img/ide.ico +0 -0
  260. blurdev/resource/img/ide.png +0 -0
  261. blurdev/resource/img/ide48.png +0 -0
  262. blurdev/resource/img/info.png +0 -0
  263. blurdev/resource/img/legacy tool.png +0 -0
  264. blurdev/resource/img/library.png +0 -0
  265. blurdev/resource/img/logger/about.png +0 -0
  266. blurdev/resource/img/logger/arrow_forward.png +0 -0
  267. blurdev/resource/img/logger/clear.png +0 -0
  268. blurdev/resource/img/logger/close.png +0 -0
  269. blurdev/resource/img/logger/debug_disabled.png +0 -0
  270. blurdev/resource/img/logger/debug_high.png +0 -0
  271. blurdev/resource/img/logger/debug_low.png +0 -0
  272. blurdev/resource/img/logger/debug_mid.png +0 -0
  273. blurdev/resource/img/logger/down.png +0 -0
  274. blurdev/resource/img/logger/find.png +0 -0
  275. blurdev/resource/img/logger/logging_critical.png +0 -0
  276. blurdev/resource/img/logger/logging_debug.png +0 -0
  277. blurdev/resource/img/logger/logging_error.png +0 -0
  278. blurdev/resource/img/logger/logging_info.png +0 -0
  279. blurdev/resource/img/logger/logging_not_set.png +0 -0
  280. blurdev/resource/img/logger/logging_warning.png +0 -0
  281. blurdev/resource/img/logger/next.png +0 -0
  282. blurdev/resource/img/logger/play.png +0 -0
  283. blurdev/resource/img/logger/playlist_play.png +0 -0
  284. blurdev/resource/img/logger/previous.png +0 -0
  285. blurdev/resource/img/logger/return.png +0 -0
  286. blurdev/resource/img/logger/save.png +0 -0
  287. blurdev/resource/img/logger/subdirectory_arrow_right.png +0 -0
  288. blurdev/resource/img/logger/up.png +0 -0
  289. blurdev/resource/img/lovebar.png +0 -0
  290. blurdev/resource/img/new.png +0 -0
  291. blurdev/resource/img/new_selected.png +0 -0
  292. blurdev/resource/img/node.png +0 -0
  293. blurdev/resource/img/ok.png +0 -0
  294. blurdev/resource/img/options.png +0 -0
  295. blurdev/resource/img/packages.png +0 -0
  296. blurdev/resource/img/preview/add.png +0 -0
  297. blurdev/resource/img/preview/brush.png +0 -0
  298. blurdev/resource/img/preview/delete.png +0 -0
  299. blurdev/resource/img/preview/delte.png +0 -0
  300. blurdev/resource/img/preview/fill.png +0 -0
  301. blurdev/resource/img/preview/layers.png +0 -0
  302. blurdev/resource/img/preview/media.png +0 -0
  303. blurdev/resource/img/preview/navigate.png +0 -0
  304. blurdev/resource/img/preview/pencil.png +0 -0
  305. blurdev/resource/img/preview/select.png +0 -0
  306. blurdev/resource/img/preview/type.png +0 -0
  307. blurdev/resource/img/preview/visible.png +0 -0
  308. blurdev/resource/img/project.png +0 -0
  309. blurdev/resource/img/python_logger.ico +0 -0
  310. blurdev/resource/img/python_logger.png +0 -0
  311. blurdev/resource/img/refresh.png +0 -0
  312. blurdev/resource/img/remove.png +0 -0
  313. blurdev/resource/img/reset.png +0 -0
  314. blurdev/resource/img/richtext/font_bold.png +0 -0
  315. blurdev/resource/img/richtext/font_italic.png +0 -0
  316. blurdev/resource/img/richtext/link_image.png +0 -0
  317. blurdev/resource/img/richtext/spell_check.png +0 -0
  318. blurdev/resource/img/richtext/unordered_list.png +0 -0
  319. blurdev/resource/img/save.png +0 -0
  320. blurdev/resource/img/savesettings.png +0 -0
  321. blurdev/resource/img/settings.png +0 -0
  322. blurdev/resource/img/tool.png +0 -0
  323. blurdev/resource/img/toolbarHandleHorizontal.png +0 -0
  324. blurdev/resource/img/toolbarHandleVertical.png +0 -0
  325. blurdev/resource/img/trash.png +0 -0
  326. blurdev/resource/img/trax.png +0 -0
  327. blurdev/resource/img/tree.png +0 -0
  328. blurdev/resource/img/treegrunt.ico +0 -0
  329. blurdev/resource/img/treegrunt.png +0 -0
  330. blurdev/resource/img/treegruntedit.png +0 -0
  331. blurdev/resource/img/user interface.png +0 -0
  332. blurdev/resource/img/warning.png +0 -0
  333. blurdev/resource/img/watermark.png +0 -0
  334. blurdev/resource/sdk/blurdev.sdk +0 -3
  335. blurdev/resource/settings.ini +0 -82
  336. blurdev/resource/softimage/BlurApplication.dll +0 -0
  337. blurdev/resource/softimage/BlurApplication64.dll +0 -0
  338. blurdev/resource/stylesheet/Carbon.css +0 -35
  339. blurdev/resource/stylesheet/logger/Dark.css +0 -62
  340. blurdev/resource/templ/py_comment.templ +0 -1
  341. blurdev/resource/templ/py_debug_raise_error.templ +0 -7
  342. blurdev/resource/templ/py_doc_string.templ +0 -10
  343. blurdev/resource/templ/py_header.templ +0 -9
  344. blurdev/resource/templ/py_line_comment.templ +0 -1
  345. blurdev/resource/templ/py_log_to_file.templ +0 -22
  346. blurdev/resource/templ/py_module_path.templ +0 -1
  347. blurdev/resource/templ/py_pyqt_core.templ +0 -1
  348. blurdev/resource/templ/py_pyqt_gui.templ +0 -1
  349. blurdev/resource/templ/py_splashscreen.templ +0 -6
  350. blurdev/resource/templ/py_testing_note.templ +0 -1
  351. blurdev/resource/templ/py_testing_note_end.templ +0 -1
  352. blurdev/resource/tools_environments.json +0 -72
  353. blurdev/resource/tools_environments.xml +0 -11
  354. blurdev/resource/tools_environments_linux.xml +0 -11
  355. blurdev/resource/tools_environments_offline.xml +0 -7
  356. blurdev/runtimes/__init__.py +0 -2
  357. blurdev/runtimes/logger.py +0 -44
  358. blurdev/scintilla/delayables/__init__.py +0 -9
  359. blurdev/settings.py +0 -312
  360. blurdev/utils/error.py +0 -389
  361. {blurdev/scintilla/lexers → preditor/cores}/__init__.py +0 -0
  362. {blurdev/utils → preditor/gui/fuzzy_search}/__init__.py +0 -0
  363. {blurdev → preditor}/resource/img/warning-big.png +0 -0
preditor/osystem.py ADDED
@@ -0,0 +1,401 @@
1
+ """
2
+ This module provides additional methods that aren't easily found in existing
3
+ python or Qt modules for cross-platform usage.
4
+
5
+ The osystem module provides a number of functions to make dealing with
6
+ paths and other platform-specific things in a more abstract platform-agnostic
7
+ way.
8
+ """
9
+ from __future__ import absolute_import, print_function
10
+
11
+ import os
12
+ import subprocess
13
+ import sys
14
+ from builtins import str as text
15
+
16
+ import preditor
17
+
18
+ from . import settings
19
+
20
+
21
+ def getPointerSize():
22
+ import struct
23
+
24
+ try:
25
+ size = struct.calcsize('P')
26
+ except struct.error:
27
+ # Older installations can only query longs
28
+ size = struct.calcsize('l')
29
+ size *= 8
30
+ global getPointerSize
31
+
32
+ def getPointerSize():
33
+ return size
34
+
35
+ return size
36
+
37
+
38
+ # Get the active version of python, not a hard coded value.
39
+ def pythonPath(pyw=False, architecture=None):
40
+ if settings.OS_TYPE != 'Windows':
41
+ return 'python'
42
+ from distutils.sysconfig import get_python_inc
43
+
44
+ # Unable to pull the path from the registry just use the current python path
45
+ basepath = os.path.split(get_python_inc())[0]
46
+ # build the path to the python executable. If requested use pythonw instead of
47
+ # python
48
+ return os.path.join(basepath, 'python{w}.exe'.format(w=pyw and 'w' or ''))
49
+
50
+
51
+ def defaultLogFile(filename='preditorProtocol.log'):
52
+ """Returns a default log file path often used for redirecting stdout/err to.
53
+ Uses the `BDEV_PATH_BLUR` environment variable as the basepath.
54
+
55
+ Args:
56
+ filename (str, optional): filename to log to.
57
+ """
58
+ basepath = expandvars(os.environ['BDEV_PATH_BLUR'])
59
+ return os.path.join(basepath, filename)
60
+
61
+
62
+ def expandvars(text, cache=None):
63
+ """
64
+ Recursively expands the text variables, vs. the os.path.expandvars
65
+ method which only works at one level.
66
+
67
+ :param text: text string to expand
68
+ :type text: str
69
+ :param cache: used internally during recursion to prevent infinite loop
70
+ :type cache: dict
71
+ :rtype: str
72
+
73
+ """
74
+ # make sure we have data
75
+ if not text:
76
+ return ''
77
+
78
+ import re
79
+
80
+ # check for circular dependencies
81
+ if cache is None:
82
+ cache = {}
83
+
84
+ # return the cleaned variable
85
+ output = str(text)
86
+ keys = re.findall(r'\$(\w+)|\${(\w+)\}|\%(\w+)\%', text)
87
+
88
+ for first, second, third in keys:
89
+ repl = ''
90
+ key = ''
91
+ if first:
92
+ repl = '$%s' % first
93
+ key = first
94
+ elif second:
95
+ repl = '${%s}' % second
96
+ key = second
97
+ elif third:
98
+ repl = '%%%s%%' % third
99
+ key = third
100
+ else:
101
+ continue
102
+
103
+ value = os.environ.get(key)
104
+ if value:
105
+ if key not in cache:
106
+ cache[key] = value
107
+ value = expandvars(value, cache)
108
+ else:
109
+ print(
110
+ 'WARNING! %s environ variable contains a circular dependency' % key
111
+ )
112
+ value = cache[key]
113
+ else:
114
+ value = repl
115
+
116
+ output = output.replace(repl, value)
117
+
118
+ return output
119
+
120
+
121
+ def explore(filename, dirFallback=False):
122
+ """Launches the provided filename in the prefered editor for the specific platform.
123
+
124
+ Args:
125
+ filename (str): The file path to explore to.
126
+ dirFallback (bool): If True, and the file path does not exist, explore to
127
+ the deepest folder that does exist.
128
+
129
+ Returns:
130
+ bool: If it was able to explore the filename.
131
+ """
132
+ # pull the file path from the inputed filename
133
+ fpath = os.path.normpath(filename)
134
+
135
+ if dirFallback:
136
+ # If the provided filename does not exist, recursively check each parent folder
137
+ # for existence.
138
+ while not os.path.exists(fpath) and not os.path.ismount(fpath):
139
+ fpath = os.path.split(fpath)[0]
140
+
141
+ # run the file in windows
142
+ if settings.OS_TYPE == 'Windows':
143
+ env = subprocessEnvironment()
144
+ if os.path.isfile(fpath):
145
+ subprocess.Popen(r'explorer.exe /select, "{}"'.format(fpath), env=env)
146
+ return True
147
+ subprocess.Popen(r'explorer.exe "{}"'.format(fpath), env=env)
148
+ return True
149
+
150
+ # run the file in linux
151
+ elif settings.OS_TYPE == 'Linux':
152
+ cmd = expandvars(os.environ.get('BDEV_CMD_BROWSE', ''))
153
+ if not cmd:
154
+ return False
155
+ subprocess.Popen(cmd % {'filepath': fpath}, shell=True)
156
+ return True
157
+ return False
158
+
159
+
160
+ def subprocessEnvironment(env=None):
161
+ """Returns a copy of the environment that will restore a new python instance to
162
+ current state.
163
+
164
+ Provides a environment dict that can be passed to subprocess.Popen that will restore
165
+ the current treegrunt environment settings, and blurdev stylesheet. It also resets
166
+ any environment variables set by a dcc that may cause problems when running a
167
+ subprocess.
168
+
169
+ Args:
170
+
171
+ env (dict, Optional): The base dictionary that is modified with blurdev
172
+ variables. if None(default) it will be populated with a copy of os.environ.
173
+
174
+ Returns:
175
+ dict: A list of environment variables to be passed to subprocess's env argument.
176
+ """
177
+ if env is None:
178
+ env = os.environ.copy()
179
+
180
+ # By default libstone adds "C:\Windows\System32\blur64" or "C:\blur\common" to
181
+ # QApplication.libraryPaths(), setting this env var to a invalid path disables that.
182
+ # Leaving this set likely will cause the subprocess to not be configured correctly.
183
+ # The subprocess should be responsible for setting this variable
184
+ if 'LIBSTONE_QT_LIBRARY_PATH' in env:
185
+ del env['LIBSTONE_QT_LIBRARY_PATH']
186
+
187
+ # If PYTHONPATH is being used, attempt to reset it to the system value.
188
+ # Applications like maya add PYTHONPATH, and this breaks subprocesses.
189
+ if env.get('PYTHONPATH'):
190
+ if settings.OS_TYPE == 'Windows':
191
+ try:
192
+ # Store the 'PYTHONPATH' from the system registry if set
193
+ env['PYTHONPATH'] = getEnvironmentVariable('PYTHONPATH')
194
+ except WindowsError:
195
+ # If the registry is not set, then remove the variable
196
+ del env['PYTHONPATH']
197
+
198
+ # If PYTHONHOME is used, just remove it. This variable is supposed to point
199
+ # to a folder relative to the python stdlib
200
+ # Applications like Houdini add PYTHONHOME, and it breaks the subprocesses
201
+ if env.get('PYTHONHOME'):
202
+ if settings.OS_TYPE == 'Windows':
203
+ try:
204
+ # Store the 'PYTHONHOME' from the system registry if set
205
+ env['PYTHONHOME'] = getEnvironmentVariable('PYTHONHOME')
206
+ except WindowsError:
207
+ # If the registry is not set, then remove the variable
208
+ del env['PYTHONHOME']
209
+
210
+ # Some DCC's require inserting or appending path variables. When using subprocess
211
+ # these path variables may cause problems with the target application. This allows
212
+ # removing those path variables from the environment being passed to subprocess.
213
+ def normalize(i):
214
+ return os.path.normpath(os.path.normcase(i))
215
+
216
+ removePaths = set([normalize(x) for x in preditor.core._removeFromPATHEnv])
217
+
218
+ # blurpath records any paths it adds to the PATH variable and other env variable
219
+ # modifications it makes, revert these changes.
220
+ try:
221
+ import blurpath
222
+
223
+ # Restore the original environment variables stored by blurpath.
224
+ blurpath.resetEnvVars(env) # blurpath v0.0.16 or newer
225
+ except ImportError:
226
+ pass
227
+ except AttributeError:
228
+ # TODO: Once blurpath v0.0.16 or newer is passed out, remove the
229
+ # outter AttributeError except block. Its just for backwards compatibility.
230
+ try:
231
+ removePaths.update([normalize(x) for x in blurpath.addedToPathEnv])
232
+ except AttributeError:
233
+ pass
234
+
235
+ path = env.get('PATH')
236
+ if path:
237
+ paths = [
238
+ x for x in path.split(os.path.pathsep) if normalize(x) not in removePaths
239
+ ]
240
+ path = os.path.pathsep.join(paths)
241
+ # subprocess does not accept unicode in python 2
242
+ if sys.version_info[0] == 2 and isinstance(path, text):
243
+ path = path.encode('utf8')
244
+ env['PATH'] = path
245
+
246
+ # settings.environStr does nothing in python3, so this code only needs
247
+ # to run in python2
248
+ if sys.version_info[0] < 3:
249
+ # subprocess explodes if it receives unicode in Python2 and in Python3,
250
+ # it explodes if it *doesn't* receive unicode.
251
+ temp = {}
252
+ for k, v in env.items():
253
+ # Attempt to remove any unicode objects. Ignore any conversion failures
254
+ try:
255
+ k = settings.environStr(k)
256
+ except Exception:
257
+ pass
258
+ try:
259
+ v = settings.environStr(v)
260
+ except AttributeError:
261
+ pass
262
+ temp[k] = v
263
+ env = temp
264
+
265
+ return env
266
+
267
+
268
+ # --------------------------------------------------------------------------------
269
+ # Read registy values
270
+ # --------------------------------------------------------------------------------
271
+ def getRegKey(registry, key, architecture=None, write=False):
272
+ """Returns a winreg hkey or none.
273
+
274
+ Args: registry (str): The registry to look in. 'HKEY_LOCAL_MACHINE' for example
275
+
276
+ key (str): The key to open. r'Software\\Autodesk\\Softimage\\InstallPaths' for
277
+ example
278
+
279
+ architecture (int | None): 32 or 64 bit. If None use system default.
280
+ Defaults to None
281
+
282
+ Returns:
283
+ A winreg handle object
284
+ """
285
+ # Do not want to import winreg unless it is neccissary
286
+ regKey = None
287
+ import winreg
288
+
289
+ aReg = winreg.ConnectRegistry(None, getattr(winreg, registry))
290
+ if architecture == 32:
291
+ sam = winreg.KEY_WOW64_32KEY
292
+ elif architecture == 64:
293
+ sam = winreg.KEY_WOW64_64KEY
294
+ else:
295
+ sam = 0
296
+ access = winreg.KEY_READ
297
+ if write:
298
+ access = winreg.KEY_WRITE
299
+ try:
300
+ regKey = winreg.OpenKey(aReg, key, 0, access | sam)
301
+ except WindowsError:
302
+ pass
303
+ return regKey
304
+
305
+
306
+ def registryValue(registry, key, value_name, architecture=None):
307
+ """Returns the value and type of the provided registry key's value name.
308
+
309
+ Args:
310
+
311
+ registry (str): The registry to look in. 'HKEY_LOCAL_MACHINE' for example
312
+
313
+ key (str): The key to open. r'Software\\Autodesk\\Softimage\\InstallPaths' for
314
+ example
315
+
316
+ value_name (str): The name of the value to read. To read the '(Default)' key
317
+ pass a empty string.
318
+
319
+ architecture (int | None): 32 or 64 bit. If None use system default.
320
+ Defaults to None.
321
+
322
+ Returns:
323
+ object: Value stored in key
324
+ int: registry type for value. See winreg's Value Types
325
+ """
326
+ # Do not want to import winreg unless it is neccissary
327
+ regKey = getRegKey(registry, key, architecture=architecture)
328
+ if regKey:
329
+ import winreg
330
+
331
+ return winreg.QueryValueEx(regKey, value_name)
332
+ return '', 0
333
+
334
+
335
+ def getEnvironmentRegKey(machine=False):
336
+ """Get the Registry Path and Key for the environment, either of the current
337
+ user or the system.
338
+
339
+ Args:
340
+ machine (bool, optional): If True, the system Environment location will
341
+ be returned. Otherwise, the Environment location for the current
342
+ user will be returned. Defaults to False.
343
+
344
+ Returns:
345
+ tuple: Returns a tuple of two strings (registry path, key).
346
+ """
347
+ registry = 'HKEY_CURRENT_USER'
348
+ key = r'Environment'
349
+ # Replace {PATH} with the existing path variable.
350
+ if machine:
351
+ registry = 'HKEY_LOCAL_MACHINE'
352
+ key = r'SYSTEM\CurrentControlSet\Control\Session Manager\Environment'
353
+ return registry, key
354
+
355
+
356
+ def getEnvironmentVariable(value_name, system=None, default=None, architecture=None):
357
+ """Returns the environment variable stored in the windows registry.
358
+
359
+ Args:
360
+ value_name (str): The name of the environment variable to get the value of.
361
+ system (bool or None, optional): If True, then only look in the system
362
+ environment variables. If False, then only look at the user
363
+ environment variables. If None(default), then return the user value
364
+ if set, otherwise return the system value.
365
+ default: If the variable is not set, return this value.
366
+ If None(default) then a WindowsError is raised.
367
+ architecture (int or None): 32 or 64 bit. If None use system default.
368
+ Defaults to None.
369
+
370
+ Raises:
371
+ WindowsError: [Error 2] is returned if the environment variable is not
372
+ stored in the requested registry. If you pass a default value other
373
+ than None this will not be raised.
374
+ """
375
+ if system is None and value_name.lower() == 'path':
376
+ msg = "PATH is a special environment variable, set system to True or False."
377
+ raise ValueError(msg)
378
+
379
+ if not system:
380
+ # system is None or False, so check user variables.
381
+ registry, key = getEnvironmentRegKey(False)
382
+ try:
383
+ return registryValue(registry, key, value_name, architecture=architecture)[
384
+ 0
385
+ ]
386
+ except WindowsError:
387
+ pass
388
+ if system is False:
389
+ # If system is False, then return the default.
390
+ # If None, then check the system.
391
+ if default is None:
392
+ raise
393
+ return default
394
+
395
+ registry, key = getEnvironmentRegKey(True)
396
+ try:
397
+ return registryValue(registry, key, value_name, architecture=architecture)[0]
398
+ except WindowsError:
399
+ if default is None:
400
+ raise
401
+ return default
preditor/plugins.py ADDED
@@ -0,0 +1,65 @@
1
+ from __future__ import absolute_import
2
+
3
+ import logging
4
+
5
+ import six
6
+
7
+ if six.PY3:
8
+ from importlib_metadata import entry_points
9
+ else:
10
+ import pkg_resources
11
+
12
+ logger = logging.getLogger(__name__)
13
+
14
+
15
+ class Plugins(object):
16
+ def about_module(self):
17
+ plugs = {}
18
+ for ep in self.iterator("preditor.plug.about_module"):
19
+ name = ep.name
20
+ if name in plugs:
21
+ logger.warning(
22
+ 'Duplicate "preditor.plug.about_module" plugin found with '
23
+ 'name "{}"'.format(name)
24
+ )
25
+ else:
26
+ plugs[name] = ep
27
+
28
+ # Sort the plugins alphabetically
29
+ for name in sorted(plugs.keys(), key=lambda i: i.lower()):
30
+ ep = plugs[name]
31
+ try:
32
+ result = ep.load()
33
+ except Exception as error:
34
+ result = "Error processing: {}".format(error)
35
+
36
+ yield name, result
37
+
38
+ def editor(self, name):
39
+ for plug_name, ep in self.editors(name):
40
+ return plug_name, ep.load()
41
+ return None, None
42
+
43
+ def editors(self, name=None):
44
+ for ep in self.iterator(group="preditor.plug.editors"):
45
+ if name and ep.name != name:
46
+ continue
47
+ yield ep.name, ep
48
+
49
+ def initialize(self, name=None):
50
+ for ep in self.iterator(group="preditor.plug.initialize"):
51
+ yield ep.load()
52
+
53
+ def logging_handlers(self, name=None):
54
+ for ep in self.iterator(group="preditor.plug.logging_handlers"):
55
+ yield ep.name, ep.load()
56
+
57
+ @classmethod
58
+ def iterator(cls, group=None, name=None):
59
+ """Iterates over the requested entry point yielding results."""
60
+ if six.PY3:
61
+ for ep in entry_points().select(group=group):
62
+ yield ep
63
+ else:
64
+ for ep in pkg_resources.iter_entry_points(group, name=name):
65
+ yield ep
preditor/prefs.py ADDED
@@ -0,0 +1,74 @@
1
+ """
2
+ Module for handling user interface preferences
3
+
4
+ """
5
+ from __future__ import absolute_import
6
+
7
+ import os
8
+ import sys
9
+
10
+ # cache of all the preferences
11
+ _cache = {}
12
+
13
+
14
+ def backup():
15
+ """Saves a copy of the current preferences to a zip archive."""
16
+ import glob
17
+ import shutil
18
+
19
+ archive_base = "preditor_backup_"
20
+ # Save all prefs not just the current core_name.
21
+ prefs = prefs_path()
22
+ # Note: Using parent dir of prefs so we can use shutil.make_archive without
23
+ # backing up the previous backups.
24
+ parent_dir = os.path.join(os.path.dirname(prefs), "_backups")
25
+
26
+ # Get the next backup version number to use.
27
+ filenames = glob.glob(os.path.join(parent_dir, "{}*.zip".format(archive_base)))
28
+ version = 1
29
+ if filenames:
30
+ # Add one to the largest version that exists on disk.
31
+ version = int(os.path.splitext(max(filenames))[0].split(archive_base)[-1])
32
+ version += 1
33
+
34
+ # Build the file path to save the archive to.
35
+ archive_base = os.path.join(parent_dir, archive_base + "{:04}".format(version))
36
+
37
+ # Save the preferences to the given archive name.
38
+ zip_path = shutil.make_archive(archive_base, "zip", prefs)
39
+
40
+ return zip_path
41
+
42
+
43
+ def browse(core_name):
44
+ from . import osystem
45
+
46
+ path = prefs_path(core_name)
47
+ osystem.explore(path)
48
+
49
+
50
+ def existing():
51
+ """Returns a list of PrEditor preference path names that exist on disk."""
52
+ root = prefs_path()
53
+ return sorted(next(os.walk(root))[1], key=lambda i: i.lower())
54
+
55
+
56
+ def prefs_path(filename=None, core_name=None):
57
+ """The path PrEditor's preferences are saved as a json file.
58
+
59
+ The enviroment variable `PREDITOR_PREF_PATH` is used if set, otherwise
60
+ it is saved in one of the user folders.
61
+ """
62
+ if "PREDITOR_PREF_PATH" in os.environ:
63
+ ret = os.environ["PREDITOR_PREF_PATH"]
64
+ else:
65
+ if sys.platform == "win32":
66
+ ret = "%appdata%/blur/preditor"
67
+ else:
68
+ ret = "$HOME/.blur/preditor"
69
+ ret = os.path.normpath(os.path.expandvars(os.path.expanduser(ret)))
70
+ if core_name:
71
+ ret = os.path.join(ret, core_name)
72
+ if filename:
73
+ ret = os.path.join(ret, filename)
74
+ return ret
@@ -1,38 +1,26 @@
1
- <html>
2
- <head/>
3
- <body>
4
- <h1>blurdev</h1>
5
- <hr>
6
- <h2>blurdev Site variables:</h2>
7
- <p><span style=" font-style:italic;">These variables should be defined at a user or system level to configure blurdev.</span></p>
8
- <p><span style=" font-weight:bold;">BDEV_INCLUDE_*:</span> Contains a path that is inserted at index zero of sys.path. This is done in reverse alphabetical order.</p>
9
- <p><span style=" font-weight:bold;">BDEV_DESIGNERPLUG_*:</span> Used to add a collection of designer plugins to QDesigner. Should be set to "XMLPATH,MODULE_DIR". XMLPATH is the full path to a xml file listing plugins to load. MODULE_DIR is a path that needs added to sys.path so the modules in XMLPATH are importable. You can use environment variables in these strings, they will be expanded. This is used by QDesigner, nothing else.</p>
10
- <p><span style=" font-weight:bold;">BLURLIBSPATH:</span> Adds blurdev widgets to QtDesigner. It should contain the path to the folder containing the blurdev module. This is used by QDesigner, nothing else. This is used to populate BDEV_DESIGNERPLUG_BLUR with the correct values in settings.ini.</p>
11
- <p><span style=" font-weight:bold;">BDEV_OFFLINE:</span> If set to 1, this indicates that blurdev is not running on the "Blur" network. This causes the [* Offline] section of blurdev/resource/settings.ini to override the [Default] and [*] sections. When blurdev is imported it adds all env vars defined in settings.ini for the current operating system and Default if they are not already defined in os.environ.</p>
12
- <p><span style=" font-weight:bold;">BDEV_PATH_PREFS:</span> This environment variable points to where per-computer user prefs are stored.</p>
13
- <p><span style=" font-weight:bold;">BDEV_PATH_PREFS_SHARED:</span> This environment variable points to where shared user prefs are stored. This is often on the network and includes the os's logged in username in the path. If BDEV_OFFLINE is set to 1 this may point to the BDEV_PATH_PREFS location.</p>
14
- <p><span style=" font-weight:bold;">BDEV_RESOURCES_CACHE:</span> This environment variable points to where blurdev's ResourceFinder should cache located resources in order to speed up code execution. By default this is set to a cache directory in the system's blur directory.</p>
15
- <p><span style=" font-weight:bold;">BDEV_CACHE_RESOURCES:</span> This environment variable sets whether to enable or disable blurdev's ResourceFinder's caching capability. This should be set to "true" or "false". Caching is considered enabled by default if the environment variable is not found.</p>
16
- <p></p>
17
- <h2>blurdev Temp variables:</h2>
18
- <p><span style=" font-style:italic;">These variables should not be defined all the time.</span></p>
19
- <p><span style=" font-weight:bold;">BDEV_DISABLE_AUTORUN:</span> Set to "true" to disable the autorun.bat script used at blur. If this is not set when Maya shuts down, maya takes minutes to close. Maya uses several subprocess calls when closing and for some reason the doskey calls in the script take much longer than normal.</p>
20
- <p><span style=" font-weight:bold;">BDEV_STYLESHEET:</span> Used to override the stylesheet when initalizing blurdev.</p>
21
- <p><span style=" font-weight:bold;">BDEV_TOOL_ENVIRONMENT:</span> Forces blurdev to initialize with this treegrunt environment name. When saving prefs, this environment name change will not be saved. This is mostly used to ensure that launching a subprocess or farm job happens on the same treegrunt environment.</p>
22
- <p></p>
23
- <h2>Sentry variables:</h2>
24
- <p><span style=" font-style:italic;">These variables control the behavior of Sentry's integration in blurdev.</span></p>
25
- <p><span style=" font-weight:bold;">SENTRY_DSN:</span> Required for Sentry to initialize, defines the endpoint for Sentry to submit error events.</p>
26
- <p><span style=" font-weight:bold;">SENTRY_DEBUG:</span> If set to 1 (or any value), Sentry will be initialized in debug mode providing granular output related to the underlying Sentry API (such as startup process progress and output for event transmission).</p>
27
- <p><span style=" font-weight:bold;">BDEV_SENTRY_AT_STARTUP:</span> Sets up Sentry earlier in blurdev startup process. By default, Sentry is configured upon core initialization.</p>
28
- <p></p>
29
- <h1>trax</h1>
30
- <hr>
31
- <p><span style=" font-weight:bold;">BDEV_INCLUDE_TRAX:</span> A special BDEV_INCLUDE_* environment variable that specifies where trax can be imported from. It should contain the path to the <b>folder containing the trax folder</b>(for instance: C:\blur\it\python\apps). It is used by the blurpath system to ensure the correct build is imported. It can also be used to make testing development easier by pointing to your local checkout.</p>
32
- <p><span style=" font-weight:bold;">TRAX_SPOOL_DIRECTORY_OVERRIDE:</span> If defined, all messages will be stored the directory of this variable. Each message filename will have a "[mapping.mount()]_" prefix added giving you a hint to which server it would have ended up on. Defining this variable effectively disables all spool messages, and gives you a way to see what each spool message would look like. If your code depends on trax.api.spool.waitForCompletion, it will never complete.</p>
33
- <p><span style=" font-weight:bold;">TRAXDEVPATH:</span> Adds trax widgets to QtDesigner. It should contain the path to the folder containing the trax module. This is used by QDesigner, nothing else. This is used to populate BDEV_DESIGNERPLUG_TRAX with the correct values in settings.ini.</p>
34
- <h1>Notes</h1>
35
- <hr>
36
- <p>Any variable names containing a * are wildcards. This allows you to add as many instances of that environment variable type as needed.</p>
37
- </body>
38
- </html>
1
+ <html>
2
+ <head/>
3
+ <body>
4
+ <h1>blurdev</h1>
5
+ <hr>
6
+ <h2>blurdev Site variables:</h2>
7
+ <p><span style=" font-style:italic;">These variables should be defined at a user or system level to configure blurdev.</span></p>
8
+ <p><span style=" font-weight:bold;">BDEV_DESIGNERPLUG_*:</span> Used to add a collection of designer plugins to QDesigner. Should be set to "XMLPATH,MODULE_DIR". XMLPATH is the full path to a xml file listing plugins to load. MODULE_DIR is a path that needs added to sys.path so the modules in XMLPATH are importable. You can use environment variables in these strings, they will be expanded. This is used by QDesigner, nothing else.</p>
9
+ <p><span style=" font-weight:bold;">BDEV_OFFLINE:</span> If set to 1, this indicates that blurdev is not running on the "Blur" network. This causes the [* Offline] section of blurdev/resource/settings.ini to override the [Default] and [*] sections. When blurdev is imported it adds all env vars defined in settings.ini for the current operating system and Default if they are not already defined in os.environ.</p>
10
+ <p><span style=" font-weight:bold;">BDEV_PATH_PREFS:</span> This environment variable points to where per-computer user prefs are stored.</p>
11
+ <p><span style=" font-weight:bold;">BDEV_PATH_PREFS_SHARED:</span> This environment variable points to where shared user prefs are stored. This is often on the network and includes the os's logged in username in the path. If BDEV_OFFLINE is set to 1 this may point to the BDEV_PATH_PREFS location.</p>
12
+ <p></p>
13
+ <h2>blurdev Temp variables:</h2>
14
+ <p><span style=" font-style:italic;">These variables should not be defined all the time.</span></p>
15
+ <p><span style=" font-weight:bold;">BDEV_DISABLE_AUTORUN:</span> Set to "true" to disable the autorun.bat script used at blur. If this is not set when Maya shuts down, maya takes minutes to close. Maya uses several subprocess calls when closing and for some reason the doskey calls in the script take much longer than normal.</p>
16
+ <p><span style=" font-weight:bold;">BDEV_STYLESHEET:</span> Used to override the stylesheet when initalizing blurdev.</p>
17
+ <p><span style=" font-weight:bold;">BDEV_TOOL_ENVIRONMENT:</span> Forces blurdev to initialize with this treegrunt environment name. When saving prefs, this environment name change will not be saved. This is mostly used to ensure that launching a subprocess or farm job happens on the same treegrunt environment.</p>
18
+ <p></p>
19
+ <h1>trax</h1>
20
+ <hr>
21
+ <p><span style=" font-weight:bold;">TRAX_SPOOL_DIRECTORY_OVERRIDE:</span> If defined, all messages will be stored the directory of this variable. Each message filename will have a "[mapping.mount()]_" prefix added giving you a hint to which server it would have ended up on. Defining this variable effectively disables all spool messages, and gives you a way to see what each spool message would look like. If your code depends on trax.api.spool.waitForCompletion, it will never complete.</p>
22
+ <h1>Notes</h1>
23
+ <hr>
24
+ <p>Any variable names containing a * are wildcards. This allows you to add as many instances of that environment variable type as needed.</p>
25
+ </body>
26
+ </html>