Skip to content

armgit / raea

Public Imported from GitHub
0

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.

29.5 KB
Raw Blame
// 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 contains utility functions specific to blender but
 * not associated with blenders internal data.
 */
export interface Api {
  /**
   * Returns valid application template paths.
   * @returns App template paths.
   */
  app_template_paths(kw?: {
    /** Optional subdir. */
    path?: H.In<string | null>;
  }): H.Ref<string[]>;
  /**
   * Returns a list of paths to external files referenced by the loaded .blend file.
   * @returns path list.
   */
  blend_paths(kw?: {
    /** When true the paths returned are made absolute. */
    absolute?: H.In<boolean>;
    /** When true include file paths for packed data. */
    packed?: H.In<boolean>;
    /** When true skip linked library paths. */
    local?: H.In<boolean>;
  }): H.Ref<string[]>;
  /**
   * Simple string escaping function used for animation paths.
   * @returns The escaped string.
   * @param string text
   */
  escape_identifier(string: H.In<string>): H.Ref<string>;
  /**
   * Simple string escaping function used for animation paths.
   * @returns The escaped string.
   * @param string text
   */
  escape_identifier(kw: {
    /** text */
    string: H.In<string>;
  }): H.Ref<string>;
  /**
   * Execute a file path as a Python script.
   * @returns The module which can be passed back in as ``mod``.
   * @param filepath Path of the script to execute.
   */
  execfile(filepath: H.In<string>, kw?: {
    /** Optional cached module, the result of a previous execution. */
    mod?: any;
  }): any;
  /**
   * Execute a file path as a Python script.
   * @returns The module which can be passed back in as ``mod``.
   * @param filepath Path of the script to execute.
   */
  execfile(kw: {
    /** Path of the script to execute. */
    filepath: H.In<string>;
    /** Optional cached module, the result of a previous execution. */
    mod?: any;
  }): any;
  /**
   * For Blender as a Python module, add bundled VFX library python bindings
   * to ``sys.path``. These may be used instead of dedicated packages, to ensure
   * the libraries are compatible with Blender.
   */
  expose_bundled_modules(): H.Ref<void>;
  /**
   * Return a user writable directory associated with an extension.
   *
   * .. note::
   *
   *    This allows each extension to have its own user directory to store files.
   *
   *    The location of the extension it self is not a suitable place to store files
   *    because it is cleared each upgrade and the users may not have write permissions
   *    to the repository (typically "System" repositories).
   * @returns a path.
   * @param package_ The ``__package__`` of the extension.
   */
  extension_path_user(package_: H.In<string>, kw?: {
    /** Optional subdirectory. */
    path?: H.In<string>;
    /** Treat the path as a directory and create it if its not existing. */
    create?: H.In<boolean>;
  }): H.Ref<string>;
  /**
   * Return a user writable directory associated with an extension.
   *
   * .. note::
   *
   *    This allows each extension to have its own user directory to store files.
   *
   *    The location of the extension it self is not a suitable place to store files
   *    because it is cleared each upgrade and the users may not have write permissions
   *    to the repository (typically "System" repositories).
   * @returns a path.
   * @param package_ The ``__package__`` of the extension.
   */
  extension_path_user(kw: {
    /** The ``__package__`` of the extension. */
    package: H.In<string>;
    /** Optional subdirectory. */
    path?: H.In<string>;
    /** Treat the path as a directory and create it if its not existing. */
    create?: H.In<boolean>;
  }): H.Ref<string>;
  /**
   * Flip a name between left/right sides, useful for
   * mirroring bone names.
   * @returns The flipped name.
   * @param name Bone name to flip.
   */
  flip_name(name: H.In<string>, kw?: {
    /** Whether to remove ``.###`` suffix. */
    strip_digits?: H.In<boolean>;
  }): H.Ref<string>;
  /**
   * Flip a name between left/right sides, useful for
   * mirroring bone names.
   * @returns The flipped name.
   * @param name Bone name to flip.
   */
  flip_name(kw: {
    /** Bone name to flip. */
    name: H.In<string>;
    /** Whether to remove ``.###`` suffix. */
    strip_digits?: H.In<boolean>;
  }): H.Ref<string>;
  /**
   * Returns True if the path is one of the built-in paths used by Blender.
   * @param path Path you want to check if it is in the built-in settings directory
   */
  is_path_builtin(path: H.In<string>): H.Ref<boolean>;
  /**
   * Returns True if the path is one of the built-in paths used by Blender.
   * @param path Path you want to check if it is in the built-in settings directory
   */
  is_path_builtin(kw: {
    /** Path you want to check if it is in the built-in settings directory */
    path: H.In<string>;
  }): H.Ref<boolean>;
  /**
   * Returns True if the path is from an extensions repository.
   * @param path Path to check if it is within an extension repository.
   */
  is_path_extension(path: H.In<string>): H.Ref<boolean>;
  /**
   * Returns True if the path is from an extensions repository.
   * @param path Path to check if it is within an extension repository.
   */
  is_path_extension(kw: {
    /** Path to check if it is within an extension repository. */
    path: H.In<string>;
  }): H.Ref<boolean>;
  /**
   * Initialize and refresh key configurations, called from the Blender
   * window manager on startup and refresh.
   */
  keyconfig_init(): H.Ref<void>;
  /**
   * Load and activate a key configuration from a file.
   * @param filepath The file path to the key configuration preset.
   */
  keyconfig_set(filepath: H.In<string>, kw?: {
    /** An optional callable for reporting errors. */
    report?: any;
  }): H.Ref<boolean>;
  /**
   * Load and activate a key configuration from a file.
   * @param filepath The file path to the key configuration preset.
   */
  keyconfig_set(kw: {
    /** The file path to the key configuration preset. */
    filepath: H.In<string>;
    /** An optional callable for reporting errors. */
    report?: any;
  }): H.Ref<boolean>;
  /** Load scripts and run each modules register function. */
  load_scripts(kw?: {
    /**
     * Causes all scripts to have their unregister method
     * called before loading.
     */
    reload_scripts?: H.In<boolean>;
    /**
     * only load scripts which are not already loaded
     * as modules.
     */
    refresh_scripts?: H.In<boolean>;
    /** Loads additional scripts (add-ons & app-templates). */
    extensions?: H.In<boolean>;
  }): H.Ref<void>;
  /** Load extensions scripts (add-ons and app-templates) */
  load_scripts_extensions(kw?: {
    /**
     * Causes all scripts to have their unregister method
     * called before loading.
     */
    reload_scripts?: H.In<boolean>;
  }): H.Ref<void>;
  /**
   * Create RNA "paths" from given names.
   * @returns A triple of three "RNA paths"
   * (most_complete_path, "struct.prop", "struct.prop:'enum'").
   * If no enum_name is given, the third element will always be empty.
   * @param struct_name Name of a RNA struct (like e.g. "Scene").
   * @param prop_name Name of a RNA struct's property.
   * @param enum_name Name of a RNA enum identifier.
   */
  make_rna_paths(struct_name: H.In<string>, prop_name: H.In<string>, enum_name: H.In<string>): H.Ref<[string, string, string]>;
  /**
   * Create RNA "paths" from given names.
   * @returns A triple of three "RNA paths"
   * (most_complete_path, "struct.prop", "struct.prop:'enum'").
   * If no enum_name is given, the third element will always be empty.
   * @param struct_name Name of a RNA struct (like e.g. "Scene").
   * @param prop_name Name of a RNA struct's property.
   * @param enum_name Name of a RNA enum identifier.
   */
  make_rna_paths(kw: {
    /** Name of a RNA struct (like e.g. "Scene"). */
    struct_name: H.In<string>;
    /** Name of a RNA struct's property. */
    prop_name: H.In<string>;
    /** Name of a RNA enum identifier. */
    enum_name: H.In<string>;
  }): H.Ref<[string, string, string]>;
  /**
   * @returns The language code used for user manual URL component based on the current language user-preference,
   * falling back to the ``default`` when unavailable.
   * @param default_ The fallback language code to use when the current language is unavailable.
   */
  manual_language_code(default_?: H.In<string>): H.Ref<string>;
  /**
   * @returns The language code used for user manual URL component based on the current language user-preference,
   * falling back to the ``default`` when unavailable.
   * @param default_ The fallback language code to use when the current language is unavailable.
   */
  manual_language_code(kw: {
    /** The fallback language code to use when the current language is unavailable. */
    default?: H.In<string>;
  }): H.Ref<string>;
  /**
   * Yield manual URL mappings from all registered hooks.
   * @returns An iterator of ``(prefix, mapping)`` pairs.
   */
  manual_map(): H.Ref<[string, [string, string][]][]>;
  /**
   * Load all modules in a path and return them as a list.
   * @returns all loaded modules.
   * @param path this path is scanned for scripts and packages.
   * @param loaded_modules already loaded module names, files matching these names will be ignored.
   */
  modules_from_path(path: H.In<string>, loaded_modules: H.In<Set<string>>): H.Ref<any[]>;
  /**
   * Load all modules in a path and return them as a list.
   * @returns all loaded modules.
   * @param path this path is scanned for scripts and packages.
   * @param loaded_modules already loaded module names, files matching these names will be ignored.
   */
  modules_from_path(kw: {
    /** this path is scanned for scripts and packages. */
    path: H.In<string>;
    /**
     * already loaded module names, files matching these
     * names will be ignored.
     */
    loaded_modules: H.In<Set<string>>;
  }): H.Ref<any[]>;
  /**
   * Search for a preset by name.
   * @returns The file path of the preset or None if not found.
   * @param name The preset name.
   * @param preset_path The preset subdirectory (e.g. ``"keyconfig"``).
   */
  preset_find(name: H.In<string>, preset_path: H.In<string>, kw?: {
    /** When True, search by display name instead of filename. */
    display_name?: H.In<boolean>;
    /** The file extension for the preset. */
    ext?: H.In<string>;
  }): H.Ref<string | null>;
  /**
   * Search for a preset by name.
   * @returns The file path of the preset or None if not found.
   * @param name The preset name.
   * @param preset_path The preset subdirectory (e.g. ``"keyconfig"``).
   */
  preset_find(kw: {
    /** The preset name. */
    name: H.In<string>;
    /** The preset subdirectory (e.g. ``"keyconfig"``). */
    preset_path: H.In<string>;
    /** When True, search by display name instead of filename. */
    display_name?: H.In<boolean>;
    /** The file extension for the preset. */
    ext?: H.In<string>;
  }): H.Ref<string | null>;
  /**
   * Returns a list of paths for a specific preset.
   * @returns Script paths.
   * @param subdir preset subdirectory (must not be an absolute path).
   */
  preset_paths(subdir: H.In<string>): H.Ref<string[]>;
  /**
   * Returns a list of paths for a specific preset.
   * @returns Script paths.
   * @param subdir preset subdirectory (must not be an absolute path).
   */
  preset_paths(kw: {
    /** preset subdirectory (must not be an absolute path). */
    subdir: H.In<string>;
  }): H.Ref<string[]>;
  /** Run this after creating new script paths to update sys.path */
  refresh_script_paths(): H.Ref<void>;
  /**
   * Register a subclass of a Blender type class.
   *
   * :raises ValueError:
   *    if the class is not a subclass of a registerable blender class.
   *
   * .. note::
   *
   *    If the class has a *register* class method it will be called
   *    before registration.
   */
  register_class(): H.Ref<void>;
  /**
   * Utility function to create register and unregister functions
   * which simply registers and unregisters a sequence of classes.
   * @returns register and unregister functions.
   * @param classes Sequence of classes to register and unregister.
   */
  register_classes_factory(classes: H.In<any[]>): H.Ref<[any, any]>;
  /**
   * Utility function to create register and unregister functions
   * which simply registers and unregisters a sequence of classes.
   * @returns register and unregister functions.
   * @param classes Sequence of classes to register and unregister.
   */
  register_classes_factory(kw: {
    /** Sequence of classes to register and unregister. */
    classes: H.In<any[]>;
  }): H.Ref<[any, any]>;
  /**
   * Register a command, accessible via the (``-c`` / ``--command``) command-line argument.
   * @returns The command handle which can be passed to :func:`unregister_cli_command`.
   * This uses Python's capsule type however the result should be considered an opaque handle only used for unregistering.
   * @param id The command identifier (must pass an ``str.isidentifier`` check). If the ``id`` is already registered, a warning is printed and the command is inaccessible to prevent accidents invoking the wrong command.
   * @param execute Callback, taking a single list of strings and returns an int. The arguments are built from all command-line arguments following the command id. The return value should be 0 for success, 1 on failure (specific error codes from the ``os`` module can also be used).
   */
  register_cli_command(id: H.In<string>, execute: any): any;
  /**
   * Register a command, accessible via the (``-c`` / ``--command``) command-line argument.
   * @returns The command handle which can be passed to :func:`unregister_cli_command`.
   * This uses Python's capsule type however the result should be considered an opaque handle only used for unregistering.
   * @param id The command identifier (must pass an ``str.isidentifier`` check). If the ``id`` is already registered, a warning is printed and the command is inaccessible to prevent accidents invoking the wrong command.
   * @param execute Callback, taking a single list of strings and returns an int. The arguments are built from all command-line arguments following the command id. The return value should be 0 for success, 1 on failure (specific error codes from the ``os`` module can also be used).
   */
  register_cli_command(kw: {
    /**
     * The command identifier (must pass an ``str.isidentifier`` check).
     * If the ``id`` is already registered, a warning is printed and the command is inaccessible to prevent accidents invoking the wrong command.
     */
    id: H.In<string>;
    /**
     * Callback, taking a single list of strings and returns an int.
     * The arguments are built from all command-line arguments following the command id.
     * The return value should be 0 for success, 1 on failure (specific error codes from the ``os`` module can also be used).
     */
    execute: any;
  }): any;
  /**
   * Register a function to provide manual URL mappings.
   * @param manual_hook A callable that returns ``(prefix, mapping)`` where *mapping* is a sequence of ``(pattern, url)`` pairs.
   */
  register_manual_map(manual_hook: any): H.Ref<void>;
  /**
   * Register a function to provide manual URL mappings.
   * @param manual_hook A callable that returns ``(prefix, mapping)`` where *mapping* is a sequence of ``(pattern, url)`` pairs.
   */
  register_manual_map(kw: {
    /**
     * A callable that returns ``(prefix, mapping)``
     * where *mapping* is a sequence of ``(pattern, url)`` pairs.
     */
    manual_hook: any;
  }): H.Ref<void>;
  /**
   * Register a preset search path.
   * @returns success
   * @param path preset directory (must be an absolute path). This path must contain a "presets" subdirectory which will typically contain presets for add-ons. You may call ``bpy.utils.register_preset_path(os.path.dirname(__file__))`` from an add-ons ``__init__.py`` file. When the ``__init__.py`` is in the same location as a ``presets`` directory. For example an operators preset would be located under: ``presets/operator/{operator.id}/`` where ``operator.id`` is the ``bl_idname`` of the operator.
   */
  register_preset_path(path: H.In<string>): H.Ref<boolean>;
  /**
   * Register a preset search path.
   * @returns success
   * @param path preset directory (must be an absolute path). This path must contain a "presets" subdirectory which will typically contain presets for add-ons. You may call ``bpy.utils.register_preset_path(os.path.dirname(__file__))`` from an add-ons ``__init__.py`` file. When the ``__init__.py`` is in the same location as a ``presets`` directory. For example an operators preset would be located under: ``presets/operator/{operator.id}/`` where ``operator.id`` is the ``bl_idname`` of the operator.
   */
  register_preset_path(kw: {
    /**
     * preset directory (must be an absolute path).
     * This path must contain a "presets" subdirectory which will typically contain presets for add-ons.
     * You may call ``bpy.utils.register_preset_path(os.path.dirname(__file__))`` from an add-ons ``__init__.py`` file.
     * When the ``__init__.py`` is in the same location as a ``presets`` directory.
     * For example an operators preset would be located under: ``presets/operator/{operator.id}/``
     * where ``operator.id`` is the ``bl_idname`` of the operator.
     */
    path: H.In<string>;
  }): H.Ref<boolean>;
  /**
   * Utility function to create register and unregister functions
   * which simply load submodules,
   * calling their register & unregister functions.
   *
   * .. note::
   *
   *    Modules are registered in the order given,
   *    unregistered in reverse order.
   * @returns register and unregister functions.
   * @param module_name The module name, typically ``__name__``.
   * @param submodule_names List of submodule names to load and unload.
   */
  register_submodule_factory(module_name: H.In<string>, submodule_names: H.In<readonly string[]>): H.Ref<[any, any]>;
  /**
   * Utility function to create register and unregister functions
   * which simply load submodules,
   * calling their register & unregister functions.
   *
   * .. note::
   *
   *    Modules are registered in the order given,
   *    unregistered in reverse order.
   * @returns register and unregister functions.
   * @param module_name The module name, typically ``__name__``.
   * @param submodule_names List of submodule names to load and unload.
   */
  register_submodule_factory(kw: {
    /** The module name, typically ``__name__``. */
    module_name: H.In<string>;
    /** List of submodule names to load and unload. */
    submodule_names: H.In<readonly string[]>;
  }): H.Ref<[any, any]>;
  /**
   * Register a tool in the toolbar.
   * @param tool_cls A tool subclass.
   */
  register_tool(tool_cls: any, kw?: {
    /** Optional identifiers this tool will be added after. */
    after?: H.In<readonly string[] | Set<string> | null>;
    /** When true, add a separator before this tool. */
    separator?: H.In<boolean>;
    /** When true, add a new nested group of tools. */
    group?: H.In<boolean>;
  }): H.Ref<void>;
  /**
   * Register a tool in the toolbar.
   * @param tool_cls A tool subclass.
   */
  register_tool(kw: {
    /** A tool subclass. */
    tool_cls: any;
    /** Optional identifiers this tool will be added after. */
    after?: H.In<readonly string[] | Set<string> | null>;
    /** When true, add a separator before this tool. */
    separator?: H.In<boolean>;
    /** When true, add a new nested group of tools. */
    group?: H.In<boolean>;
  }): H.Ref<void>;
  /**
   * Return the base path for storing system files.
   *
   * .. note::
   *
   *    ``SYSTEM_LIBS`` mirrors ``SYSTEM`` but resolves to the directory for architecture-dependent libraries (typically under ``/usr/lib/...`` rather than ``/usr/share/...``). It is an empty string on builds without a separate library directory, such as portable builds and the Python module.
   * @returns the resource path (not necessarily existing).
   * @param type The resource type.
   */
  resource_path(type: H.In<"USER" | "LOCAL" | "SYSTEM" | "SYSTEM_LIBS">, kw?: {
    /** Major version. None (the default) uses ``bpy.app.version[0]``. */
    major?: H.In<number | null>;
    /** Minor version. None (the default) uses ``bpy.app.version[1]``. */
    minor?: H.In<number | null>;
  }): H.Ref<string>;
  /**
   * Return the base path for storing system files.
   *
   * .. note::
   *
   *    ``SYSTEM_LIBS`` mirrors ``SYSTEM`` but resolves to the directory for architecture-dependent libraries (typically under ``/usr/lib/...`` rather than ``/usr/share/...``). It is an empty string on builds without a separate library directory, such as portable builds and the Python module.
   * @returns the resource path (not necessarily existing).
   * @param type The resource type.
   */
  resource_path(kw: {
    /** The resource type. */
    type: H.In<"USER" | "LOCAL" | "SYSTEM" | "SYSTEM_LIBS">;
    /** Major version. None (the default) uses ``bpy.app.version[0]``. */
    major?: H.In<number | null>;
    /** Minor version. None (the default) uses ``bpy.app.version[1]``. */
    minor?: H.In<number | null>;
  }): H.Ref<string>;
  /**
   * Return the user script path or None.
   * @returns The user script path, or None if not found.
   */
  script_path_user(): H.Ref<string | null>;
  /**
   * Returns a list of valid script paths.
   * @returns script paths.
   */
  script_paths(kw?: {
    /** Optional subdir. */
    subdir?: H.In<string | null>;
    /** Include the user preference script paths. */
    user_pref?: H.In<boolean>;
    /** Include local, user and system paths rather just the paths Blender uses. */
    check_all?: H.In<boolean>;
    /** Include user paths */
    use_user?: H.In<boolean>;
    /** Include BLENDER_SYSTEM_SCRIPTS variable path */
    use_system_environment?: H.In<boolean>;
  }): H.Ref<string[]>;
  /** Returns a list of user preference script directories. */
  script_paths_pref(): H.Ref<any[]>;
  /** Returns a list of system script directories from environment variables. */
  script_paths_system_environment(): H.Ref<any[]>;
  /**
   * Returns an SMPTE formatted string from the *frame*:
   * ``HH:MM:SS:FF``.
   *
   * If *fps* and *fps_base* are not given the current scene is used.
   * @returns the frame string.
   * @param frame frame number.
   */
  smpte_from_frame(frame: H.In<number>, kw?: {
    /** Frames per second, if not given the current scene is used. */
    fps?: H.In<number | null>;
    /** Frames per second base, if not given the current scene is used. */
    fps_base?: H.In<number | null>;
  }): H.Ref<string>;
  /**
   * Returns an SMPTE formatted string from the *frame*:
   * ``HH:MM:SS:FF``.
   *
   * If *fps* and *fps_base* are not given the current scene is used.
   * @returns the frame string.
   * @param frame frame number.
   */
  smpte_from_frame(kw: {
    /** frame number. */
    frame: H.In<number>;
    /** Frames per second, if not given the current scene is used. */
    fps?: H.In<number | null>;
    /** Frames per second base, if not given the current scene is used. */
    fps_base?: H.In<number | null>;
  }): H.Ref<string>;
  /**
   * Returns an SMPTE formatted string from the *time*:
   * ``HH:MM:SS:FF``.
   *
   * If *fps* and *fps_base* are not given the current scene is used.
   * @returns the frame string.
   * @param time time in seconds.
   */
  smpte_from_seconds(time: any, kw?: {
    /** Frames per second, if not given the current scene is used. */
    fps?: H.In<number | null>;
    /** Frames per second base, if not given the current scene is used. */
    fps_base?: H.In<number | null>;
  }): H.Ref<string>;
  /**
   * Returns an SMPTE formatted string from the *time*:
   * ``HH:MM:SS:FF``.
   *
   * If *fps* and *fps_base* are not given the current scene is used.
   * @returns the frame string.
   * @param time time in seconds.
   */
  smpte_from_seconds(kw: {
    /** time in seconds. */
    time: any;
    /** Frames per second, if not given the current scene is used. */
    fps?: H.In<number | null>;
    /** Frames per second base, if not given the current scene is used. */
    fps_base?: H.In<number | null>;
  }): H.Ref<string>;
  /**
   * Return a system resource path.
   * @param type string in ['DATAFILES', 'SCRIPTS', 'EXTENSIONS', 'PYTHON'].
   */
  system_resource(type: H.In<string>, kw?: {
    /** Optional subdirectory. */
    path?: H.In<string | H.Bytes>;
  }): any;
  /**
   * Return a system resource path.
   * @param type string in ['DATAFILES', 'SCRIPTS', 'EXTENSIONS', 'PYTHON'].
   */
  system_resource(kw: {
    /** string in ['DATAFILES', 'SCRIPTS', 'EXTENSIONS', 'PYTHON']. */
    type: H.In<string>;
    /** Optional subdirectory. */
    path?: H.In<string | H.Bytes>;
  }): any;
  /**
   * Returns the time from a frame number.
   *
   * If *fps* and *fps_base* are not given the current scene is used.
   * @returns the time in seconds.
   * @param frame number.
   */
  time_from_frame(frame: H.In<number>, kw?: {
    /** Frames per second, if not given the current scene is used. */
    fps?: H.In<number | null>;
    /** Frames per second base, if not given the current scene is used. */
    fps_base?: H.In<number | null>;
  }): any;
  /**
   * Returns the time from a frame number.
   *
   * If *fps* and *fps_base* are not given the current scene is used.
   * @returns the time in seconds.
   * @param frame number.
   */
  time_from_frame(kw: {
    /** number. */
    frame: H.In<number>;
    /** Frames per second, if not given the current scene is used. */
    fps?: H.In<number | null>;
    /** Frames per second base, if not given the current scene is used. */
    fps_base?: H.In<number | null>;
  }): any;
  /**
   * Returns a float frame number from a time given in seconds or
   * as a datetime.timedelta object.
   *
   * If *fps* and *fps_base* are not given the current scene is used.
   * @returns The frame.
   * @param time time in seconds.
   */
  time_to_frame(time: any, kw?: { fps?: any; fps_base?: any }): any;
  /**
   * Returns a float frame number from a time given in seconds or
   * as a datetime.timedelta object.
   *
   * If *fps* and *fps_base* are not given the current scene is used.
   * @returns The frame.
   * @param time time in seconds.
   */
  time_to_frame(kw: {
    /** time in seconds. */
    time: any;
    fps?: any;
    fps_base?: any;
  }): any;
  /**
   * Simple string un-escape function used for animation paths.
   * This performs the reverse of :func:`escape_identifier`.
   * @returns The un-escaped string.
   * @param string text
   */
  unescape_identifier(string: H.In<string>): H.Ref<string>;
  /**
   * Simple string un-escape function used for animation paths.
   * This performs the reverse of :func:`escape_identifier`.
   * @returns The un-escaped string.
   * @param string text
   */
  unescape_identifier(kw: {
    /** text */
    string: H.In<string>;
  }): H.Ref<string>;
  readonly units: P.bpy_utils_units.Api;
  /**
   * Unload the Python class from blender.
   *
   * .. note::
   *
   *    If the class has an *unregister* class method it will be called
   *    before unregistering.
   */
  unregister_class(): H.Ref<void>;
  /**
   * Unregister a CLI command.
   * @param handle The return value of :func:`register_cli_command`.
   */
  unregister_cli_command(handle: any): H.Ref<void>;
  /**
   * Unregister a CLI command.
   * @param handle The return value of :func:`register_cli_command`.
   */
  unregister_cli_command(kw: {
    /** The return value of :func:`register_cli_command`. */
    handle: any;
  }): H.Ref<void>;
  /**
   * Unregister a previously registered manual map hook.
   * @param manual_hook The hook function to remove.
   */
  unregister_manual_map(manual_hook: any): H.Ref<void>;
  /**
   * Unregister a previously registered manual map hook.
   * @param manual_hook The hook function to remove.
   */
  unregister_manual_map(kw: {
    /** The hook function to remove. */
    manual_hook: any;
  }): H.Ref<void>;
  /**
   * Unregister a preset search path.
   * @returns success
   * @param path preset directory (must be an absolute path). This must match the registered path exactly.
   */
  unregister_preset_path(path: H.In<string>): H.Ref<boolean>;
  /**
   * Unregister a preset search path.
   * @returns success
   * @param path preset directory (must be an absolute path). This must match the registered path exactly.
   */
  unregister_preset_path(kw: {
    /**
     * preset directory (must be an absolute path).
     * This must match the registered path exactly.
     */
    path: H.In<string>;
  }): H.Ref<boolean>;
  /**
   * Unregister a previously registered tool.
   * @param tool_cls The tool class to unregister.
   */
  unregister_tool(tool_cls: any): H.Ref<void>;
  /**
   * Unregister a previously registered tool.
   * @param tool_cls The tool class to unregister.
   */
  unregister_tool(kw: {
    /** The tool class to unregister. */
    tool_cls: any;
  }): H.Ref<void>;
  /**
   * Return a user resource path (normally from the users home directory).
   * @returns a path.
   * @param resource_type The resource type.
   */
  user_resource(resource_type: H.In<"DATAFILES" | "CONFIG" | "SCRIPTS" | "EXTENSIONS">, kw?: {
    /** Optional subdirectory. */
    path?: H.In<string>;
    /** Treat the path as a directory and create it if its not existing. */
    create?: H.In<boolean>;
  }): H.Ref<string>;
  /**
   * Return a user resource path (normally from the users home directory).
   * @returns a path.
   * @param resource_type The resource type.
   */
  user_resource(kw: {
    /** The resource type. */
    resource_type: H.In<"DATAFILES" | "CONFIG" | "SCRIPTS" | "EXTENSIONS">;
    /** Optional subdirectory. */
    path?: H.In<string>;
    /** Treat the path as a directory and create it if its not existing. */
    create?: H.In<boolean>;
  }): H.Ref<string>;
}