Blender  V3.3
rna_action_api.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2009 Blender Foundation. All rights reserved. */
3 
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <string.h>
11 #include <time.h>
12 
13 #include "BLI_utildefines.h"
14 
15 #include "RNA_define.h"
16 
17 #include "DNA_action_types.h"
18 
19 #include "rna_internal.h" /* own include */
20 
21 #ifdef RNA_RUNTIME
22 
23 # include "BKE_action.h"
24 
25 # include "DNA_anim_types.h"
26 # include "DNA_curve_types.h"
27 
28 static 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 #else
41 
43 {
44  FunctionRNA *func;
45  PropertyRNA *parm;
46 
47  func = RNA_def_function(srna, "flip_with_pose", "rna_Action_flip_with_pose");
48  RNA_def_function_ui_description(func, "Flip the action around the X axis using a pose");
50 
51  parm = RNA_def_pointer(
52  func, "object", "Object", "", "The reference armature object to use when flipping");
54 }
55 
56 #endif
Blender kernel action and pose functionality.
void BKE_action_flip_with_pose(struct bAction *act, struct Object *ob_arm)
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition: report.c:83
@ OB_ARMATURE
@ PARM_REQUIRED
Definition: RNA_types.h:352
@ FUNC_USE_REPORTS
Definition: RNA_types.h:663
@ PROP_NEVER_NULL
Definition: RNA_types.h:239
#define NC_ANIMATION
Definition: WM_types.h:338
#define NA_EDITED
Definition: WM_types.h:523
#define ND_KEYFRAME
Definition: WM_types.h:442
void RNA_api_action(StructRNA *srna)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4170
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
Definition: rna_define.c:4273
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
Definition: rna_define.c:4347
void RNA_def_function_flag(FunctionRNA *func, int flag)
Definition: rna_define.c:4342
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1518
void WM_main_add_notifier(unsigned int type, void *reference)