Commit Graph

30 Commits

Author SHA1 Message Date
Julian Eisel
3133d2d58c Swap priority of system path overrides for dev builds
Suggested by Campbell, thanks!

Also moved the exception into own function and improved comments.

Fixes T53008.
2017-11-19 13:13:37 +01:00
Campbell Barton
2aa2bec43a Fix T52442: bl_app_templates_system not working
Portable builds LOCAL files need to be
treated as system instead of using as a fallback to USER templates.
2017-09-15 05:57:37 +10:00
Campbell Barton
909da553e3 Fix bpy.utils.resource_path('SYSTEM') output
Would return the test path for developer builds:
{blender-dirname/release}

Now return an empty string when no path is found.
2017-09-15 05:47:23 +10:00
Campbell Barton
ccb8e78d6c Cleanup: whitespace 2017-08-12 13:43:40 +10:00
Campbell Barton
c31e221d4f Fix crash checking for Blender version 10+
PyAPI could trigger this, for now just truncate.
2017-08-11 09:00:00 +10:00
Campbell Barton
535a6cde64 Cleanup: redundant 'static' variable
Also use BLI_snprintf.
2017-08-11 08:49:09 +10:00
Campbell Barton
3d677d9190 Fix OSX duplicate path in Python's sys.path
The '..' in the path caused simple comparisons to fail.

D2780 by @akitula
2017-08-11 08:42:27 +10:00
Campbell Barton
f68145011f WM: Application Templates
This adds the ability to switch between different application-configurations
without interfering with Blender's normal operation.

This commit doesn't include any templates,
so its mostly to allow collaboration for the Blender 101 project
and other custom configurations.

Application templates can be installed & selected from the file menu.

Other details:

- The `bl_app_template_utils` module handles template activation
  (similar to `addon_utils`).
- The `bl_app_override` module is a general module
  to assist scripts overriding parts of Blender in reversible way.

See docs:
https://docs.blender.org/manual/en/dev/advanced/app_templates.html

See patch: D2565
2017-03-25 10:04:04 +11:00
Campbell Barton
0453c807e0 Add: BKE_appdir_folder_id_ex
Allows getting the path without using a static string.
2017-03-24 10:35:58 +11:00
Campbell Barton
6a6566a7fc Cleanup: line-length 2017-03-24 10:11:01 +11:00
Campbell Barton
714e85b534 Cleanup: code-style, duplicate header 2017-03-02 00:16:36 +11:00
Campbell Barton
402b0aa59b Comments: notes on polyfill2d, minor corrections 2017-02-15 14:17:06 +11:00
Campbell Barton
beaa57d269 Refactor BKE_blender into separate headers
- BKE_blender_version.h (only version defines & versionstr).
- BKE_blender_copybuffer.h (currently only used for view3d copy/paste).
- BKE_blender_undo.h (global undo functions).
- BKE_blendfile.h (high level blend file read/write API).
2016-04-25 19:27:45 +10:00
Campbell Barton
aa8fc57f1e Fix for Python executable not being found on Linux
Python name could include ABI-flags after the version,
since checking for all combinations of ABI flags can expand into many possibilities,
take the executable name from the build system.
2016-02-15 19:05:25 +11:00
Campbell Barton
0a5fdb6354 Python: check version binary name first
Check version name first since 'python' binary may be a different version.
2015-10-30 22:33:24 +11:00
Campbell Barton
a5e631171b BLI_path api, minor changes to CWD handling
- BLI_current_working_dir's return value must be checked, since it may fail.
- BLI_current_working_dir now behaves like getcwd, where a too-small target will return failure.
- avoid buffer overrun with BLI_path_cwd, by taking a maxlen arg.
2015-10-08 15:05:58 +11:00
Campbell Barton
32319dd106 Cleanup: remove BLI prefix from BKE funcs 2015-06-28 19:09:52 +10:00
Campbell Barton
3ce4a58aa9 Cleanup: duplicate includes 2015-06-18 06:32:01 +10:00
Campbell Barton
660234bfba Fix own mistake searching python binary 2015-06-02 15:42:03 +10:00
Campbell Barton
d5a85f87b0 Python: search for 'python' and 'python#.#' 2015-05-19 16:44:19 +10:00
Campbell Barton
7742a8f09c Cleanup: reduce scope for win32, Linux vars 2015-05-13 16:08:19 +10:00
Campbell Barton
bc2f77e1da Add bpy.app.binary_path_python
Access to the python binary distributed with Blender,
fallback to system python executable (matching Blender's version).
2015-05-06 11:13:42 +10:00
Campbell Barton
c246e0c3b6 Prefer name 'program' over 'binary'
binary-search is confusing!
2015-05-06 06:34:19 +10:00
Campbell Barton
e00142bfa7 BLI_path: add PATH search utility functions 2015-05-06 06:21:16 +10:00
Bastien Montagne
fca515838e Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...
2015-01-26 16:59:24 +01:00
Campbell Barton
6b655ca62c Cleanup: style 2015-01-21 11:57:11 +11:00
Campbell Barton
77c926933b cleanup: warnings 2015-01-06 19:09:56 +11:00
Campbell Barton
b7d053beaa Cleanup: warnings & space 2014-11-30 19:28:59 +01:00
Campbell Barton
43fa4baa6c Refactor: BLI_path_util (part 2)
Use BKE_appdir/tempdir naming prefix for functions extracted from BLI_path_util
2014-11-23 18:55:52 +01:00
Campbell Barton
6308c16675 Refactor: BLI_path_util (split out app directory access)
This module is intended for path manipulation functions
but had utility functions added to access various directories.
2014-11-23 18:42:18 +01:00