Blender V5.0
blender::animrig::tests::KeyframingTest Class Reference

Inherits testing::Test.

Public Member Functions

void SetUp () override
void TearDown () override
void ensure_legacy_action_assigned (ID &id)
void ensure_action_is_legacy (bAction &action)

Static Public Member Functions

static void SetUpTestSuite ()
static void TearDownTestSuite ()

Public Attributes

Mainbmain
Objectobject
PointerRNA object_rna_pointer
Objectarmature_object
bArmaturearmature
PointerRNA armature_object_rna_pointer
Objectobject_with_nla
PointerRNA object_with_nla_rna_pointer
bActionnla_action
Objectcube
PointerRNA cube_rna_pointer
Meshcube_mesh
PointerRNA cube_mesh_rna_pointer
Materialmaterial
PointerRNA material_rna_pointer

Detailed Description

Definition at line 36 of file keyframing_test.cc.

Member Function Documentation

◆ ensure_action_is_legacy()

void blender::animrig::tests::KeyframingTest::ensure_action_is_legacy ( bAction & action)
inline

Add an F-Curve Group. This marks the Action as legacy. Since most tests are on F-Curves, adding a Group here is the less invasive way to make this a Legacy Action.

Use of this function indicates the test should be converted to layered Actions.

Definition at line 161 of file keyframing_test.cc.

References BLI_addtail(), bAction::groups, MEM_callocN(), bActionGroup::name, and STRNCPY_UTF8.

Referenced by ensure_legacy_action_assigned(), and SetUp().

◆ ensure_legacy_action_assigned()

void blender::animrig::tests::KeyframingTest::ensure_legacy_action_assigned ( ID & id)
inline

Create a legacy Action and assign it to the ID.

Use of this function indicates that the unit test should be converted to use layered Actions.

Definition at line 141 of file keyframing_test.cc.

References AnimData::action, blender::animrig::action_add(), blender::animrig::assign_action(), BKE_animdata_from_id(), BLI_assert, bmain, ensure_action_is_legacy(), and UNUSED_VARS_NDEBUG.

◆ SetUp()

◆ SetUpTestSuite()

void blender::animrig::tests::KeyframingTest::SetUpTestSuite ( )
inlinestatic

Definition at line 62 of file keyframing_test.cc.

References BKE_idtype_init(), and CLG_init().

◆ TearDown()

void blender::animrig::tests::KeyframingTest::TearDown ( )
inlineoverride

Definition at line 130 of file keyframing_test.cc.

References BKE_main_free(), and bmain.

◆ TearDownTestSuite()

void blender::animrig::tests::KeyframingTest::TearDownTestSuite ( )
inlinestatic

Definition at line 71 of file keyframing_test.cc.

References CLG_exit().

Member Data Documentation

◆ armature

bArmature* blender::animrig::tests::KeyframingTest::armature

Definition at line 46 of file keyframing_test.cc.

Referenced by SetUp().

◆ armature_object

Object* blender::animrig::tests::KeyframingTest::armature_object

Definition at line 45 of file keyframing_test.cc.

Referenced by SetUp().

◆ armature_object_rna_pointer

PointerRNA blender::animrig::tests::KeyframingTest::armature_object_rna_pointer

Definition at line 47 of file keyframing_test.cc.

Referenced by SetUp().

◆ bmain

Main* blender::animrig::tests::KeyframingTest::bmain

Definition at line 38 of file keyframing_test.cc.

Referenced by ensure_legacy_action_assigned(), SetUp(), and TearDown().

◆ cube

Object* blender::animrig::tests::KeyframingTest::cube

Definition at line 55 of file keyframing_test.cc.

Referenced by SetUp().

◆ cube_mesh

Mesh* blender::animrig::tests::KeyframingTest::cube_mesh

Definition at line 57 of file keyframing_test.cc.

Referenced by SetUp().

◆ cube_mesh_rna_pointer

PointerRNA blender::animrig::tests::KeyframingTest::cube_mesh_rna_pointer

Definition at line 58 of file keyframing_test.cc.

Referenced by SetUp().

◆ cube_rna_pointer

PointerRNA blender::animrig::tests::KeyframingTest::cube_rna_pointer

Definition at line 56 of file keyframing_test.cc.

Referenced by SetUp().

◆ material

Material* blender::animrig::tests::KeyframingTest::material

Definition at line 59 of file keyframing_test.cc.

Referenced by SetUp().

◆ material_rna_pointer

PointerRNA blender::animrig::tests::KeyframingTest::material_rna_pointer

Definition at line 60 of file keyframing_test.cc.

Referenced by SetUp().

◆ nla_action

bAction* blender::animrig::tests::KeyframingTest::nla_action

Definition at line 52 of file keyframing_test.cc.

Referenced by SetUp().

◆ object

Object* blender::animrig::tests::KeyframingTest::object

Definition at line 41 of file keyframing_test.cc.

Referenced by SetUp().

◆ object_rna_pointer

PointerRNA blender::animrig::tests::KeyframingTest::object_rna_pointer

Definition at line 42 of file keyframing_test.cc.

Referenced by SetUp().

◆ object_with_nla

Object* blender::animrig::tests::KeyframingTest::object_with_nla

Definition at line 50 of file keyframing_test.cc.

Referenced by SetUp().

◆ object_with_nla_rna_pointer

PointerRNA blender::animrig::tests::KeyframingTest::object_with_nla_rna_pointer

Definition at line 51 of file keyframing_test.cc.

Referenced by SetUp().


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