UI: Bugfixes

* #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
This commit is contained in:
2009-10-03 11:23:31 +00:00
parent 2cbf21b582
commit 8204dffe8a
3 changed files with 9 additions and 3 deletions

View 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);

View 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);
}

View 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");