saving multires data didnt get the new filename when the external struct was alredy allocated (making save external fail)
This commit is contained in:
@@ -2487,9 +2487,9 @@ void CustomData_external_add(CustomData *data, ID *id, int type, int totelem, co
|
||||
|
||||
if(!external) {
|
||||
external= MEM_callocN(sizeof(CustomDataExternal), "CustomDataExternal");
|
||||
BLI_strncpy(external->filename, filename, sizeof(external->filename));
|
||||
data->external= external;
|
||||
}
|
||||
BLI_strncpy(external->filename, filename, sizeof(external->filename));
|
||||
|
||||
layer->flag |= CD_FLAG_EXTERNAL|CD_FLAG_IN_MEMORY;
|
||||
}
|
||||
|
||||
@@ -1021,8 +1021,8 @@ static int multires_save_external_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
RNA_string_get(op->ptr, "path", path);
|
||||
if(G.save_over)
|
||||
BLI_path_rel(path, G.sce);
|
||||
|
||||
/* BLI_path_rel(path, G.sce); */ /* TODO, relative path operator option */
|
||||
|
||||
CustomData_external_add(&me->fdata, &me->id, CD_MDISPS, me->totface, path);
|
||||
CustomData_external_write(&me->fdata, &me->id, CD_MASK_MESH, me->totface, 0);
|
||||
|
||||
Reference in New Issue
Block a user