Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-01-16 21:07:25 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-01-16 21:07:25 +0400
commitb01233b07fbf06ba5139d4565c6148f65ab921e9 (patch)
treeb7ffc32198307c1364f41b8f0368026a16af88ed /source/blender/makesrna/intern/rna_image.c
parentf55a9eb3d4e12e5667e16b9f4dd2c2ec88a792f6 (diff)
Movies support for Cycles
This adds support of movie textures for Cycles rendering. Uses the same builtin images routines as packed/generated images, but with some extra non-rna hookups from blender_session side. Basically, it's not so clear how to give access to video frames via C++ RNA -- it'll require exposing ImBuf to API, doing some threading locks and so. Ended up adding two more functions which are actually bad level call, but don't consider it's so much bad -- we have few bad calls already, which are actually related. Changed a bit how builtin images names are passing to image manager. Now it's not just an ID datablock name, but also a frame number concatenated via '@' character, which makes itpossible to easily know frame number to be used for movie images, without adding extra descriptors to image manager. Decoding of builtin name is a bit slower now, but it should be still nothing in comparison with rendering complexity. Also exposed image user's frame_current to python API, which is needed to get absolute frame number of movie from node's image user. P.S. Generated/packed images are also using bad level call but only does it to make things more clear here. Either all images are using C++ RNA here or no images does. That's the most clear for now.
Diffstat (limited to 'source/blender/makesrna/intern/rna_image.c')
-rw-r--r--source/blender/makesrna/intern/rna_image.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 81dbfff13b2..180a5a180fd 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -427,6 +427,11 @@ static void rna_def_imageuser(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_ImageUser_update");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ prop = RNA_def_property(srna, "frame_current", PROP_INT, PROP_TIME);
+ RNA_def_property_int_sdna(prop, NULL, "framenr");
+ RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
+ RNA_def_property_ui_text(prop, "Current Frame", "Current frame number in image sequence or movie");
+
/* animation */
prop = RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "cycl", 0);