Blender V5.0
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
26static void rna_Action_flip_with_pose(bAction *act, ReportList *reports, Object *ob)
27{
28 if (ob->type != OB_ARMATURE) {
29 BKE_report(reports, RPT_ERROR, "Only armature objects are supported");
30 return;
31 }
33
34 /* Only for redraw. */
36}
37
38#else
39
41{
42 FunctionRNA *func;
43 PropertyRNA *parm;
44
45 func = RNA_def_function(srna, "flip_with_pose", "rna_Action_flip_with_pose");
46 RNA_def_function_ui_description(func, "Flip the action around the X axis using a pose");
48
49 parm = RNA_def_pointer(
50 func, "object", "Object", "", "The reference armature object to use when flipping");
52}
53
54#endif
Blender kernel action and pose functionality.
void void void void void BKE_action_flip_with_pose(bAction *act, blender::Span< Object * > objects) ATTR_NONNULL(1)
@ RPT_ERROR
Definition BKE_report.hh:39
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition report.cc:153
Object is a sort of wrapper for general info.
@ OB_ARMATURE
@ PARM_REQUIRED
Definition RNA_types.hh:545
@ FUNC_USE_REPORTS
Definition RNA_types.hh:914
@ PROP_NEVER_NULL
Definition RNA_types.hh:377
#define NC_ANIMATION
Definition WM_types.hh:388
#define NA_EDITED
Definition WM_types.hh:584
#define ND_KEYFRAME
Definition WM_types.hh:494
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)