Blender  V2.59
rna_timeline.c
Go to the documentation of this file.
00001 /*
00002  * $Id: rna_timeline.c 35238 2011-02-27 20:20:01Z jesterking $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * Contributor(s): Blender Foundation (2008), Roland Hess
00021  *
00022  * ***** END GPL LICENSE BLOCK *****
00023  */
00024 
00030 #include <stdlib.h>
00031 
00032 #include "RNA_define.h"
00033 
00034 #include "rna_internal.h"
00035 
00036 #include "DNA_scene_types.h"
00037 
00038 #include "WM_types.h"
00039 
00040 #ifdef RNA_RUNTIME
00041 
00042 #else
00043 
00044 static void rna_def_timeline_marker(BlenderRNA *brna)
00045 {
00046         StructRNA *srna;
00047         PropertyRNA *prop;
00048 
00049         srna= RNA_def_struct(brna, "TimelineMarker", NULL);
00050         RNA_def_struct_sdna(srna, "TimeMarker");
00051         RNA_def_struct_ui_text(srna, "Marker", "Marker for noting points in the timeline");
00052 
00053         /* String values */
00054         prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
00055         RNA_def_property_ui_text(prop, "Name", "");
00056         RNA_def_struct_name_property(srna, prop);
00057         RNA_def_property_update(prop, NC_ANIMATION, NULL);
00058 
00059         prop= RNA_def_property(srna, "frame", PROP_INT, PROP_TIME);
00060         RNA_def_property_ui_text(prop, "Frame", "The frame on which the timeline marker appears");
00061         RNA_def_property_update(prop, NC_ANIMATION, NULL);
00062 
00063         prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
00064         RNA_def_property_boolean_sdna(prop, NULL, "flag", 1 /*SELECT*/);
00065         RNA_def_property_ui_text(prop, "Select", "Marker selection state");
00066         RNA_def_property_update(prop, NC_ANIMATION, NULL);
00067 
00068 #ifdef DURIAN_CAMERA_SWITCH
00069         prop= RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
00070         RNA_def_property_struct_type(prop, "Object");
00071         RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
00072         RNA_def_property_ui_text(prop, "Camera", "Camera this timeline sets to active");
00073 #endif
00074 }
00075 
00076 void RNA_def_timeline_marker(BlenderRNA *brna)
00077 {
00078         rna_def_timeline_marker(brna);
00079 }
00080 
00081 
00082 #endif