~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/makesrna/intern/rna_movieclip.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
static void rna_MovieClip_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
54
54
{
55
 
        MovieClip *clip = (MovieClip*)ptr->id.data;
 
55
        MovieClip *clip = (MovieClip *)ptr->id.data;
56
56
 
57
57
        BKE_movieclip_reload(clip);
58
58
        DAG_id_tag_update(&clip->id, 0);
60
60
 
61
61
static void rna_MovieClip_size_get(PointerRNA *ptr, int *values)
62
62
{
63
 
        MovieClip *clip = (MovieClip*)ptr->id.data;
 
63
        MovieClip *clip = (MovieClip *)ptr->id.data;
64
64
 
65
65
        values[0] = clip->lastsize[0];
66
66
        values[1] = clip->lastsize[1];
82
82
                                                        "written by recording device"},
83
83
                {IMB_TC_RECORD_RUN_NO_GAPS, "FREE_RUN_NO_GAPS", 0, "Free Run No Gaps",
84
84
                                            "Record run, but ignore timecode, changes in framerate or dropouts"},
85
 
                {0, NULL, 0, NULL, NULL}};
 
85
                {0, NULL, 0, NULL, NULL}
 
86
        };
86
87
 
87
88
        srna = RNA_def_struct(brna, "MovieClipProxy", NULL);
88
89
        RNA_def_struct_ui_text(srna, "Movie Clip Proxy", "Proxy parameters for a movie clip");
158
159
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
159
160
        RNA_def_property_enum_items(prop, clip_tc_items);
160
161
        RNA_def_property_ui_text(prop, "Timecode", "");
161
 
        RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 
162
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
162
163
 
163
164
        /* directory */
164
165
        prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
165
166
        RNA_def_property_string_sdna(prop, NULL, "dir");
166
167
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
167
168
        RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
168
 
        RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_MovieClip_reload_update");
 
169
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_MovieClip_reload_update");
169
170
}
170
171
 
171
172
static void rna_def_moviecliUser(BlenderRNA *brna)
179
180
                {MCLIP_PROXY_RENDER_SIZE_75, "PROXY_75", 0, "Proxy size 75%", ""},
180
181
                {MCLIP_PROXY_RENDER_SIZE_100, "PROXY_100", 0, "Proxy size 100%", ""},
181
182
                {MCLIP_PROXY_RENDER_SIZE_FULL, "FULL", 0, "No proxy, full render", ""},
182
 
                {0, NULL, 0, NULL, NULL}};
 
183
                {0, NULL, 0, NULL, NULL}
 
184
        };
183
185
 
184
186
        srna = RNA_def_struct(brna, "MovieClipUser", NULL);
185
187
        RNA_def_struct_ui_text(srna, "Movie Clip User",
186
188
                               "Parameters defining how a MovieClip datablock is used by another datablock");
187
189
 
188
 
        prop = RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME);
189
 
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 
190
        prop = RNA_def_property(srna, "frame_current", PROP_INT, PROP_TIME);
190
191
        RNA_def_property_int_sdna(prop, NULL, "framenr");
191
192
        RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
192
193
        RNA_def_property_ui_text(prop, "Current Frame", "Current frame number in movie or image sequence");
197
198
        RNA_def_property_enum_items(prop, clip_render_size_items);
198
199
        RNA_def_property_ui_text(prop, "Proxy render size",
199
200
                                 "Draw preview using full resolution or different proxy resolutions");
200
 
        RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 
201
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
201
202
 
202
203
        /* render undistorted */
203
204
        prop = RNA_def_property(srna, "use_render_undistorted", PROP_BOOLEAN, PROP_NONE);
204
205
        RNA_def_property_boolean_sdna(prop, NULL, "render_flag", MCLIP_PROXY_RENDER_UNDISTORT);
205
206
        RNA_def_property_ui_text(prop, "Render Undistorted", "Render preview using undistorted proxy");
206
 
        RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 
207
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
207
208
}
208
209
 
209
210
static void rna_def_movieClipScopes(BlenderRNA *brna)
223
224
        static EnumPropertyItem clip_source_items[] = {
224
225
                {MCLIP_SRC_SEQUENCE, "SEQUENCE", 0, "Image Sequence", "Multiple image files, as a sequence"},
225
226
                {MCLIP_SRC_MOVIE, "MOVIE", 0, "Movie File", "Movie file"},
226
 
                {0, NULL, 0, NULL, NULL}};
 
