Fix quicktime export being broken in various ways: callback was missing
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 13 Feb 2012 20:47:29 +0000 (20:47 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 13 Feb 2012 20:47:29 +0000 (20:47 +0000)
parameter, codec RNA wrapping was wrong, and there was a python script error.

source/blender/editors/object/object_edit.c
source/blender/makesrna/intern/rna_scene.c
source/blender/quicktime/apple/qtkit_export.m
source/blender/quicktime/apple/quicktime_export.c
source/blender/quicktime/quicktime_export.h

index 2dc170a..1286ac8 100644 (file)
@@ -1516,7 +1516,7 @@ void OBJECT_OT_game_property_new(wmOperatorType *ot)
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
-       RNA_def_enum(ot->srna, "type", gameproperty_type_items, 2, "Type", "Type of game property to add");
+       RNA_def_enum(ot->srna, "type", gameproperty_type_items, GPROP_FLOAT, "Type", "Type of game property to add");
        RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the game property to add");
 }
 
index 1060c1b..f797368 100644 (file)
@@ -821,16 +821,16 @@ static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
 #ifdef WITH_QUICKTIME
 static int rna_RenderSettings_qtcodecsettings_codecType_get(PointerRNA *ptr)
 {
-       RenderData *rd= (RenderData*)ptr->data;
+       QuicktimeCodecSettings *settings = (QuicktimeCodecSettings*)ptr->data;
        
-       return quicktime_rnatmpvalue_from_videocodectype(rd->qtcodecsettings.codecType);
+       return quicktime_rnatmpvalue_from_videocodectype(settings->codecType);
 }
 
 static void rna_RenderSettings_qtcodecsettings_codecType_set(PointerRNA *ptr, int value)
 {
-       RenderData *rd= (RenderData*)ptr->data;
+       QuicktimeCodecSettings *settings = (QuicktimeCodecSettings*)ptr->data;
 
-       rd->qtcodecsettings.codecType = quicktime_videocodecType_from_rnatmpvalue(value);
+       settings->codecType = quicktime_videocodecType_from_rnatmpvalue(value);
 }
 
 static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bContext *C, PointerRNA *ptr,
@@ -863,16 +863,16 @@ static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bCon
 #ifdef USE_QTKIT
 static int rna_RenderSettings_qtcodecsettings_audiocodecType_get(PointerRNA *ptr)
 {
-       RenderData *rd= (RenderData*)ptr->data;
+       QuicktimeCodecSettings *settings = (QuicktimeCodecSettings*)ptr->data;
        
-       return quicktime_rnatmpvalue_from_audiocodectype(rd->qtcodecsettings.audiocodecType);
+       return quicktime_rnatmpvalue_from_audiocodectype(settings->audiocodecType);
 }
 
 static void rna_RenderSettings_qtcodecsettings_audiocodecType_set(PointerRNA *ptr, int value)
 {
-       RenderData *rd= (RenderData*)ptr->data;
+       QuicktimeCodecSettings *settings = (QuicktimeCodecSettings*)ptr->data;
        
-       rd->qtcodecsettings.audiocodecType = quicktime_audiocodecType_from_rnatmpvalue(value);
+       settings->audiocodecType = quicktime_audiocodecType_from_rnatmpvalue(value);
 }
 
 static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf(bContext *C, PointerRNA *ptr,
index 045ef97..f709572 100644 (file)
@@ -595,8 +595,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
        return success;
 }
 
-
-int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty, ReportList *reports)
+int append_qt(struct RenderData *rd, int start_frame, int frame, int *pixels, int rectx, int recty, ReportList *reports)
 {
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        NSBitmapImageRep *blBitmapFormatImage;
@@ -604,14 +603,12 @@ int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int rect
        OSStatus err = noErr;
        unsigned char *from_Ptr,*to_Ptr;
        int y,from_i,to_i;
-       BOOL alpha = (rd->im_format.planes == R_IMF_PLANES_RGBA)? YES: NO;
-       
        
        /* Create bitmap image rep in blender format (32bit RGBA) */
        blBitmapFormatImage = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
                                                                                                                                  pixelsWide:rectx 
                                                                                                                                  pixelsHigh:recty
-                                                                                                                          bitsPerSample:8 samplesPerPixel:4 hasAlpha:alpha isPlanar:NO
+                                                                                                                          bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO
                                                                                                                          colorSpaceName:NSCalibratedRGBColorSpace 
                                                                                                                                bitmapFormat:NSAlphaNonpremultipliedBitmapFormat
                                                                                                                                 bytesPerRow:rectx*4
index 101fcc0..71cf875 100644 (file)
@@ -604,7 +604,7 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
 }
 
 
-int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty, ReportList *reports)
+int append_qt(struct RenderData *rd, int start_frame, int frame, int *pixels, int rectx, int recty, ReportList *reports)
 {
        QT_DoAddVideoSamplesToMedia(frame, pixels, rectx, recty, reports);
        return 1;
index 71827b1..deaacb0 100644 (file)
@@ -57,7 +57,7 @@ struct Scene;
 struct wmOperatorType;
 
 int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports);    //for movie handle (BKE writeavi.c now)
-int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty, struct ReportList *reports);
+int append_qt(struct RenderData *rd, int start_frame, int frame, int *pixels, int rectx, int recty, struct ReportList *reports);
 void end_qt(void);
 void filepath_qt(char *string, struct RenderData *rd);