1
1

Compare commits

...

34 Commits

Author SHA1 Message Date
f6cb5f5449 Version bump to 2.80 final release 2019-07-29 16:47:50 +02:00
1052c84ad2 Point submodules to their latest release branch 2019-07-29 16:47:50 +02:00
8e1516b7bc Linux: update appdata description 2019-07-29 16:02:08 +02:00
16bf0b47d3 Doxygen: update version number 2019-07-29 16:00:47 +02:00
9e24999451 Fix T67777: Linked rig crashes Blender 2.8 RC3 on File|New.
Sync back between proxy armature pose and linked one was not properly
clearing the posebone runtime data, ending up with shared memory between
both (direct cause of reported crash), and probably some other nasty
issues.

While this crash is not critical in itself, I would suggest to add this
fix to 2.80 branch, as it is super-safe and simple, and is probably
fixing some other un-reported issues?
2019-07-29 14:17:38 +02:00
507ffee6e1 Point submodules to their latest release branch 2019-07-24 16:22:06 +02:00
d40e2194ee Splash: show Release Candidate 3. 2019-07-24 16:20:36 +02:00
55ae37ba31 Bevel modifier: let it work on wire edges when vertex_only. 2019-07-24 16:18:44 +02:00
db15b23745 Fix T67117: Font thumbnails crash to desktop
We were missing a null pointer check for invalid fonts.
2019-07-24 16:17:53 +02:00
3c9a7d0652 CMake: Fix WITH_CODEC_SNDFILE detection
D5296 by @frispete
2019-07-24 16:17:53 +02:00
8194477c0d Fix T67191: Redo fails for 3D text operations 2019-07-24 16:17:53 +02:00
7f77f5f4a4 Fix assert in some cases when using DataTransfer modifier for custom normals.
Reported by @sybren on IRC, thanks.

Should be safe for 2.80.
2019-07-24 16:17:53 +02:00
50c5108f79 Fix T67196: bevel bad at a 3-edge bevel.
The test for whether or not this was a "pipe" neglected to use
fabsf() around a dot result.
2019-07-24 16:17:53 +02:00
b3f0501e31 GPencil: Fix showing wrong material in brush panel with pinning
The options of the material are from object material not pinned material.

If the brush is pinned, the material must be the brush material and not the object material.
2019-07-24 16:17:53 +02:00
21f17cc959 GPencil: Fix wrong material when apply Opacity, Hue or Tint modifier
When apply the modifier a new material is created, but it was assigned wrongly. The problem was the index was base 0 already, so subtract 1, got a wrong value.
2019-07-24 16:17:53 +02:00
4b8558e6f4 Fix T67033 EEVEE: Random Flickering Materials
This was a read after free error. This only fix the undefined behavior.
The result is still not correct in certain cases (see T67226).

We want to include this for 2.80
2019-07-24 16:17:53 +02:00
c11be0f736 Revert "Fix T67040: Undo crashes after renaming"
This reverts commit c635663e4a. This is causing
crashes with sculpt mode and object mode switching.

Fixes T67217.
2019-07-24 16:17:53 +02:00
ab5a1ebe3a Fix missing subversion bump for 2.80 release.
We need a final subversion bump before release in case there are
remaining 'unversioned' code in our versionning callbacks...

Should have been done before first RC actually. ;)

To be ported to 2.80 release branch.
2019-07-24 16:17:53 +02:00
73379fd974 Incompatible usage of the Collada transparency value
Some external tools seem to have issues with the definition
of Collada <transparency> - a float value in range (0,1).
However it is possible to use the <transparent> color as a container
for the <transparency> value. This seems to be a more reliable
method to export transparency values from Blender PBSDF Shaders.

The relevant documentation is in the collada 1.14 reference manual,
page 7-5 about the usage of transparent and transparency.

This fix makes export and import of the <transparency>
and <transparent> values more convenient and more reliable.

