[Bf-blender-cvs] [8a6c575] temp-sybren-poselib: PoseLIb preview: add a 'preview frame index' member to markers.
Bastien Montagne
noreply at git.blender.org
Tue Nov 1 17:24:09 CET 2016
Commit: 8a6c575c8be79b9c2fc918c764a40ac90b66917c
Author: Bastien Montagne
Date: Tue Nov 1 16:16:44 2016 +0100
Branches: temp-sybren-poselib
https://developer.blender.org/rB8a6c575c8be79b9c2fc918c764a40ac90b66917c
PoseLIb preview: add a 'preview frame index' member to markers.
That way we don't have to move preview images around when reordering
markers (aka poses)!
===================================================================
M source/blender/makesdna/DNA_scene_types.h
M source/blender/makesrna/intern/rna_timeline.c
===================================================================
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 9b0781e..94e38ab 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -985,11 +985,12 @@ typedef enum StereoViews {
/* *************************************************************** */
/* Markers */
-typedef struct TimeMarker {
+typedef struct TimeMarker {
struct TimeMarker *next, *prev;
int frame;
char name[64];
- unsigned int flag;
+ unsigned short flag;
+ unsigned short preview_frame_index;
struct Object *camera;
} TimeMarker;
diff --git a/source/blender/makesrna/intern/rna_timeline.c b/source/blender/makesrna/intern/rna_timeline.c
index 2c51e41..c1c39cf 100644
--- a/source/blender/makesrna/intern/rna_timeline.c
+++ b/source/blender/makesrna/intern/rna_timeline.c
@@ -70,6 +70,12 @@ static void rna_def_timeline_marker(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Select", "Marker selection state");
RNA_def_property_update(prop, 0, "rna_TimelineMarker_update");
+ prop = RNA_def_property(srna, "preview_frame_index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_range(prop, 0, USHRT_MAX);
+ RNA_def_property_ui_text(prop, "Preview Frame",
+ "The frame index in the Action/Scene data-block previews matching that marker");
+ RNA_def_property_update(prop, 0, "rna_TimelineMarker_update");
+
#ifdef DURIAN_CAMERA_SWITCH
prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Object");
More information about the Bf-blender-cvs
mailing list