[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33939] trunk/blender/source/blender/ makesrna/intern/rna_scene.c: Bugfix #25404

Ton Roosendaal ton at blender.org
Wed Dec 29 19:21:57 CET 2010


Revision: 33939
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33939
Author:   ton
Date:     2010-12-29 19:21:57 +0100 (Wed, 29 Dec 2010)

Log Message:
-----------
Bugfix #25404

Frame Mapping (map old, map new) didn't set the the framelen
variable. Note that this feature is half-working, and on the
to. Might be removed/replaced with something better.

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	2010-12-29 15:06:15 UTC (rev 33938)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c	2010-12-29 18:21:57 UTC (rev 33939)
@@ -313,6 +313,12 @@
 	BKE_screen_view3d_main_sync(&bmain->screen, scene);
 }
 
+static void rna_Scene_framelen_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{	
+	scene->r.framelen= (float)scene->r.framapto/(float)scene->r.images;
+}
+
+
 static void rna_Scene_current_frame_set(PointerRNA *ptr, int value)
 {
 	Scene *data= (Scene*)ptr->data;
@@ -2401,14 +2407,14 @@
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
 	RNA_def_property_range(prop, 1, 900);
 	RNA_def_property_ui_text(prop, "Frame Map Old", "Specify old mapping value in frames");
-	RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+	RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_framelen_update");
 	
 	prop= RNA_def_property(srna, "frame_map_new", PROP_INT, PROP_NONE);
 	RNA_def_property_int_sdna(prop, NULL, "images");
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
 	RNA_def_property_range(prop, 1, 900);
 	RNA_def_property_ui_text(prop, "Frame Map New", "Specify how many frames the Map Old will last");
-	RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+	RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_framelen_update");
 
 	
 	prop= RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);





More information about the Bf-blender-cvs mailing list