|
Blender V5.3
|
#include <BKE_blender_project.hh>
Public Member Functions | |
| void | set_name (StringRef name) |
| void | set_root_path (StringRef root_path) |
| void | set_ocio_config_path (StringRef ocio_config_path) |
| void | set_splash_image_path (StringRef splash_image_path) |
| StringRefNull | get_name () const |
| StringRefNull | get_root_path () const |
| StringRefNull | get_ocio_config_path () const |
| StringRefNull | get_splash_image_path () const |
| int | find_variable_index (ProjectVariable *var) |
| ProjectVariable * | new_variable (StringRef name, ProjectVariableType type) |
| int | remove_variable (ProjectVariable *var) |
| void | move_variable (int from_index, int to_index) |
| void | rename_variable (int variable_index, StringRef name) |
Public Attributes | |
| Vector< std::unique_ptr< ProjectVariable > > | variables |
| int | active_variable_index = 0 |
| int | active_asset_library_index |
| bool | is_dirty = true |
| bool | ocio_config_use_path = false |
A Blender project.
There is at most one active project at a time in Blender.
Definition at line 140 of file BKE_blender_project.hh.
| int blender::bke::BlenderProject::find_variable_index | ( | ProjectVariable * | var | ) |
Get the array index of the given variable.
Definition at line 255 of file blender_project.cc.
References blender::BLI_assert(), and variables.
Referenced by remove_variable().
| StringRefNull blender::bke::BlenderProject::get_name | ( | ) | const |
Definition at line 235 of file blender_project.cc.
References blender::StringRefNull::StringRefNull().
| StringRefNull blender::bke::BlenderProject::get_ocio_config_path | ( | ) | const |
Definition at line 245 of file blender_project.cc.
References blender::StringRefNull::StringRefNull().
| StringRefNull blender::bke::BlenderProject::get_root_path | ( | ) | const |
Definition at line 240 of file blender_project.cc.
References blender::StringRefNull::StringRefNull().
| StringRefNull blender::bke::BlenderProject::get_splash_image_path | ( | ) | const |
Definition at line 250 of file blender_project.cc.
References blender::StringRefNull::StringRefNull().
| void blender::bke::BlenderProject::move_variable | ( | int | from_index, |
| int | to_index ) |
Move the variable at from_index to to_index.
The other variables are shifted appropriately around this.
Both from_index and to_index must be valid indices in the list.
Definition at line 302 of file blender_project.cc.
References blender::BLI_assert(), is_dirty, and variables.
| ProjectVariable * blender::bke::BlenderProject::new_variable | ( | StringRef | name, |
| ProjectVariableType | type ) |
Create a new variable of the given name and type.
If name does not adhere to naming requirements, it is automatically altered to meet them by substituting invalid characters. name will also be modified if needed to make it unique among the current variables.
Definition at line 271 of file blender_project.cc.
References blender::bke::ensure_is_valid_project_variable_name(), is_dirty, rename_variable(), and variables.
| int blender::bke::BlenderProject::remove_variable | ( | ProjectVariable * | var | ) |
Remove the given variable.
Definition at line 283 of file blender_project.cc.
References active_variable_index, find_variable_index(), is_dirty, and variables.
| void blender::bke::BlenderProject::rename_variable | ( | int | variable_index, |
| StringRef | name ) |
Rename the variable at the given index.
If name does not adhere to naming requirements, it is automatically altered to meet them by substituting invalid characters. name will also be modified if needed to make it unique among the current variables.
Definition at line 326 of file blender_project.cc.
References blender::BLI_assert(), blender::BLI_uniquename_cb(), blender::bke::ensure_is_valid_project_variable_name(), blender::IDProperty::name, and variables.
Referenced by new_variable().
| void blender::bke::BlenderProject::set_name | ( | StringRef | name | ) |
Set the project's name.
Also marks the project as dirty.
The passed name should never be empty (which is invalid).
Definition at line 203 of file blender_project.cc.
References blender::BLI_assert(), is_dirty, and blender::blender::StringRefBase::is_empty().
| void blender::bke::BlenderProject::set_ocio_config_path | ( | StringRef | ocio_config_path | ) |
Set the OpenColorIO configuration path and mark the project dirty.
Definition at line 221 of file blender_project.cc.
References is_dirty.
| void blender::bke::BlenderProject::set_root_path | ( | StringRef | root_path | ) |
Set the project's root path.
Also marks the project as dirty.
The passed root_path should never be empty (which is invalid).
Definition at line 212 of file blender_project.cc.
References blender::BLI_assert(), is_dirty, and blender::blender::StringRefBase::is_empty().
| void blender::bke::BlenderProject::set_splash_image_path | ( | StringRef | splash_image_path | ) |
Set the splash screen image path and mark the project dirty.
Definition at line 228 of file blender_project.cc.
References is_dirty.
| int blender::bke::BlenderProject::active_asset_library_index |
Definition at line 169 of file BKE_blender_project.hh.
| int blender::bke::BlenderProject::active_variable_index = 0 |
Definition at line 167 of file BKE_blender_project.hh.
Referenced by remove_variable().
| bool blender::bke::BlenderProject::is_dirty = true |
Whether the project has unsaved changes.
Default initializes to true because a freshly constructed BlenderProject is unsaved by definition.
Definition at line 177 of file BKE_blender_project.hh.
Referenced by move_variable(), new_variable(), remove_variable(), set_name(), set_ocio_config_path(), set_root_path(), and set_splash_image_path().
| bool blender::bke::BlenderProject::ocio_config_use_path = false |
Show the OpenColorIO config a path even when empty or a preset, runtime UI state only.
Definition at line 182 of file BKE_blender_project.hh.
| Vector<std::unique_ptr<ProjectVariable> > blender::bke::BlenderProject::variables |
Definition at line 166 of file BKE_blender_project.hh.
Referenced by find_variable_index(), move_variable(), new_variable(), remove_variable(), and rename_variable().