#include "BKE_mesh.h"
#include "BKE_sound.h"
#include "BKE_screen.h"
+#include "BKE_animsys.h"
#include "BLI_threads.h"
#include "BLI_editVert.h"
MEM_freeN(marker);
}
+static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports,
+ char name[], int absolute, int insertkey_needed, int insertkey_visual)
+{
+ KeyingSet *ks= NULL;
+ short flag=0, keyingflag=0;
+
+ /* validate flags */
+ if (absolute)
+ flag |= KEYINGSET_ABSOLUTE;
+ if (insertkey_needed)
+ keyingflag |= INSERTKEY_NEEDED;
+ if (insertkey_visual)
+ keyingflag |= INSERTKEY_MATRIX;
+
+ /* call the API func, and set the active keyingset index */
+ ks= BKE_keyingset_add(&sce->keyingsets, name, flag, keyingflag);
+
+ if (ks) {
+ sce->active_keyingset= BLI_countlist(&sce->keyingsets);
+ return ks;
+ }
+ else {
+ BKE_report(reports, RPT_ERROR, "Keying Set could not be added.");
+ return NULL;
+ }
+}
+
#else
static void rna_def_transform_orientation(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
-// FunctionRNA *func;
-// PropertyRNA *parm;
+ FunctionRNA *func;
+ PropertyRNA *parm;
RNA_def_property_srna(cprop, "KeyingSets");
srna= RNA_def_struct(brna, "KeyingSets", NULL);
RNA_def_struct_sdna(srna, "Scene");
RNA_def_struct_ui_text(srna, "Keying Sets", "Scene keying sets");
- /*
- func= RNA_def_function(srna, "new", "rna_Curve_spline_new");
- RNA_def_function_ui_description(func, "Add a new spline to the curve.");
- parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline.");
- RNA_def_function_return(func, parm);
-
- func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
- RNA_def_function_ui_description(func, "Remove a spline from a curve.");
+ /* Add Keying Set */
+ func= RNA_def_function(srna, "new", "rna_Scene_keying_set_new");
+ RNA_def_function_ui_description(func, "Add a new Keying Set to Scene.");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove.");
- RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- */
+ /* returns the new KeyingSet */
+ parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set.");
+ RNA_def_function_return(func, parm);
+ /* name */
+ RNA_def_string(func, "name", "KeyingSet", 64, "Name", "Name of Keying Set");
+ /* flags */
+ RNA_def_boolean(func, "absolute", 1, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)");
+ /* keying flags */
+ RNA_def_boolean(func, "insertkey_needed", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves.");
+ RNA_def_boolean(func, "insertkey_visual", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'.");
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "KeyingSet");
scene_update_tagged(G.main, scene);
}
-static KeyingSet *rna_Scene_add_keying_set(Scene *sce, ReportList *reports,
- char name[], int absolute, int insertkey_needed, int insertkey_visual)
-{
- KeyingSet *ks= NULL;
- short flag=0, keyingflag=0;
-
- /* validate flags */
- if (absolute)
- flag |= KEYINGSET_ABSOLUTE;
- if (insertkey_needed)
- keyingflag |= INSERTKEY_NEEDED;
- if (insertkey_visual)
- keyingflag |= INSERTKEY_MATRIX;
-
- /* call the API func, and set the active keyingset index */
- ks= BKE_keyingset_add(&sce->keyingsets, name, flag, keyingflag);
-
- if (ks) {
- sce->active_keyingset= BLI_countlist(&sce->keyingsets);
- return ks;
- }
- else {
- BKE_report(reports, RPT_ERROR, "Keying Set could not be added.");
- return NULL;
- }
-}
-
static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name)
{
if(BKE_imtype_is_movie(rd->imtype))
func= RNA_def_function(srna, "update", "rna_Scene_update_tagged");
RNA_def_function_ui_description(func, "Update data tagged to be updated from previous access to data or operators.");
-
- /* Add Keying Set */
- func= RNA_def_function(srna, "add_keying_set", "rna_Scene_add_keying_set");
- RNA_def_function_ui_description(func, "Add a new Keying Set to Scene.");
- RNA_def_function_flag(func, FUNC_USE_REPORTS);
- /* returns the new KeyingSet */
- parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set.");
- RNA_def_function_return(func, parm);
- /* name */
- RNA_def_string(func, "name", "KeyingSet", 64, "Name", "Name of Keying Set");
- /* flags */
- RNA_def_boolean(func, "absolute", 1, "Absolute", "Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)");
- /* keying flags */
- RNA_def_boolean(func, "use_insertkey_needed", 0, "Insert Keyframes - Only Needed", "Only insert keyframes where they're needed in the relevant F-Curves.");
- RNA_def_boolean(func, "use_insertkey_visual", 0, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'.");
}
void RNA_api_scene_render(StructRNA *srna)