Reviewers: brecht, jesterking

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5305
2019-07-24 16:17:53 +02:00
33acb752b3 Fix T67040: Undo crashes after renaming
Correct fix that doesn't cause T67217.

Temporarily removing the excluded undo step broke memfile-undo
since freeing the undo steps needs to access other steps in
the list to merge shared chunks, see: memfile_undosys_step_free.

Pass the exclude step as an argument instead.
2019-07-24 16:17:53 +02:00
66b7fea576 Fix T67450: Crash undoing edit-mode lattice resolution 2019-07-24 16:17:53 +02:00
caaf12cdba Fix T67299: UV Stretching Overlay of type "Area" fail when any face is hidden
We want to include this for 2.80
2019-07-24 16:17:53 +02:00
c9f136fa2c Fix T65386 Eevee: Crash after baking indirect lights or cubemap
I'm not sure this fixes the root of the problem. The file from the ticket
seems to have been corrupted in some way.

We MIGHT want this in 2.80.
2019-07-24 16:17:53 +02:00
b5a6635f37 Fix T67334: Blender does not exit after saving 2019-07-24 16:17:52 +02:00
804f467a00 Fix T66768: Grid fill span not working 2019-07-24 16:17:52 +02:00
38d4483c6a Point submodules to their latest release branch 2019-07-18 16:52:45 +02:00
2b1fdd7e3d Splash: show Release Candidate 2. 2019-07-18 16:28:52 +02:00
786f5ccea2 Merge branch 'master' into blender-v2.80-release 2019-07-18 16:14:20 +02:00
93985e4517 Merge commit 'master' into blender-v2.80-release
Skip 105ae3b, this fix will be left out of the release.
2019-07-18 16:13:15 +02:00
3176328a88 Merge commit 'master' into blender-v2.80-release 2019-07-18 16:09:26 +02:00
06312c6d2d Merge branch 'master' into blender-v2.80-release 2019-07-11 15:50:43 +02:00
3fe0c32fae Merge branch 'master' into blender-v2.80-release 2019-07-10 17:13:52 +02:00
6a1eb0a241 Point submodules to their release branch 2019-07-10 17:10:30 +02:00
1456c8e2eb Switch to the Release Candidate stage 2019-07-10 17:09:19 +02:00
31 changed files with 132 additions and 120 deletions

View File

@@ -6,7 +6,7 @@
# LIBSNDFILE_LIBRARIES, libraries to link against to use SndFile.
# LIBSNDFILE_ROOT_DIR, The base directory to search for SndFile.
# This can also be an environment variable.
# LIBSNDFILE_FOUND, If false, do not try to use SndFile.
# SNDFILE_FOUND, If false, do not try to use SndFile.
#
# also defined, but not for general use are
# LIBSNDFILE_LIBRARY, where to find the SndFile library.
@@ -50,16 +50,16 @@ FIND_LIBRARY(LIBSNDFILE_LIBRARY
lib64 lib
)
# handle the QUIETLY and REQUIRED arguments and set LIBSNDFILE_FOUND to TRUE if
# handle the QUIETLY and REQUIRED arguments and set SNDFILE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
IF(LIBSNDFILE_FOUND)
IF(SNDFILE_FOUND)
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
ENDIF(LIBSNDFILE_FOUND)
ENDIF(SNDFILE_FOUND)
MARK_AS_ADVANCED(
LIBSNDFILE_INCLUDE_DIR

View File

@@ -156,7 +156,7 @@ endif()
# Codecs
if(WITH_CODEC_SNDFILE)
find_package_wrapper(SndFile)
if(NOT LIBSNDFILE_FOUND)
if(NOT SNDFILE_FOUND)
set(WITH_CODEC_SNDFILE OFF)
endif()
endif()

View File

@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = "V2.79"
PROJECT_NUMBER = "V2.80"
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

View File

@@ -10,15 +10,15 @@
<p>
Blender is the free and open source 3D creation suite. It supports
the entirety of the 3D pipeline — modeling, rigging, animation,
simulation, rendering, compositing and motion tracking, even video
editing and game creation.
simulation, rendering, compositing, motion tracking, and video
editing.
</p>
<p>
Advanced users can employ Blenders API for Python scripting to
customize the application and write specialized tools. Blender is
well suited to individuals and small studios who benefit from its
unified pipeline and responsive development process.
Blender is a public project, made by hundreds of people from around the
world; by studios and individual artists, professionals and hobbyists,
scientists, students, VFX experts, animators, game artists, modders, and
the list goes on.
</p>
</description>
<url type="homepage">https://www.blender.org</url>
@@ -40,7 +40,7 @@
</screenshot>
</screenshots>
<releases>
<release version="2.80" date="2019-07-18">
<release version="2.80" date="2019-07-30">
<description>
<p>New features:</p>
<ul>

View File

@@ -1781,7 +1781,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):
col.prop(gp_settings, "angle_factor", text="Factor", slider=True)
ob = context.object
if ob:
if ob and brush.gpencil_settings.use_material_pin is False:
ma = ob.active_material
elif brush.gpencil_settings.material:
ma = brush.gpencil_settings.material

