Age | Commit message (Collapse) | Author |
|
|
|
|
|
Useful for Python module paths that can't start with numbers.
|
|
|
|
|
|
|
|
|
|
|
|
Extensions such as ".tar.gz" are now also supported. Before this patch,
ensure_ext('demo.tar.gz', '.tar.gz') would return 'demo.tar.tar.gz'.
This results in issues with the `ExportHelper` mix-in class; clicking
an existing file in the file dialogue warns about overwriting it
(highlighting the input box in red), but then saves to a different
file.
Also added a unit test for the new behaviour.
Reviewers: mont29, campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D1498
|
|
|
|
bpy.path.clean_name() and AddPresetBase.as_filename() were doing
inefficient search-replace of individual characters.
Use cached replacement table instead.
|
|
|
|
`bpy.path.is_subdir("/abc/def/ghi","/abc/de")` incorrectly returned True
|
|
|
|
|
|
|
|
|
|
also move foreach_get/set examples into their own py example files (prefer not to have example code built into blenders binary).
|
|
nested paths before doing a recursive search.
|
|
- add rna property 'as_bytes' method so you can get a string property as python bytes (bypass encoding).
- make bpy.path.abspath/relpath compatible with bytes.
- add 'relpath' option to bpy_extras.image_utils.load_image(), so you can load an image relative to a path.
|
|
|
|
had to do this internally.
- bpy.path.extensions_image
- bpy.path.extensions_movie
- bpy.path.extensions_audio
eg:
if os.path.splitext(filename)[1].lower() in bpy.path.extensions_image:
... we have an image ...
|
|
|
|
|
|
Filename extension was striped twice...
|
|
this report exposed multiple bugs in blender when using a non utf8 compatible home directory.
- bpy.utils.script_paths() would crash when homedir wasn't utf8 (reported bug)
- PyC_DefaultNameSpace() - would raise an error when running when __file__ was non utf8.
- preset filepath property was not set to accept non utf8.
- bpy.paths.display_name would raise an error on non utf8 paths, (used for preset draw)
|
|
modify bpy.path.display_name_from_filepath() to accept bytes
|
|
its self a relative path too.
|
|
- remove / comment unused python vars
- replace mul_v3_fl(somevec, -1.0f); with negate_v3(somevec);
|
|
exporters get the paths of linked images right.
|
|
linked datablocks are relative to this, not the blend files path, this saves kludgy path code wherever libraries may be used.
- Image "Edit Externally" operator can now edit relative library images.
also minor edits to navmesh.
|
|
Kent
|
|
__all__ to some modules which were missing it.
|
|
phenomenon has been generated.
own fault in recent addition of bpy.path.basename() not supporting byte paths.
|
|
|
|
directory cut off, broke copying images on export.
|
|
|
|
driver letter on Windows that does not exist
by Brandon Ehle (azverkan)
|
|
paths as well as strings, support this with blender/rna too.
- bpy.data.*.load() functions were only accepting UTF-8 paths.
- rna functions/properties now accept byte values rather then strings for file paths.
- bpy.path.resolve_ncase now supports byte objects.
|
|
the current blend file.
|
|
at all, instead assign the action manually.
Also added bpy.path.display_name_from_filepath(), since filepaths are not ensured to be utf8.
same as calling: os.path.splitext(os.path.basename(name))[0].encode("utf8", "replace").decode("utf8")
|
|
|
|
modules.
|
|
|
|
note: this is an option to the add preset operator which is a bit odd but easiest since these classes have all the info needed for removal as well.
|
|
- better error reporting when an addon fails to load
- upload an addon which loads partly but then fails (eg, module loads but class register fails)
- bugfix addon loading, failier to load would leave _bpy_types._register_immediate = False
- added which change on disk are reloaded when enabling.
- bpy.path.module_names() now returns (module_name, module_path) pairs.
|
|
addon's and python initialization both had this inline.
|
|
|
|
own recent commit missed renaming expand -> abspath
|
|
|