227
                {0, NULL, 0, NULL, NULL}
 
228
        };
227
229
 
228
230
        srna = RNA_def_struct(brna, "MovieClip", "ID");
229
231
        RNA_def_struct_ui_text(srna, "MovieClip", "MovieClip datablock referencing an external movie file");
232
234
        prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
233
235
        RNA_def_property_string_sdna(prop, NULL, "name");
234
236
        RNA_def_property_ui_text(prop, "File Path", "Filename of the movie or sequence file");
235
 
        RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_MovieClip_reload_update");
 
237
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_MovieClip_reload_update");
236
238
 
237
239
        prop = RNA_def_property(srna, "tracking", PROP_POINTER, PROP_NONE);
238
240
        RNA_def_property_struct_type(prop, "MovieTracking");
246
248
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
247
249
        RNA_def_property_ui_text(prop, "Use Proxy / Timecode",
248
250
                                 "Use a preview proxy and/or timecode index for this clip");
249
 
        RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 
251
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
250
252
 
251
 
        prop = RNA_def_int_vector(srna, "size" , 2 , NULL , 0, 0, "Size",
252
 
                                  "Width and height in pixels, zero when image data cant be loaded" , 0 , 0);
253
 
        RNA_def_property_int_funcs(prop, "rna_MovieClip_size_get" , NULL, NULL);
 
253
        prop = RNA_def_int_vector(srna, "size", 2, NULL, 0, 0, "Size",
 
254
                                  "Width and height in pixels, zero when image data cant be loaded", 0, 0);
 
255
        RNA_def_property_int_funcs(prop, "rna_MovieClip_size_get", NULL, NULL);
254
256
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
255
257
 
256
258
        prop = RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ);
259
261
        RNA_def_property_range(prop, 0.1f, 5000.0f);
260
262
        RNA_def_property_ui_range(prop, 0.1f, 5000.0f, 1, 2);
261
263
        RNA_def_property_ui_text(prop, "Display Aspect", "Display Aspect for this clip, does not affect rendering");
262
 
        RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 
264
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
263
265
 
264
266
        /* source */
265
267
        prop = RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
273
275
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
274
276
        RNA_def_property_ui_text(prop, "Proxy Custom Directory",
275
277
                                 "Create proxy images in a custom directory (default is movie location)");
276
 
        RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_MovieClip_reload_update");
 
278
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_MovieClip_reload_update");
277
279
 
278
280
        /* grease pencil */
279
281
        prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
281
283
        RNA_def_property_flag(prop, PROP_EDITABLE);
282
284
        RNA_def_property_struct_type(prop, "GreasePencil");
283
285
        RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this movie clip");
 
286
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
 
287
 
 
288
        /* start_frame */
 
289
        prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE);
 
290
        RNA_def_property_int_sdna(prop, NULL, "start_frame");
 
291
        RNA_def_property_ui_text(prop, "Start Frame", "Global scene frame number at which this movie starts playing "
 
292
                                 "(affects all data associated with a clip)");
 
293
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_MovieClip_reload_update");
 
294
 
 
295
        /* frame_offset */
 
296
        prop = RNA_def_property(srna, "frame_offset", PROP_INT, PROP_NONE);
 
297
        RNA_def_property_int_sdna(prop, NULL, "frame_offset");
 
298
        RNA_def_property_ui_text(prop, "Frame Offset", "Offset of footage first frame relative to it's file name "
 
299
                                 "(affects only how footage is loading, does not change data associated with a clip)");
 
300
        RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_MovieClip_reload_update");
 
301
 
 
302
        /* length */
 
303
        prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_NONE);
 
304
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 
305
        RNA_def_property_int_sdna(prop, NULL, "len");
 
306
        RNA_def_property_ui_text(prop, "Duration", "Detected duration of movie clip in frames");
 
307
 
 
308
        /* color management */
 
309
        prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
 
310
        RNA_def_property_pointer_sdna(prop, NULL, "colorspace_settings");
 
311
        RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings");
 
312
        RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings");
284
313
}
285
314
 
286
315
void RNA_def_movieclip(BlenderRNA *brna)