LEFT | RIGHT |
1 /* | 1 /* |
2 * $Id$ | |
3 * | |
4 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
5 * | 3 * |
6 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
8 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
9 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
10 * | 8 * |
11 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 64 |
67 values[0]= clip->lastsize[0]; | 65 values[0]= clip->lastsize[0]; |
68 values[1]= clip->lastsize[1]; | 66 values[1]= clip->lastsize[1]; |
69 } | 67 } |
70 | 68 |
71 static void rna_MovieClip_resolution_get(PointerRNA *ptr, float *values) | 69 static void rna_MovieClip_resolution_get(PointerRNA *ptr, float *values) |
72 { | 70 { |
73 MovieClip *clip= (MovieClip*)ptr->id.data; | 71 MovieClip *clip= (MovieClip*)ptr->id.data; |
74 ImBuf *ibuf; | 72 ImBuf *ibuf; |
75 | 73 |
76 » ibuf= BKE_movieclip_acquire_ibuf(clip, NULL); | 74 » ibuf= BKE_movieclip_get_ibuf(clip, NULL); |
77 if (ibuf) { | 75 if (ibuf) { |
78 values[0]= ibuf->ppm[0]; | 76 values[0]= ibuf->ppm[0]; |
79 values[1]= ibuf->ppm[1]; | 77 values[1]= ibuf->ppm[1]; |
80 | 78 |
81 IMB_freeImBuf(ibuf); | 79 IMB_freeImBuf(ibuf); |
82 } | 80 } |
83 else { | 81 else { |
84 values[0]= 0; | 82 values[0]= 0; |
85 values[1]= 0; | 83 values[1]= 0; |
86 } | 84 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 RNA_def_property_ui_text(prop, "Timecode", ""); | 148 RNA_def_property_ui_text(prop, "Timecode", ""); |
151 RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); | 149 RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); |
152 | 150 |
153 /* directory */ | 151 /* directory */ |
154 prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH); | 152 prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH); |
155 RNA_def_property_string_sdna(prop, NULL, "dir"); | 153 RNA_def_property_string_sdna(prop, NULL, "dir"); |
156 RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy
files"); | 154 RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy
files"); |
157 RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_MovieClip_re
load_update"); | 155 RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_MovieClip_re
load_update"); |
158 } | 156 } |
159 | 157 |
160 static void rna_def_moviecliUuser(BlenderRNA *brna) | 158 static void rna_def_moviecliUser(BlenderRNA *brna) |
161 { | 159 { |
162 StructRNA *srna; | 160 StructRNA *srna; |
163 PropertyRNA *prop; | 161 PropertyRNA *prop; |
164 | 162 |
165 static EnumPropertyItem clip_render_size_items[] = { | 163 static EnumPropertyItem clip_render_size_items[] = { |
166 {MCLIP_PROXY_RENDER_SIZE_25, "PROXY_25", 0, "Proxy size 25%", ""
}, | 164 {MCLIP_PROXY_RENDER_SIZE_25, "PROXY_25", 0, "Proxy size 25%", ""
}, |
167 {MCLIP_PROXY_RENDER_SIZE_50, "PROXY_50", 0, "Proxy size 50%", ""
}, | 165 {MCLIP_PROXY_RENDER_SIZE_50, "PROXY_50", 0, "Proxy size 50%", ""
}, |
168 {MCLIP_PROXY_RENDER_SIZE_75, "PROXY_75", 0, "Proxy size 75%", ""
}, | 166 {MCLIP_PROXY_RENDER_SIZE_75, "PROXY_75", 0, "Proxy size 75%", ""
}, |
169 {MCLIP_PROXY_RENDER_SIZE_100, "PROXY_100", 0, "Proxy size 100%",
""}, | 167 {MCLIP_PROXY_RENDER_SIZE_100, "PROXY_100", 0, "Proxy size 100%",
""}, |
170 {MCLIP_PROXY_RENDER_SIZE_FULL, "FULL", 0, "No proxy, full render
", ""}, | 168 {MCLIP_PROXY_RENDER_SIZE_FULL, "FULL", 0, "No proxy, full render
", ""}, |
171 {0, NULL, 0, NULL, NULL}}; | 169 {0, NULL, 0, NULL, NULL}}; |
172 | 170 |
173 srna= RNA_def_struct(brna, "MovieClipUser", NULL); | 171 srna= RNA_def_struct(brna, "MovieClipUser", NULL); |
174 » RNA_def_struct_ui_text(srna, "Movie Clip User", "Parameters defining how
an MovieClip datablock is used by another datablock"); | 172 » RNA_def_struct_ui_text(srna, "Movie Clip User", "Parameters defining how
a MovieClip datablock is used by another datablock"); |
175 | 173 |
176 prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME); | 174 prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME); |
177 RNA_def_property_clear_flag(prop, PROP_EDITABLE); | 175 RNA_def_property_clear_flag(prop, PROP_EDITABLE); |
178 RNA_def_property_int_sdna(prop, NULL, "framenr"); | 176 RNA_def_property_int_sdna(prop, NULL, "framenr"); |
179 RNA_def_property_range(prop, MINAFRAME, MAXFRAME); | 177 RNA_def_property_range(prop, MINAFRAME, MAXFRAME); |
180 » RNA_def_property_ui_text(prop, "Current Frame", "Get frame number user i
s points to in clip"); | 178 » RNA_def_property_ui_text(prop, "Current Frame", "Current frame number in
movie or image sequence"); |
181 | 179 |
182 /* render size */ | 180 /* render size */ |
183 prop= RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE); | 181 prop= RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE); |
184 RNA_def_property_enum_sdna(prop, NULL, "render_size"); | 182 RNA_def_property_enum_sdna(prop, NULL, "render_size"); |
185 RNA_def_property_enum_items(prop, clip_render_size_items); | 183 RNA_def_property_enum_items(prop, clip_render_size_items); |
186 RNA_def_property_ui_text(prop, "Proxy render size", "Draw preview using
full resolution or different proxy resolutions"); | 184 RNA_def_property_ui_text(prop, "Proxy render size", "Draw preview using
full resolution or different proxy resolutions"); |
187 RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); | 185 RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); |
188 | 186 |
189 /* render undistorted */ | 187 /* render undistorted */ |
190 prop= RNA_def_property(srna, "use_render_undistorted", PROP_BOOLEAN, PRO
P_NONE); | 188 prop= RNA_def_property(srna, "use_render_undistorted", PROP_BOOLEAN, PRO
P_NONE); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 RNA_def_property_pointer_sdna(prop, NULL, "gpd"); | 264 RNA_def_property_pointer_sdna(prop, NULL, "gpd"); |
267 RNA_def_property_flag(prop, PROP_EDITABLE); | 265 RNA_def_property_flag(prop, PROP_EDITABLE); |
268 RNA_def_property_struct_type(prop, "GreasePencil"); | 266 RNA_def_property_struct_type(prop, "GreasePencil"); |
269 RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for
this movie clip"); | 267 RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for
this movie clip"); |
270 } | 268 } |
271 | 269 |
272 void RNA_def_movieclip(BlenderRNA *brna) | 270 void RNA_def_movieclip(BlenderRNA *brna) |
273 { | 271 { |
274 rna_def_movieclip(brna); | 272 rna_def_movieclip(brna); |
275 rna_def_movieclip_proxy(brna); | 273 rna_def_movieclip_proxy(brna); |
276 » rna_def_moviecliUuser(brna); | 274 » rna_def_moviecliUser(brna); |
277 rna_def_movieClipScopes(brna); | 275 rna_def_movieClipScopes(brna); |
278 } | 276 } |
279 | 277 |
280 #endif | 278 #endif |
LEFT | RIGHT |