Merge branch 'blender-v2.82-release'
This commit is contained in:
commit
38f3a85649
|
@ -9318,6 +9318,9 @@ static BHead *read_libblock(FileData *fd,
|
|||
ID *id;
|
||||
ListBase *lb;
|
||||
const char *allocname;
|
||||
|
||||
/* XXX Very weakly handled currently, see comment at the end of this function before trying to
|
||||
* use it for anything new. */
|
||||
bool wrong_id = false;
|
||||
|
||||
/* In undo case, most libs and linked data should be kept as is from previous state
|
||||
|
@ -9573,7 +9576,14 @@ static BHead *read_libblock(FileData *fd,
|
|||
oldnewmap_clear(fd->datamap);
|
||||
|
||||
if (wrong_id) {
|
||||
/* XXX This is probably working OK currently given the very limited scope of that flag.
|
||||
* However, it is absolutely **not** handled correctly: it is freeing an ID pointer that has
|
||||
* been added to the fd->libmap mapping, which in theory could lead to nice crashes...
|
||||
* This should be properly solved at some point. */
|
||||
BKE_id_free(main, id);
|
||||
if (r_id != NULL) {
|
||||
*r_id = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return (bhead);
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
#include "BKE_particle.h"
|
||||
#include "BKE_curveprofile.h"
|
||||
#include "BKE_report.h"
|
||||
#include "BKE_scene.h"
|
||||
#include "BKE_screen.h"
|
||||
#include "BKE_shader_fx.h"
|
||||
|
||||
|
@ -2845,8 +2846,13 @@ void uiTemplatePreview(uiLayout *layout,
|
|||
col = uiLayoutColumn(row, true);
|
||||
uiLayoutSetScaleX(col, 1.5);
|
||||
uiItemR(col, &material_ptr, "preview_render_type", UI_ITEM_R_EXPAND, "", ICON_NONE);
|
||||
uiItemS(col);
|
||||
uiItemR(col, &material_ptr, "use_preview_world", 0, "", ICON_WORLD);
|
||||
|
||||
/* EEVEE preview file has baked lighting so use_preview_world has no effect,
|
||||
* just hide the option until this feature is supported. */
|
||||
if (!BKE_scene_uses_blender_eevee(CTX_data_scene(C))) {
|
||||
uiItemS(col);
|
||||
uiItemR(col, &material_ptr, "use_preview_world", 0, "", ICON_WORLD);
|
||||
}
|
||||
}
|
||||
|
||||
if (pr_texture) {
|
||||
|
|
|
@ -329,10 +329,11 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *
|
|||
WM_main_add_notifier(NC_LINESTYLE, linestyle);
|
||||
break;
|
||||
}
|
||||
/* ColorRamp for particle display is owned by the object (see T54422) */
|
||||
case ID_OB:
|
||||
case ID_PA: {
|
||||
ParticleSettings *part = (ParticleSettings *)ptr->owner_id;
|
||||
|
||||
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
|
||||
WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, part);
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -1547,10 +1547,10 @@ void render_result_rect_get_pixels(RenderResult *rr,
|
|||
{
|
||||
RenderView *rv = RE_RenderViewGetById(rr, view_id);
|
||||
|
||||
if (rv->rect32) {
|
||||
if (rv && rv->rect32) {
|
||||
memcpy(rect, rv->rect32, sizeof(int) * rr->rectx * rr->recty);
|
||||
}
|
||||
else if (rv->rectf) {
|
||||
else if (rv && rv->rectf) {
|
||||
IMB_display_buffer_transform_apply((unsigned char *)rect,
|
||||
rv->rectf,
|
||||
rr->rectx,
|
||||
|
|
Loading…
Reference in New Issue