UI: Bugfixes
authorJoshua Leung <aligorith@gmail.com>
Sat, 3 Oct 2009 11:23:31 +0000 (11:23 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sat, 3 Oct 2009 11:23:31 +0000 (11:23 +0000)
* #19529: Saving in edit mode causes problems in mode buttons when reopening
* Fixed compiler warning in writefile for mingw
* AnimData for Lamp data was not recognised by RNA

source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/makesrna/intern/rna_lamp.c

index b40c7e4..9367e2f 100644 (file)
@@ -3902,7 +3902,10 @@ static void direct_link_object(FileData *fd, Object *ob)
        
        /* weak weak... this was only meant as draw flag, now is used in give_base too */
        ob->flag &= ~OB_FROMGROUP;
-
+       
+       /* editmode doesn't get saved in files, so should get cleared when reloading... */
+       ob->mode &= ~OB_MODE_EDIT;
+       
        ob->disp.first=ob->disp.last= NULL;
        
        ob->adt= newdataadr(fd, ob->adt);
index 3bd8b24..1f46446 100644 (file)
@@ -1102,7 +1102,7 @@ static void write_pose(WriteData *wd, bPose *pose)
 
        /* write IK param */
        if (pose->ikparam) {
-               const char *structname = get_ikparam_name(pose);
+               char *structname = (char *)get_ikparam_name(pose);
                if (structname)
                        writestruct(wd, DATA, structname, 1, pose->ikparam);
        }
index 4315a11..06fecec 100644 (file)
@@ -377,7 +377,10 @@ static void rna_def_lamp(BlenderRNA *brna)
        RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", LA_NO_DIFF);
        RNA_def_property_ui_text(prop, "Diffuse", "Lamp does diffuse shading.");
        RNA_def_property_update(prop, 0, "rna_Lamp_update");
-
+       
+       /* common */
+       rna_def_animdata_common(srna);
+       
        /* textures */
        rna_def_mtex_common(srna, "rna_Lamp_mtex_begin", "rna_Lamp_active_texture_get",
                "rna_Lamp_active_texture_set", "LampTextureSlot", "rna_Lamp_update");