View File

@@ -96,7 +96,7 @@ KerningCacheBLF *blf_kerning_cache_new(FontBLF *font)
.x = 0,
.y = 0,
};
if (g_prev && FT_Get_Kerning(font->face, g_prev->idx, g->idx, kc->mode, &delta) == 0) {
if (g && g_prev && FT_Get_Kerning(font->face, g_prev->idx, g->idx, kc->mode, &delta) == 0) {
kc->table[i][j] = (int)delta.x >> 6;
}
else {

View File

@@ -27,7 +27,7 @@
* \note Use #STRINGIFY() rather than defining with quotes.
*/
#define BLENDER_VERSION 280
#define BLENDER_SUBVERSION 74
#define BLENDER_SUBVERSION 75
/** Several breakages with 280, e.g. collections vs layers. */
#define BLENDER_MINVERSION 280
#define BLENDER_MINSUBVERSION 0
@@ -36,7 +36,7 @@
/** Can be left blank, otherwise a,b,c... etc with no quotes. */
#define BLENDER_VERSION_CHAR
/** alpha/beta/rc/release, docs use this. */
#define BLENDER_VERSION_CYCLE beta
#define BLENDER_VERSION_CYCLE release
/** Defined in from blender.c */
extern char versionstr[];

View File

@@ -85,7 +85,7 @@ struct Scene *BKE_collection_master_scene_search(const struct Main *bmain,
/* Collection Objects */
bool BKE_collection_has_object(struct Collection *collection, const struct Object *ob);
bool BKE_collection_has_object(struct Collection *collection, struct Object *ob);
bool BKE_collection_has_object_recursive(struct Collection *collection, struct Object *ob);
struct Collection *BKE_collection_object_find(struct Main *bmain,
struct Scene *scene,

View File

@@ -44,10 +44,8 @@ void BKE_rigidbody_free_constraint(struct Object *ob);
/* ...... */
void BKE_rigidbody_object_copy(struct Main *bmain,
struct Object *ob_dst,
const struct Object *ob_src,
const int flag);
struct RigidBodyOb *BKE_rigidbody_copy_object(const struct Object *ob, const int flag);
struct RigidBodyCon *BKE_rigidbody_copy_constraint(const struct Object *ob, const int flag);
/* Callback format for performing operations on ID-pointers for rigidbody world. */
typedef void (*RigidbodyWorldIDFunc)(struct RigidBodyWorld *rbw,

View File

@@ -2374,6 +2374,9 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
pchanw.mpath = pchan->mpath;
pchan->mpath = NULL;
/* Reset runtime data, we don't want to share that with the proxy. */
BKE_pose_channel_runtime_reset(&pchanw.runtime);
/* this is freed so copy a copy, else undo crashes */
if (pchanw.prop) {
pchanw.prop = IDP_CopyProperty(pchanw.prop);

View File

@@ -287,6 +287,16 @@ static Collection *collection_duplicate_recursive(Main *bmain,
collection_object_add(bmain, collection_new, ob_new, 0, true);
collection_object_remove(bmain, collection_new, ob_old, false);
if (ob_new->rigidbody_object != NULL) {
BLI_assert(ob_old->rigidbody_object != NULL);
for (Scene *scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) {
if (scene->rigidbody_world != NULL &&
BKE_collection_has_object(scene->rigidbody_world->group, ob_old)) {
collection_object_add(bmain, scene->rigidbody_world->group, ob_new, 0, true);
}
}
}
}
}
@@ -562,7 +572,7 @@ bool BKE_collection_object_cyclic_check(Main *bmain, Object *object, Collection
/******************* Collection Object Membership *******************/
bool BKE_collection_has_object(Collection *collection, const Object *ob)
bool BKE_collection_has_object(Collection *collection, Object *ob)
{
if (ELEM(NULL, collection, ob)) {
return false;

View File

@@ -1,3 +1,4 @@
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -85,6 +86,7 @@ void BKE_object_data_transfer_dttypes_to_cdmask(const int dtdata_types,
}
else if (cddata_type == CD_FAKE_LNOR) {
r_data_masks->vmask |= CD_MASK_NORMAL;
r_data_masks->pmask |= CD_MASK_NORMAL;
r_data_masks->lmask |= CD_MASK_NORMAL | CD_MASK_CUSTOMLOOPNORMAL;
}
}

View File

@@ -1417,7 +1417,8 @@ void BKE_object_copy_data(Main *bmain, Object *ob_dst, const Object *ob_src, con
}
}
BKE_object_copy_softbody(ob_dst, ob_src, flag_subdata);
BKE_rigidbody_object_copy(bmain, ob_dst, ob_src, flag_subdata);
ob_dst->rigidbody_object = BKE_rigidbody_copy_object(ob_src, flag_subdata);
ob_dst->rigidbody_constraint = BKE_rigidbody_copy_constraint(ob_src, flag_subdata);
BKE_object_copy_particlesystems(ob_dst, ob_src, flag_subdata);

View File

@@ -34,7 +34,6 @@
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_listbase.h"
#ifdef WITH_BULLET
# include "RBI_api.h"
@@ -229,7 +228,7 @@ void BKE_rigidbody_free_constraint(Object *ob)
* be added to relevant groups later...
*/
static RigidBodyOb *rigidbody_copy_object(const Object *ob, const int flag)
RigidBodyOb *BKE_rigidbody_copy_object(const Object *ob, const int flag)
{
RigidBodyOb *rboN = NULL;
@@ -250,7 +249,7 @@ static RigidBodyOb *rigidbody_copy_object(const Object *ob, const int flag)
return rboN;
}
static RigidBodyCon *rigidbody_copy_constraint(const Object *ob, const int UNUSED(flag))
RigidBodyCon *BKE_rigidbody_copy_constraint(const Object *ob, const int UNUSED(flag))
{
RigidBodyCon *rbcN = NULL;
@@ -269,54 +268,6 @@ static RigidBodyCon *rigidbody_copy_constraint(const Object *ob, const int UNUSE
return rbcN;
}
void BKE_rigidbody_object_copy(Main *bmain, Object *ob_dst, const Object *ob_src, const int flag)
{
ob_dst->rigidbody_object = rigidbody_copy_object(ob_src, flag);
ob_dst->rigidbody_constraint = rigidbody_copy_constraint(ob_src, flag);
if (flag & LIB_ID_CREATE_NO_MAIN) {
return;
}
/* We have to ensure that duplicated object ends up in relevant rigidbody collections...
* Otherwise duplicating the RB data itself is meaningless. */
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
RigidBodyWorld *rigidbody_world = scene->rigidbody_world;
if (rigidbody_world != NULL) {
bool need_objects_update = false;
bool need_constraints_update = false;
if (ob_dst->rigidbody_object) {
if (BKE_collection_has_object(rigidbody_world->group, ob_src)) {
BKE_collection_object_add(bmain, rigidbody_world->group, ob_dst);
need_objects_update = true;
}
}
if (ob_dst->rigidbody_constraint) {
if (BKE_collection_has_object(rigidbody_world->constraints, ob_src)) {
BKE_collection_object_add(bmain, rigidbody_world->constraints, ob_dst);
need_constraints_update = true;
}
}
if ((flag & LIB_ID_CREATE_NO_DEG_TAG) == 0 &&
(need_objects_update || need_constraints_update)) {
BKE_rigidbody_cache_reset(rigidbody_world);
DEG_relations_tag_update(bmain);
if (need_objects_update) {
DEG_id_tag_update(&rigidbody_world->group->id, ID_RECALC_COPY_ON_WRITE);
}
if (need_constraints_update) {
DEG_id_tag_update(&rigidbody_world->constraints->id, ID_RECALC_COPY_ON_WRITE);
}
DEG_id_tag_update(&ob_dst->id, ID_RECALC_TRANSFORM);
}
}
}
}
/* ************************************** */
/* Setup Utilities - Validate Sim Instances */
@@ -2032,8 +1983,13 @@ void BKE_rigidbody_do_simulation(Depsgraph *depsgraph, Scene *scene, float ctime
# pragma GCC diagnostic ignored "-Wunused-parameter"
# endif
void BKE_rigidbody_object_copy(Main *bmain, Object *ob_dst, const Object *ob_src, const int flag)
struct RigidBodyOb *BKE_rigidbody_copy_object(const Object *ob, const int flag)
{
return NULL;
}
struct RigidBodyCon *BKE_rigidbody_copy_constraint(const Object *ob, const int flag)
{
return NULL;
}
void BKE_rigidbody_validate_sim_world(Scene *scene, RigidBodyWorld *rbw, bool rebuild)
{

View File

@@ -311,13 +311,20 @@ static void undosys_stack_clear_all_last(UndoStack *ustack, UndoStep *us)
}
}
static void undosys_stack_clear_all_first(UndoStack *ustack, UndoStep *us)
static void undosys_stack_clear_all_first(UndoStack *ustack, UndoStep *us, UndoStep *us_exclude)
{
if (us && us == us_exclude) {
us = us->prev;
}
if (us) {
bool is_not_empty = true;
UndoStep *us_iter;
do {
us_iter = ustack->steps.first;
if (us_iter == us_exclude) {
us_iter = us_iter->next;
}
BLI_assert(us_iter != ustack->step_active);
undosys_step_free_and_unlink(ustack, us_iter);
undosys_stack_validate(ustack, is_not_empty);
@@ -395,9 +402,7 @@ void BKE_undosys_stack_limit_steps_and_memory(UndoStack *ustack, int steps, size
CLOG_INFO(&LOG, 1, "steps=%d, memory_limit=%zu", steps, memory_limit);
UndoStep *us;
#ifdef WITH_GLOBAL_UNDO_KEEP_ONE
UndoStep *us_exclude = NULL;
#endif
/* keep at least two (original + other) */
size_t data_size_all = 0;
size_t us_count = 0;
@@ -427,23 +432,14 @@ void BKE_undosys_stack_limit_steps_and_memory(UndoStack *ustack, int steps, size
/* Hack, we need to keep at least one BKE_UNDOSYS_TYPE_MEMFILE. */
if (us->type != BKE_UNDOSYS_TYPE_MEMFILE) {
us_exclude = us->prev;
while (us_exclude && us_exclude->type != BKE_UNDOSYS_TYPE_MEMFILE) {
while (us_exclude && us->type != BKE_UNDOSYS_TYPE_MEMFILE) {
us_exclude = us_exclude->prev;
}
if (us_exclude) {
BLI_remlink(&ustack->steps, us_exclude);
}
}
#endif
/* Free from first to last, free functions may update de-duplication info
* (see #MemFileUndoStep). */
undosys_stack_clear_all_first(ustack, us->prev);
#ifdef WITH_GLOBAL_UNDO_KEEP_ONE
if (us_exclude) {
BLI_addhead(&ustack->steps, us_exclude);
}
#endif
undosys_stack_clear_all_first(ustack, us->prev, us_exclude);
}
}

View File

@@ -3495,9 +3495,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
{
/* Versioning code until next subversion bump goes here. */
if (!MAIN_VERSION_ATLEAST(bmain, 280, 75)) {
for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
if (scene->master_collection != NULL) {
scene->master_collection->flag &= ~(COLLECTION_RESTRICT_VIEWPORT |
@@ -3534,4 +3532,8 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
arm->flag &= ~(ARM_FLAG_UNUSED_6);
}
}
{
/* Versioning code until next subversion bump goes here. */
}
}

View File

@@ -3201,7 +3201,7 @@ static BoundVert *pipe_test(BevVert *bv)
/* check face planes: all should have normals perpendicular to epipe */
for (e = &bv->edges[0]; e != &bv->edges[bv->edgecount]; e++) {
if (e->fnext) {
if (dot_v3v3(dir1, e->fnext->no) > BEVEL_EPSILON_BIG) {
if (fabsf(dot_v3v3(dir1, e->fnext->no)) > BEVEL_EPSILON_BIG) {
return NULL;
}
}

View File

@@ -102,7 +102,12 @@ void EffectsExporter::set_shader_type(COLLADASW::EffectProfile &ep, Material *ma
void EffectsExporter::set_transparency(COLLADASW::EffectProfile &ep, Material *ma)
{
double alpha = bc_get_alpha(ma);
ep.setTransparency(alpha, false, "alpha");
if (alpha < 1) {
// workaround use <transparent> to avoid wrong handling of <transparency> by other tools
COLLADASW::ColorOrTexture cot = bc_get_cot(0, 0, 0, alpha);
ep.setTransparent(cot, false, "alpha");
ep.setOpaque(COLLADASW::EffectProfile::A_ONE);
}
}
void EffectsExporter::set_diffuse_color(COLLADASW::EffectProfile &ep, Material *ma)
@@ -134,7 +139,9 @@ void EffectsExporter::set_reflective(COLLADASW::EffectProfile &ep, Material *ma)
void EffectsExporter::set_reflectivity(COLLADASW::EffectProfile &ep, Material *ma)
{
double reflectivity = bc_get_reflectivity(ma);
ep.setReflectivity(reflectivity, false, "specular");
if (reflectivity > 0.0) {
ep.setReflectivity(reflectivity, false, "specular");
}
}
void EffectsExporter::set_emission(COLLADASW::EffectProfile &ep, Material *ma)

View File

@@ -168,13 +168,37 @@ void MaterialNode::set_alpha(COLLADAFW::EffectCommon::OpaqueMode mode,
COLLADAFW::ColorOrTexture &cot,
COLLADAFW::FloatOrParam &val)
{
/* Handling the alpha value according to the Collada 1.4 reference guide
* see page 7-5 Determining Transparency (Opacity)
*/
if (effect == nullptr) {
return;
}
if (cot.isColor() || !cot.isValid()) {
COLLADAFW::Color col = (cot.isValid()) ? cot.getColor() : COLLADAFW::Color(1, 1, 1, 1);
float alpha = val.getFloatValue() * col.getAlpha(); // Assuming A_ONE opaque mode
// transparent_cot is either a color or not defined
float transparent_alpha;
if (cot.isValid()) {
COLLADAFW::Color col = cot.getColor();
transparent_alpha = col.getAlpha();
}
else {
// no transparent color defined
transparent_alpha = 1;
}
float transparency_alpha = val.getFloatValue();
if (transparency_alpha < 0) {
// transparency is not defined
transparency_alpha = 1; // set to opaque
}
float alpha = transparent_alpha * transparency_alpha;
if (mode == COLLADASW::EffectProfile::RGB_ZERO) {
alpha = 1 - alpha;
}
bNodeSocket *socket = nodeFindSocket(shader_node, SOCK_IN, "Alpha");
((bNodeSocketValueFloat *)socket->default_value)->value = alpha;
@@ -182,7 +206,6 @@ void MaterialNode::set_alpha(COLLADAFW::EffectCommon::OpaqueMode mode,
else if (cot.isTexture()) {
int locy = -300 * (node_map.size() - 2);
add_texture_node(cot, -300, locy, "Alpha");
// TODO: Connect node
}
}

View File

@@ -266,7 +266,8 @@ static bool EEVEE_lightcache_validate(const LightCache *light_cache,
(irr_size[2] == light_cache->grid_tx.tex_size[2]) && (grid_len == light_cache->grid_len)) {
int mip_len = (int)(floorf(log2f(cube_res)) - MIN_CUBE_LOD_LEVEL);
if ((cube_res == light_cache->cube_tx.tex_size[0]) &&
(cube_len == light_cache->cube_tx.tex_size[2]) && (mip_len == light_cache->mips_len)) {
(cube_len == light_cache->cube_tx.tex_size[2]) && (cube_len == light_cache->cube_len) &&
(mip_len == light_cache->mips_len)) {
return true;
}
}

View File

@@ -1659,14 +1659,17 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata,
char *name = auto_layer_names;
for (int j = 0; j < auto_layer_count; ++j) {
/* TODO don't add these uniform when not needed (default pass shaders). */
/* FIXME: This is broken, as it overrides any autolayers srgb bool of the previous mesh
* that shares the same material. */
if (shgrp_array[i]) {
DRW_shgroup_uniform_bool(shgrp_array[i], name, &auto_layer_is_srgb[j], 1);
DRW_shgroup_uniform_bool_copy(shgrp_array[i], name, auto_layer_is_srgb[j]);
}
if (shgrp_depth_array[i]) {
DRW_shgroup_uniform_bool(shgrp_depth_array[i], name, &auto_layer_is_srgb[j], 1);
DRW_shgroup_uniform_bool_copy(shgrp_depth_array[i], name, auto_layer_is_srgb[j]);
}
if (shgrp_depth_clip_array[i]) {
DRW_shgroup_uniform_bool(shgrp_depth_clip_array[i], name, &auto_layer_is_srgb[j], 1);
DRW_shgroup_uniform_bool_copy(
shgrp_depth_clip_array[i], name, auto_layer_is_srgb[j]);
}
/* Go to next layer name. */
while (*name != '\0') {

View File

@@ -4830,7 +4830,7 @@ static void uvedit_fill_buffer_data(MeshRenderData *rdata,
/* Tag hidden faces */
BM_elem_flag_set(efa, BM_ELEM_TAG, uvedit_face_visible_nolocal_ex(rdata->toolsettings, efa));
if (vbo_area && BM_elem_flag_test(efa, BM_ELEM_TAG)) {
if (vbo_area) {
edit_uv_preprocess_stretch_area(
efa, cd_loop_uv_offset, fidx++, &totarea, &totuvarea, faces_areas);
}

View File

@@ -62,7 +62,7 @@ typedef struct UndoFont {
wchar_t *textbuf;
struct CharInfo *textbufinfo;
int len, pos;
int len, pos, selstart, selend;
#ifdef USE_ARRAY_STORE
struct {
@@ -241,10 +241,10 @@ static void undofont_to_editfont(UndoFont *uf, Curve *cu)
memcpy(ef->textbufinfo, uf->textbufinfo, final_size);
ef->pos = uf->pos;
ef->selstart = uf->selstart;
ef->selend = uf->selend;
ef->len = uf->len;
ef->selstart = ef->selend = 0;
#ifdef USE_ARRAY_STORE
uf_arraystore_expand_clear(uf);
#endif
@@ -269,6 +269,8 @@ static void *undofont_from_editfont(UndoFont *uf, Curve *cu)
memcpy(uf->textbufinfo, ef->textbufinfo, final_size);
uf->pos = ef->pos;
uf->selstart = ef->selstart;
uf->selend = ef->selend;
uf->len = ef->len;
#ifdef USE_ARRAY_STORE

View File

@@ -68,9 +68,19 @@ typedef struct UndoLattice {
static void undolatt_to_editlatt(UndoLattice *ult, EditLatt *editlatt)
{
int len = editlatt->latt->pntsu * editlatt->latt->pntsv * editlatt->latt->pntsw;
const int len_src = ult->pntsu * ult->pntsv * ult->pntsw;
const int len_dst = editlatt->latt->pntsu * editlatt->latt->pntsv * editlatt->latt->pntsw;
if (len_src != len_dst) {
MEM_freeN(editlatt->latt->def);
editlatt->latt->def = MEM_dupallocN(ult->def);
}
else {
memcpy(editlatt->latt->def, ult->def, sizeof(BPoint) * len_src);
}
memcpy(editlatt->latt->def, ult->def, sizeof(BPoint) * len);
editlatt->latt->pntsu = ult->pntsu;
editlatt->latt->pntsv = ult->pntsv;
editlatt->latt->pntsw = ult->pntsw;
editlatt->latt->actbp = ult->actbp;
}

View File

@@ -4593,7 +4593,8 @@ static int edbm_fill_grid_exec(bContext *C, wmOperator *op)
/* Only reuse on redo because these settings need to match the current selection.
* We never want to use them on other geometry, repeat last for eg, see: T60777. */
if ((op->flag & OP_IS_REPEAT_LAST) == 0 && RNA_property_is_set(op->ptr, prop_span)) {
if (((op->flag & OP_IS_INVOKE) || (op->flag & OP_IS_REPEAT_LAST) == 0) &&
RNA_property_is_set(op->ptr, prop_span)) {
span = RNA_property_int_get(op->ptr, prop_span);
span = min_ii(span, (clamp / 2) - 1);
calc_span = false;

View File

@@ -192,9 +192,8 @@ void gpencil_apply_modifier_material(
BLI_ghash_insert(gh_color, mat->id.name, newmat);
DEG_id_tag_update(&newmat->id, ID_RECALC_COPY_ON_WRITE);
}
/* Reaasign color index. */
int idx = BKE_gpencil_object_material_get_index(ob, newmat);
gps->mat_nr = idx - 1;
/* Reassign color index. */
gps->mat_nr = BKE_gpencil_object_material_get_index(ob, newmat);
}
else {
/* reuse existing color (but update only first time) */

View File

@@ -130,9 +130,6 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
if (vertex_only) {
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
if (!BM_vert_is_manifold(v)) {
continue;
}
if (bmd->lim_flags & MOD_BEVEL_WEIGHT) {
weight = BM_elem_float_data_get(&bm->vdata, v, CD_BWEIGHT);
if (weight == 0.0f) {

View File

@@ -2956,7 +2956,8 @@ static void wm_block_file_close_save(bContext *C, void *arg_block, void *arg_dat
wmWindow *win = CTX_wm_window(C);
UI_popup_block_close(C, win, arg_block);
if (save_images_when_file_is_closed) {
int modified_images_count = ED_image_save_all_modified_info(C, NULL);
if (modified_images_count > 0 && save_images_when_file_is_closed) {
if (ED_image_should_save_modified(C)) {
ReportList *reports = CTX_wm_reports(C);
ED_image_save_all_modified(C, reports);