From ff7940640433d65ef3fc9e4662ffc8a171b4a07b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 12 Sep 2017 11:27:22 +0500 Subject: Fix T52653: Render output of linked scenes conflicts with other scenes with the same name The issue was caused by render result identifier only consist of scene name, which could indeed cause conflicts. On the one hand, there are quite some areas in Blender where we need identifier to be unique to properly address things. Usually this is required for sub-data of IDs, like bones. On another hand, it's not that hard to support this particular case and avoid possible frustration. The idea is, we add library name to render identifier for linked scenes. We use library name and not pointer so we preserve render results through undo stack. Reviewers: campbellbarton, mont29, brecht Reviewed By: mont29 Differential Revision: https://developer.blender.org/D2836 --- source/blenderplayer/bad_level_call_stubs/stubs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blenderplayer/bad_level_call_stubs/stubs.c') diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c index 8bc3f709551..6afb6c103e0 100644 --- a/source/blenderplayer/bad_level_call_stubs/stubs.c +++ b/source/blenderplayer/bad_level_call_stubs/stubs.c @@ -271,6 +271,7 @@ void RE_sample_material_color( int tri_index, struct DerivedMesh *orcoDm, struct Object *ob) RET_NONE /* nodes */ struct Render *RE_GetRender(const char *name) RET_NULL +struct Render *RE_GetSceneRender(const struct Scene *scene) RET_NULL struct Object *RE_GetCamera(struct Render *re) RET_NULL float RE_lamp_get_data(struct ShadeInput *shi, struct Object *lamp_obj, float col[4], float lv[3], float *dist, float shadow[4]) RET_ZERO const float (*RE_object_instance_get_matrix(struct ObjectInstanceRen *obi, int matrix_id))[4] RET_NULL @@ -296,6 +297,7 @@ float texture_value_blend(float tex, float out, float fact, float facg, int blen void texture_rgb_blend(float in[3], const float tex[3], const float out[3], float fact, float facg, int blendtype) RET_NONE double elbeemEstimateMemreq(int res, float sx, float sy, float sz, int refine, char *retstr) RET_ZERO struct Render *RE_NewRender(const char *name) RET_NULL +struct Render *RE_NewSceneRender(const struct Scene *scene) RET_NULL void RE_SwapResult(struct Render *re, struct RenderResult **rr) RET_NONE void RE_BlenderFrame(struct Render *re, struct Main *bmain, struct Scene *scene, struct SceneRenderLayer *srl, struct Object *camera_override, unsigned int lay_override, int frame, const bool write_still) RET_NONE bool RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, const char imtype, float layout[12]) RET_ZERO -- cgit v1.2.3