Skip to content

fxcore

The fxcore module provides a set of tools for managing and automating the creation of VFX entities.

check_asset

check_asset(base_dir: str = '.') -> bool

Checks if a valid asset directory structure exists within a project.

Parameters:

Name Type Description Default
base_dir str

The base directory where the asset should be located, typically the "project/production/assets" directory. Defaults to the current directory.

'.'

Returns:

Name Type Description
bool bool

True if the asset is valid, False otherwise.

check_assets_directory

check_assets_directory(base_dir: str = '.') -> bool

Checks if a valid "assets" (which holds the assets) directory structure exists within a project.

Parameters:

Name Type Description Default
base_dir str

The base directory where the "assets" directory should be located, typically the "project/production" directory. Defaults to the current directory.

'.'

Returns:

Name Type Description
bool bool

True if the assets directory is valid, False otherwise.

check_project

check_project(base_dir: str = '.') -> bool

Checks if a valid project directory structure exists.

Parameters:

Name Type Description Default
base_dir str

The base directory where the project should be located. Defaults to the current directory.

'.'

Returns:

Name Type Description
bool bool

True if the project is valid, False otherwise.

check_sequence

check_sequence(base_dir: str = '.') -> bool

Checks if a valid sequence directory structure exists within a project.

Parameters:

Name Type Description Default
base_dir str

The base directory where the sequence should be located, typically the "project/production/shots" directory. Defaults to the current directory.

'.'

Returns:

Name Type Description
bool bool

True if the sequence is valid, False otherwise.

check_shot

check_shot(base_dir: str = '.') -> bool

Checks if a valid shot directory structure exists within a sequence.

Parameters:

Name Type Description Default
base_dir str

The base directory where the shot should be located, typically the "project/production/shots/sequence" directory. Defaults to the current directory.

'.'

Returns:

Name Type Description
bool bool

True if the shot is valid, False otherwise.

check_shots_directory

check_shots_directory(base_dir: str = '.') -> bool

Checks if a valid "shots" (which holds the sequences) directory structure exists within a project.

Parameters:

Name Type Description Default
base_dir str

The base directory where the "shots" directory should be located, typically the "project/production" directory. Defaults to the current directory.

'.'

Returns:

Name Type Description
bool bool

True if the shots directory is valid, False otherwise.

check_step

check_step(base_dir: str = '.') -> bool

Checks if a valid step directory structure exists within a project.

Parameters:

Name Type Description Default
base_dir str

The base directory where the step should be located, typically the "project/production/steps" directory. Defaults to the current directory.

'.'

Returns:

Name Type Description
bool bool

True if the step is valid, False otherwise.

check_task

check_task(base_dir: str = '.') -> bool

Checks if a valid task directory structure exists within a project.

Parameters:

Name Type Description Default
base_dir str

The base directory where the task should be located, typically the "project/production/tasks" directory. Defaults to the current directory.

'.'

Returns:

Name Type Description
bool bool

True if the task is valid, False otherwise.

check_workfiles_directory

check_workfiles_directory(base_dir: str = '.') -> bool

Checks if a valid workfile directory structure exists within a project.

Parameters:

Name Type Description Default
base_dir str

The base directory where the workfile should be located, typically the "project/production/workfiles" directory. Defaults to the current directory.

'.'

Returns:

Name Type Description
bool bool

True if the workfile is valid, False otherwise.

create_asset

create_asset(
    asset_name: str, base_dir: str = ".", parent: QWidget = None
) -> Optional[str]

Creates a new asset directory structure within a project.

Parameters:

Name Type Description Default
asset_name str

The name of the asset to create.

required
base_dir str

The base directory where the asset will be created, typically the "project/production/assets" directory. Defaults to the current directory.

'.'
parent QWidget

The parent widget for the message box. Only applicable in a GUI environment.

None

Returns:

Type Description
Optional[str]

Optional[str]: The name of the asset if created, None otherwise.

Examples:

Python

>>> create_asset("charA", "/path/to/assets")

CLI

