Blender V5.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
8
9#include <cstdlib>
10#include <cstring>
11#include <ctime>
12
13#include "RNA_define.hh"
14
15#include "rna_internal.hh" /* own include */
16
17#ifdef RNA_RUNTIME
18
19# include "BKE_action.hh"
20# include "BKE_report.hh"
21
22# include "DNA_object_types.h"
23
24# include "WM_api.hh"
25
26namespace blender {
27
28static void rna_Action_flip_with_pose(bAction *act, ReportList *reports, Object *ob)
29{
30 if (ob->type != OB_ARMATURE) {
31 BKE_report(reports, RPT_ERROR, "Only armature objects are supported");
32 return;
33 }
35
36 /* Only for redraw. */
38}
39
40} // namespace blender
41
42#else
43
44namespace blender {
45
47{
48 FunctionRNA *func;
49 PropertyRNA *parm;
50
51 func = RNA_def_function(srna, "flip_with_pose", "rna_Action_flip_with_pose");
52 RNA_def_function_ui_description(func, "Flip the action around the X axis using a pose");
54
55 parm = RNA_def_pointer(
56 func, "object", "Object", "", "The reference armature object to use when flipping");
58}
59
60} // namespace blender
61
62#endif
Blender kernel action and pose functionality.
Object is a sort of wrapper for general info.
#define NC_ANIMATION
Definition WM_types.hh:401
#define NA_EDITED
Definition WM_types.hh:634
#define ND_KEYFRAME
Definition WM_types.hh:537
BMesh Iterators.
void WM_main_add_notifier(uint type, void *reference)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
@ FUNC_USE_REPORTS
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void void void void void BKE_action_flip_with_pose(bAction *act, Span< Object * > objects) ATTR_NONNULL(1)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition report.cc:162
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier_c_str, const char *call)
void RNA_def_function_flag(FunctionRNA *func, FunctionFlag flag)
void RNA_api_action(StructRNA *srna)
@ PROP_NEVER_NULL
Definition RNA_types.hh:447
@ PARM_REQUIRED
Definition RNA_types.hh:631
const NodeType * type
Definition graph/node.h:179