Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
// Generated by tools/gen.sh from Blender's own API (tools/dump.py). Don't edit: regenerate.
import type * as H from "../../types";
import type * as M from "../../mathutils";
import type * as R from "../rna";
import type * as E from "../enums";
import type * as P from "../py";
/**
* This module has a similar scope to os.path, containing utility
* functions for dealing with paths in Blender.
*/
export interface Api {
/**
* Returns the absolute path relative to the current blend file
* using the "//" prefix.
* @returns The absolute path.
* @param path The path to convert to absolute.
*/
abspath(path: H.In<string | H.Bytes>, kw?: {
/**
* Relative to this path,
* when not set the current filename is used.
*/
start?: H.In<string | H.Bytes | null>;
/**
* The library this path is from. This is only included for
* convenience, when the library is not None its path replaces *start*.
*/
library?: R.Library | null;
}): H.Ref<string>;
/**
* Returns the absolute path relative to the current blend file
* using the "//" prefix.
* @returns The absolute path.
* @param path The path to convert to absolute.
*/
abspath(kw: {
/** The path to convert to absolute. */
path: H.In<string | H.Bytes>;
/**
* Relative to this path,
* when not set the current filename is used.
*/
start?: H.In<string | H.Bytes | null>;
/**
* The library this path is from. This is only included for
* convenience, when the library is not None its path replaces *start*.
*/
library?: R.Library | null;
}): H.Ref<string>;
/**
* Equivalent to ``os.path.basename``, but skips a "//" prefix.
*
* Use for Windows compatibility.
* @returns The base name of the given path.
* @param path The path to get the base name of.
*/
basename(path: H.In<string | H.Bytes>): H.Ref<string>;
/**
* Equivalent to ``os.path.basename``, but skips a "//" prefix.
*
* Use for Windows compatibility.
* @returns The base name of the given path.
* @param path The path to get the base name of.
*/
basename(kw: {
/** The path to get the base name of. */
path: H.In<string | H.Bytes>;
}): H.Ref<string>;
/**
* Returns a name with characters replaced that
* may cause problems under various circumstances,
* such as writing to a file.
*
* All characters besides A-Z/a-z, 0-9 are replaced with "_"
* or the *replace* argument if defined.
* @returns The cleaned name.
* @param name The path name.
*/
clean_name(name: H.In<string | H.Bytes>, kw?: {
/** The replacement for non-valid characters. */
replace?: H.In<string>;
}): H.Ref<string>;
/**
* Returns a name with characters replaced that
* may cause problems under various circumstances,
* such as writing to a file.
*
* All characters besides A-Z/a-z, 0-9 are replaced with "_"
* or the *replace* argument if defined.
* @returns The cleaned name.
* @param name The path name.
*/
clean_name(kw: {
/** The path name. */
name: H.In<string | H.Bytes>;
/** The replacement for non-valid characters. */
replace?: H.In<string>;
}): H.Ref<string>;
/**
* Creates a display string from name to be used in menus and the user interface.
* Intended for use with filenames and module names.
* @returns The display string.
* @param name The name to be used for displaying the user interface.
*/
display_name(name: H.In<string>, kw?: {
/** Remove file extension from name. */
has_ext?: H.In<boolean>;
/** Convert lowercase names to title case. */
title_case?: H.In<boolean>;
}): H.Ref<string>;
/**
* Creates a display string from name to be used in menus and the user interface.
* Intended for use with filenames and module names.
* @returns The display string.
* @param name The name to be used for displaying the user interface.
*/
display_name(kw: {
/** The name to be used for displaying the user interface. */
name: H.In<string>;
/** Remove file extension from name. */
has_ext?: H.In<boolean>;
/** Convert lowercase names to title case. */
title_case?: H.In<boolean>;
}): H.Ref<string>;
/**
* Returns the path stripped of directory and extension,
* ensured to be UTF-8 compatible.
* @returns The display name.
* @param name The file path to convert.
*/
display_name_from_filepath(name: H.In<string>): H.Ref<string>;
/**
* Returns the path stripped of directory and extension,
* ensured to be UTF-8 compatible.
* @returns The display name.
* @param name The file path to convert.
*/
display_name_from_filepath(kw: {
/** The file path to convert. */
name: H.In<string>;
}): H.Ref<string>;
/**
* Performs the reverse of display_name using literal versions of characters
* which aren't supported in a filepath.
* @returns The file path.
* @param name The display name to convert.
*/
display_name_to_filepath(name: H.In<string>): H.Ref<string>;
/**
* Performs the reverse of display_name using literal versions of characters
* which aren't supported in a filepath.
* @returns The file path.
* @param name The display name to convert.
*/
display_name_to_filepath(kw: {
/** The display name to convert. */
name: H.In<string>;
}): H.Ref<string>;
/**
* Return the path with the extension added if it is not already set.
* @returns The file path with the given extension.
* @param filepath The file path.
* @param ext The extension to check for, can be a compound extension. Should start with a dot, such as ``.blend`` or ``.tar.gz``.
*/
ensure_ext(filepath: H.In<string>, ext: H.In<string>, kw?: {
/** Check for matching case when comparing extensions. */
case_sensitive?: H.In<boolean>;
}): H.Ref<string>;
/**
* Return the path with the extension added if it is not already set.
* @returns The file path with the given extension.
* @param filepath The file path.
* @param ext The extension to check for, can be a compound extension. Should start with a dot, such as ``.blend`` or ``.tar.gz``.
*/
ensure_ext(kw: {
/** The file path. */
filepath: H.In<string>;
/**
* The extension to check for, can be a compound extension. Should
* start with a dot, such as ``.blend`` or ``.tar.gz``.
*/
ext: H.In<string>;
/** Check for matching case when comparing extensions. */
case_sensitive?: H.In<boolean>;
}): H.Ref<string>;
/** = frozenset({'.aac', '.ac3', '.aif', '.aiff', '.eac3', '.flac', '.m4a', '.mka', '.mp2', '.mp3', '.oga', '.ogg', '.opus', '.wav', '.wma'}) */
readonly extensions_audio: H.Ref<any>;
/** = frozenset({'.avif', '.bmp', '.cin', '.dds', '.dpx', '.exr', '.hdr', '.j2c', '.jp2', '.jpeg', '.jpg', '.pdd', '.png', '.psb', '.psd', '.rgb', '.rgba', '.sgi', '.tga', '.tif', '.tiff', '.tx', '.webp'}) */
readonly extensions_image: H.Ref<any>;
/** = frozenset({'.avi', '.avs', '.divx', '.dv', '.flc', '.flv', '.gif', '.m2t', '.m2ts', '.m2v', '.m4v', '.mkv', '.mov', '.movie', '.mp4', '.mpeg', '.mpg', '.mpg2', '.mts', '.mv', '.mxf', '.ogg', '.ogv', ' */
readonly extensions_movie: H.Ref<any>;
/**
* Returns true if *path* is in a subdirectory of *directory*.
* Both paths must be absolute.
* @returns Whether or not the path is a subdirectory.
* @param path An absolute path.
* @param directory The parent directory to check against.
*/
is_subdir(path: H.In<string | H.Bytes>, directory: H.In<string | H.Bytes>): H.Ref<boolean>;
/**
* Returns true if *path* is in a subdirectory of *directory*.
* Both paths must be absolute.
* @returns Whether or not the path is a subdirectory.
* @param path An absolute path.
* @param directory The parent directory to check against.
*/
is_subdir(kw: {
/** An absolute path. */
path: H.In<string | H.Bytes>;
/** The parent directory to check against. */
directory: H.In<string | H.Bytes>;
}): H.Ref<boolean>;
/**
* Return a list of modules which can be imported from *path*.
* @returns a list of string pairs (module_name, module_file).
* @param path a directory to scan.
*/
module_names(path: H.In<string>, kw?: {
/** Also return submodule names for packages. */
recursive?: H.In<boolean>;
/** Optional string, used as the prefix for module names (without the trailing "."). */
package?: H.In<string>;
}): H.Ref<[string, string][]>;
/**
* Return a list of modules which can be imported from *path*.
* @returns a list of string pairs (module_name, module_file).
* @param path a directory to scan.
*/
module_names(kw: {
/** a directory to scan. */
path: H.In<string>;
/** Also return submodule names for packages. */
recursive?: H.In<boolean>;
/** Optional string, used as the prefix for module names (without the trailing "."). */
package?: H.In<string>;
}): H.Ref<[string, string][]>;
/**
* Replace the path separator with the system's native ``os.sep``.
* @returns The path with system native separators.
* @param path The path to replace.
*/
native_pathsep(path: H.In<string>): H.Ref<string>;
/**
* Replace the path separator with the system's native ``os.sep``.
* @returns The path with system native separators.
* @param path The path to replace.
*/
native_pathsep(kw: {
/** The path to replace. */
path: H.In<string>;
}): H.Ref<string>;
/**
* Given a sequence of directories, remove duplicates and
* any directories nested in one of the other paths.
* (Useful for recursive path searching).
* @returns A unique list of paths.
* @param dirs Sequence of directory paths.
*/
reduce_dirs(dirs: H.In<readonly string[]>): H.Ref<string[]>;
/**
* Given a sequence of directories, remove duplicates and
* any directories nested in one of the other paths.
* (Useful for recursive path searching).
* @returns A unique list of paths.
* @param dirs Sequence of directory paths.
*/
reduce_dirs(kw: {
/** Sequence of directory paths. */
dirs: H.In<readonly string[]>;
}): H.Ref<string[]>;
/**
* Returns the path relative to the current blend file using the "//" prefix.
* @returns The relative path.
* @param path An absolute path.
*/
relpath(path: H.In<string | H.Bytes>, kw?: {
/**
* Relative to this path,
* when not set the current filename is used.
*/
start?: H.In<string | H.Bytes | null>;
}): H.Ref<string>;
/**
* Returns the path relative to the current blend file using the "//" prefix.
* @returns The relative path.
* @param path An absolute path.
*/
relpath(kw: {
/** An absolute path. */
path: H.In<string | H.Bytes>;
/**
* Relative to this path,
* when not set the current filename is used.
*/
start?: H.In<string | H.Bytes | null>;
}): H.Ref<string>;
/**
* Resolve a case insensitive path on a case sensitive system,
* returning a string with the path if found else return the original path.
* @returns The resolved path.
* @param path The path name to resolve.
*/
resolve_ncase(path: H.In<string>): H.Ref<string>;
/**
* Resolve a case insensitive path on a case sensitive system,
* returning a string with the path if found else return the original path.
* @returns The resolved path.
* @param path The path name to resolve.
*/
resolve_ncase(kw: {
/** The path name to resolve. */
path: H.In<string>;
}): H.Ref<string>;
}