[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58392] trunk/blender/source/blender/ makesrna/intern/rna_scene.c: add rna attribute 'frame_current_final', without this you had to
Campbell Barton
ideasman42 at gmail.com
Fri Jul 19 12:41:09 CEST 2013
Revision: 58392
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58392
Author: campbellbarton
Date: 2013-07-19 10:41:09 +0000 (Fri, 19 Jul 2013)
Log Message:
-----------
add rna attribute 'frame_current_final', without this you had to
manually calcualte it with the subframe and time remapping vars.
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/rna_scene.c
Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c 2013-07-19 10:41:04 UTC (rev 58391)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c 2013-07-19 10:41:09 UTC (rev 58392)
@@ -525,6 +525,13 @@
data->r.cfra = value;
}
+static float rna_Scene_frame_current_final_get(PointerRNA *ptr)
+{
+ Scene *scene = (Scene *)ptr->data;
+
+ return BKE_scene_frame_get_from_ctime(scene, (float)scene->r.cfra);
+}
+
static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
{
Scene *data = (Scene *)ptr->data;
@@ -5149,6 +5156,13 @@
"Number of frames to skip forward while rendering/playing back each frame");
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
+ prop = RNA_def_property(srna, "frame_current_final", PROP_FLOAT, PROP_TIME);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
+ RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
+ RNA_def_property_float_funcs(prop, "rna_Scene_frame_current_final_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Current Frame Final",
+ "Current frame with subframe and time remapping applied");
+
/* Preview Range (frame-range for UI playback) */
prop = RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
More information about the Bf-blender-cvs
mailing list