Blender V4.3
IDNewNameResult Struct Reference

#include <BKE_lib_id.hh>

Public Types

enum class  Action {
  UNCHANGED = 0 , UNCHANGED_COLLISION = 1 , RENAMED_NO_COLLISION = 2 , RENAMED_COLLISION_ADJUSTED = 3 ,
  RENAMED_COLLISION_FORCED = 4
}
 

Public Attributes

enum IDNewNameResult::Action action = Action::UNCHANGED
 
IDother_id = nullptr
 

Detailed Description

Information about how an ID rename went on.

Definition at line 286 of file BKE_lib_id.hh.

Member Enumeration Documentation

◆ Action

enum class IDNewNameResult::Action
strong

How the renaming went on.

Enumerator
UNCHANGED 

ID was not renamed, because requested new name was already the ID's name.

UNCHANGED_COLLISION 

ID was not renamed, because requested new name would collide with another existing ID's name, and the first available unique name is already current ID's name.

RENAMED_NO_COLLISION 

Successfully renamed, without any collision with another ID's name.

RENAMED_COLLISION_ADJUSTED 

Successfully renamed, requested new name was adjusted to avoid collision with another ID.

RENAMED_COLLISION_FORCED 

Successfully renamed, requested new name was enforced onto given ID, and another ID had to be renamed to avoid name collision.

Definition at line 288 of file BKE_lib_id.hh.

Member Data Documentation

◆ action

enum IDNewNameResult::Action IDNewNameResult::action = Action::UNCHANGED

◆ other_id

ID* IDNewNameResult::other_id = nullptr

The colliding ID, if any.

Warning
Currently will be nullptr in RENAMED_COLLISION_ADJUSTED case, for performance reasons (avoid an ID lookup by name) when doing 'standard' RenameExistingNever renames.

Definition at line 313 of file BKE_lib_id.hh.


The documentation for this struct was generated from the following file: