Blender V4.3
rna_action_api.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2009 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include <cstdio>
10#include <cstdlib>
11#include <cstring>
12#include <ctime>
13
14#include "BLI_utildefines.h"
15
16#include "RNA_define.hh"
17
18#include "DNA_action_types.h"
19
20#include "rna_internal.hh" /* own include */
21
22#ifdef RNA_RUNTIME
23
24# include "BKE_action.hh"
25
26# include "DNA_anim_types.h"
27# include "DNA_curve_types.h"
28
29static void rna_Action_flip_with_pose(bAction *act, ReportList *reports, Object *ob)
30{
31 if (ob->type != OB_ARMATURE) {
32 BKE_report(reports, RPT_ERROR, "Only armature objects are supported");
33 return;
34 }
36
37 /* Only for redraw. */
39}
40
41#else
42
44{
45 FunctionRNA *func;
46 PropertyRNA *parm;
47
48 func = RNA_def_function(srna, "flip_with_pose", "rna_Action_flip_with_pose");
49 RNA_def_function_ui_description(func, "Flip the action around the X axis using a pose");
51
52 parm = RNA_def_pointer(
53 func, "object", "Object", "", "The reference armature object to use when flipping");
55}
56
57#endif
Blender kernel action and pose functionality.
void void void void void BKE_action_flip_with_pose(bAction *act, Object *ob_arm) ATTR_NONNULL(1
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition report.cc:125
@ OB_ARMATURE
@ PARM_REQUIRED
Definition RNA_types.hh:397
@ FUNC_USE_REPORTS
Definition RNA_types.hh:680
@ PROP_NEVER_NULL
Definition RNA_types.hh:266
#define NC_ANIMATION
Definition WM_types.hh:355
#define NA_EDITED
Definition WM_types.hh:550
#define ND_KEYFRAME
Definition WM_types.hh:461
void RNA_api_action(StructRNA *srna)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void WM_main_add_notifier(uint type, void *reference)