>>> fxquinox.cli.fxcore.create_asset charA --base_dir "/path/to/assets"
Info

Has a CLI counterpart.

create_assets

create_assets(
    asset_names: list[str], base_dir: str = "."
) -> Optional[list[str]]

Creates new asset directory structures within a project.

Parameters:

Name Type Description Default
asset_names list

The names of the assets to create.

required
base_dir str

The base directory where the asset will be created, typically the "project/production/assets" directory. Defaults to the current directory.

'.'

Returns:

Type Description
Optional[list[str]]

Optional[list]: The names of the assets if created, None otherwise.

Examples:

Python

>>> create_assets(["charA", "propA"], "/path/to/assets")

CLI

>>> fxquinox.cli.fxcore.create_assets charA,propA --base_dir "/path/to/assets"
Info

Has a CLI counterpart.

create_project

create_project(project_name: str, base_dir: str = '.') -> Optional[str]

Creates a new project directory structure.

Parameters:

Name Type Description Default
project_name str

The name of the project to create.

required
base_dir str

The base directory where the project will be created. Defaults to the current directory.

'.'

Returns:

Type Description
Optional[str]

Optional[str]: The name of the project if created, None otherwise.

Examples:

Python

>>> create_project("my_project")

CLI

>>> python -m fxquinox.cli.fxcore create_project my_project
Info

Has a CLI counterpart.

create_sequence

create_sequence(
    sequence_name: str, base_dir: str = ".", parent: QWidget = None
) -> Optional[str]

Creates a new sequence directory structure within a project.

Parameters:

Name Type Description Default
sequence_name str

The name of the sequence to create.

required
base_dir str

The base directory where the sequence will be created, typically the "project/production/shots" directory. Defaults to the current directory.

'.'
parent QWidget

The parent widget for the message box. Only applicable in a GUI environment.

None

Returns:

Type Description
Optional[str]

Optional[str]: The name of the sequence if created, None otherwise.

Examples:

Python

>>> create_sequence("010", "/path/to/shots")

CLI

>>> fxquinox.cli.fxcore.create_sequence 010 --base_dir "/path/to/shots"
Info

Has a CLI counterpart.

create_sequences

create_sequences(
    sequence_names: list[str], base_dir: str = "."
) -> Optional[list[str]]

Creates new sequence directory structures within a project.

Parameters:

Name Type Description Default
sequence_names list

The names of the sequences to create.

required
base_dir str

The base directory where the sequence will be created, typically the "project/production/shots" directory. Defaults to the current directory.

'.'

Returns:

Type Description
Optional[list[str]]

Optional[list]: The names of the sequences if created, None otherwise.

Examples:

Python

>>> create_sequences(["010", "020"], "/path/to/shots")

CLI

>>> fxquinox.cli.fxcore.create_sequences 010,020 --base_dir "/path/to/shots"
Info

Has a CLI counterpart.

create_shot

create_shot(
    shot_name: str, base_dir: str = ".", parent: QWidget = None
) -> Optional[str]

Creates a new shot directory structure within a sequence.

Parameters:

Name Type Description Default
shot_name str

The name of the shot to create.

required
base_dir str

The base directory where the shot will be created, typically the "project/production/shots/sequence" directory. Defaults to the current directory.

'.'
parent QWidget

The parent widget for the message box. Only applicable in a GUI environment.

None

Returns:

Type Description
Optional[str]

Optional[str]: The name of the shot if created, None otherwise.

Examples:

Python

>>> create_shot("0010", "/path/to/sequence")

CLI

>>> fxquinox.cli.fxcore.create_shot 0010 --base_dir "/path/to/sequence"
Info

Has a CLI counterpart.

create_shots

create_shots(shot_names: list[str], base_dir: str = '.') -> Optional[list[str]]

Creates new shot directory structures within a sequence.

Parameters:

Name Type Description Default
shot_names list[str]

The names of the shots to create.

required
base_dir str

The base directory where the shots will be created, typically the "project/production/shots/sequence" directory. Defaults to the current directory.

'.'

Returns:

Type Description
Optional[list[str]]

Optional[list[str]]: The names of the shots if created, None otherwise.

Examples:

Python

>>> create_shots(["0010", "0020"], "/path/to/sequence")

CLI

>>> fxquinox.cli.fxcore.create_shots 0010,0020 --base_dir "/path/to/sequence"
Info

Has a CLI counterpart.

create_step

create_step(
    step_name: str, base_dir: str = ".", parent: QWidget = None
) -> Optional[str]

Creates a new step directory structure within a project.

Parameters:

Name Type Description Default
step_name str

The name of the step to create.

required
base_dir str

The base directory where the step will be created, typically the "project/production/steps" directory. Defaults to the current directory.

'.'
parent QWidget

The parent widget for the message box. Only applicable in a GUI environment.

None

Returns:

Type Description
Optional[str]

Optional[str]: The name of the step if created, None otherwise.

Examples:

Python

>>> create_step("modeling", "/path/to/steps")

CLI

>>> fxquinox.cli.fxcore.create_step modeling --base_dir "/path/to/steps"
Info

Has a CLI counterpart.

create_task

create_task(
    task_name: str, base_dir: str = ".", parent: QWidget = None
) -> Optional[str]

Creates a new task directory structure within a project.

Parameters:

Name Type Description Default
task_name str

The name of the task to create.

required
base_dir str

The base directory where the task will be created, typically the "project/production/tasks" directory. Defaults to the current directory.

'.'
parent QWidget

The parent widget for the message box. Only applicable in a GUI environment.

None

Returns:

Type Description
Optional[str]

Optional[str]: The name of the task if created, None otherwise.

Examples:

Python

>>> create_task("rigging", "/path/to/tasks")

CLI

>>> fxquinox.cli.fxcore.create_task rigging --base_dir "/path/to/tasks"
Info

Has a CLI counterpart.

create_workfile

create_workfile(
    workfile_name: str, base_dir: str = ".", parent: QWidget = None
) -> Optional[str]

Creates a new workfile directory structure within a project.

Parameters:

Name Type Description Default
workfile_name str

The name of the workfile to create.

required
base_dir str

The base directory where the workfile will be created, typically the "project/production/workfiles" directory. Defaults to the current directory.

'.'
parent QWidget

The parent widget for the message box. Only applicable in a GUI environment.

None

Returns:

Type Description
Optional[str]

Optional[str]: The name of the workfile if created, None otherwise.

Examples:

Python

>>> create_workfile("rigging_v001", "/path/to/workfiles")

CLI

>>> fxquinox.cli.fxcore.create_workfile rigging_v001 --base_dir "/path/to/workfiles"
Info

Has a CLI counterpart.

Bug

Not implemented yet.

get_project

get_project(from_file: bool = False) -> Dict[str, Optional[str]]

Gets the project path, name, assets path, and shots path from the environment file, or the environment variables (if set beforehand).

Parameters:

Name Type Description Default
from_file bool

Whether to force read the environment file. Defaults to False.

False

Returns:

Type Description
Dict[str, Optional[str]]

Dict[str, Optional[str]]: A dictionary with keys 'FXQUINOX_PROJECT_ROOT', 'FXQUINOX_PROJECT_NAME', 'FXQUINOX_PROJECT_ASSETS_PATH', and 'FXQUINOX_PROJECT_SHOTS_PATH' pointing to their respective paths if found, None otherwise.

set_project

set_project(
    launcher: Optional[FXLauncherSystemTray] = None,
    quit_on_last_window_closed: bool = False,
    project_path: str = None,
) -> Optional[Tuple[str, str]]

Sets the project path in the project browser.

Parameters:

Name Type Description Default
launcher FXLauncherSystemTray

The launcher instance to update the project name. Defaults to None.

None
quit_on_last_window_closed bool

Whether to quit the application when the last window is closed. Defaults to False.

False
project_dir str

The project directory to set. Defaults to None.

required

Returns:

Type Description
Optional[Tuple[str, str]]

Optional[dict]: A dictionary with the project root, name, assets path, and shots path if set, None otherwise.