Compare commits
34 Commits
refactor-m
...
blender-v2
Author | SHA1 | Date | |
---|---|---|---|
f6cb5f5449 | |||
1052c84ad2 | |||
8e1516b7bc | |||
16bf0b47d3 | |||
9e24999451 | |||
507ffee6e1 | |||
d40e2194ee | |||
55ae37ba31 | |||
db15b23745 | |||
3c9a7d0652 | |||
8194477c0d | |||
7f77f5f4a4 | |||
50c5108f79 | |||
b3f0501e31 | |||
21f17cc959 | |||
4b8558e6f4 | |||
c11be0f736 | |||
ab5a1ebe3a | |||
73379fd974 | |||
33acb752b3 | |||
66b7fea576 | |||
caaf12cdba | |||
c9f136fa2c | |||
b5a6635f37 | |||
804f467a00 | |||
38d4483c6a | |||
2b1fdd7e3d | |||
786f5ccea2 | |||
93985e4517 | |||
3176328a88 | |||
06312c6d2d | |||
3fe0c32fae | |||
6a1eb0a241 | |||
1456c8e2eb |
@@ -6,7 +6,7 @@
|
|||||||
# LIBSNDFILE_LIBRARIES, libraries to link against to use SndFile.
|
# LIBSNDFILE_LIBRARIES, libraries to link against to use SndFile.
|
||||||
# LIBSNDFILE_ROOT_DIR, The base directory to search for SndFile.
|
# LIBSNDFILE_ROOT_DIR, The base directory to search for SndFile.
|
||||||
# This can also be an environment variable.
|
# 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
|
# also defined, but not for general use are
|
||||||
# LIBSNDFILE_LIBRARY, where to find the SndFile library.
|
# LIBSNDFILE_LIBRARY, where to find the SndFile library.
|
||||||
@@ -50,16 +50,16 @@ FIND_LIBRARY(LIBSNDFILE_LIBRARY
|
|||||||
lib64 lib
|
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
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SndFile DEFAULT_MSG
|
||||||
LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
|
LIBSNDFILE_LIBRARY LIBSNDFILE_INCLUDE_DIR)
|
||||||
|
|
||||||
IF(LIBSNDFILE_FOUND)
|
IF(SNDFILE_FOUND)
|
||||||
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
|
SET(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBRARY})
|
||||||
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
|
SET(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE_INCLUDE_DIR})
|
||||||
ENDIF(LIBSNDFILE_FOUND)
|
ENDIF(SNDFILE_FOUND)
|
||||||
|
|
||||||
MARK_AS_ADVANCED(
|
MARK_AS_ADVANCED(
|
||||||
LIBSNDFILE_INCLUDE_DIR
|
LIBSNDFILE_INCLUDE_DIR
|
||||||
|
@@ -156,7 +156,7 @@ endif()
|
|||||||
# Codecs
|
# Codecs
|
||||||
if(WITH_CODEC_SNDFILE)
|
if(WITH_CODEC_SNDFILE)
|
||||||
find_package_wrapper(SndFile)
|
find_package_wrapper(SndFile)
|
||||||
if(NOT LIBSNDFILE_FOUND)
|
if(NOT SNDFILE_FOUND)
|
||||||
set(WITH_CODEC_SNDFILE OFF)
|
set(WITH_CODEC_SNDFILE OFF)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@@ -38,7 +38,7 @@ PROJECT_NAME = Blender
|
|||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# 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
|
# 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
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
|
Submodule release/datafiles/locale updated: 0f771b0f38...a467f38d0c
@@ -10,15 +10,15 @@
|
|||||||
<p>
|
<p>
|
||||||
Blender is the free and open source 3D creation suite. It supports
|
Blender is the free and open source 3D creation suite. It supports
|
||||||
the entirety of the 3D pipeline — modeling, rigging, animation,
|
the entirety of the 3D pipeline — modeling, rigging, animation,
|
||||||
simulation, rendering, compositing and motion tracking, even video
|
simulation, rendering, compositing, motion tracking, and video
|
||||||
editing and game creation.
|
editing.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Advanced users can employ Blender’s API for Python scripting to
|
Blender is a public project, made by hundreds of people from around the
|
||||||
customize the application and write specialized tools. Blender is
|
world; by studios and individual artists, professionals and hobbyists,
|
||||||
well suited to individuals and small studios who benefit from its
|
scientists, students, VFX experts, animators, game artists, modders, and
|
||||||
unified pipeline and responsive development process.
|
the list goes on.
|
||||||
</p>
|
</p>
|
||||||
</description>
|
</description>
|
||||||
<url type="homepage">https://www.blender.org</url>
|
<url type="homepage">https://www.blender.org</url>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
</screenshot>
|
</screenshot>
|
||||||
</screenshots>
|
</screenshots>
|
||||||
<releases>
|
<releases>
|
||||||
<release version="2.80" date="2019-07-18">
|
<release version="2.80" date="2019-07-30">
|
||||||
<description>
|
<description>
|
||||||
<p>New features:</p>
|
<p>New features:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
Submodule release/scripts/addons updated: aa3366b780...4410bd0a9f
Submodule release/scripts/addons_contrib updated: 0aa23a4d61...d9ed9d4d06
@@ -1781,7 +1781,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):
|
|||||||
col.prop(gp_settings, "angle_factor", text="Factor", slider=True)
|
col.prop(gp_settings, "angle_factor", text="Factor", slider=True)
|
||||||
|
|
||||||
ob = context.object
|
ob = context.object
|
||||||
if ob:
|
if ob and brush.gpencil_settings.use_material_pin is False:
|
||||||
ma = ob.active_material
|
ma = ob.active_material
|
||||||
elif brush.gpencil_settings.material:
|
elif brush.gpencil_settings.material:
|
||||||
ma = brush.gpencil_settings.material
|
ma = brush.gpencil_settings.material
|
||||||
|
@@ -96,7 +96,7 @@ KerningCacheBLF *blf_kerning_cache_new(FontBLF *font)
|
|||||||
.x = 0,
|
.x = 0,
|
||||||
.y = 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;
|
kc->table[i][j] = (int)delta.x >> 6;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
* \note Use #STRINGIFY() rather than defining with quotes.
|
* \note Use #STRINGIFY() rather than defining with quotes.
|
||||||
*/
|
*/
|
||||||
#define BLENDER_VERSION 280
|
#define BLENDER_VERSION 280
|
||||||
#define BLENDER_SUBVERSION 74
|
#define BLENDER_SUBVERSION 75
|
||||||
/** Several breakages with 280, e.g. collections vs layers. */
|
/** Several breakages with 280, e.g. collections vs layers. */
|
||||||
#define BLENDER_MINVERSION 280
|
#define BLENDER_MINVERSION 280
|
||||||
#define BLENDER_MINSUBVERSION 0
|
#define BLENDER_MINSUBVERSION 0
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
/** Can be left blank, otherwise a,b,c... etc with no quotes. */
|
/** Can be left blank, otherwise a,b,c... etc with no quotes. */
|
||||||
#define BLENDER_VERSION_CHAR
|
#define BLENDER_VERSION_CHAR
|
||||||
/** alpha/beta/rc/release, docs use this. */
|
/** alpha/beta/rc/release, docs use this. */
|
||||||
#define BLENDER_VERSION_CYCLE beta
|
#define BLENDER_VERSION_CYCLE release
|
||||||
|
|
||||||
/** Defined in from blender.c */
|
/** Defined in from blender.c */
|
||||||
extern char versionstr[];
|
extern char versionstr[];
|
||||||
|
@@ -85,7 +85,7 @@ struct Scene *BKE_collection_master_scene_search(const struct Main *bmain,
|
|||||||
|
|
||||||
/* Collection Objects */
|
/* 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);
|
bool BKE_collection_has_object_recursive(struct Collection *collection, struct Object *ob);
|
||||||
struct Collection *BKE_collection_object_find(struct Main *bmain,
|
struct Collection *BKE_collection_object_find(struct Main *bmain,
|
||||||
struct Scene *scene,
|
struct Scene *scene,
|
||||||
|
@@ -44,10 +44,8 @@ void BKE_rigidbody_free_constraint(struct Object *ob);
|
|||||||
|
|
||||||
/* ...... */
|
/* ...... */
|
||||||
|
|
||||||
void BKE_rigidbody_object_copy(struct Main *bmain,
|
struct RigidBodyOb *BKE_rigidbody_copy_object(const struct Object *ob, const int flag);
|
||||||
struct Object *ob_dst,
|
struct RigidBodyCon *BKE_rigidbody_copy_constraint(const struct Object *ob, const int flag);
|
||||||
const struct Object *ob_src,
|
|
||||||
const int flag);
|
|
||||||
|
|
||||||
/* Callback format for performing operations on ID-pointers for rigidbody world. */
|
/* Callback format for performing operations on ID-pointers for rigidbody world. */
|
||||||
typedef void (*RigidbodyWorldIDFunc)(struct RigidBodyWorld *rbw,
|
typedef void (*RigidbodyWorldIDFunc)(struct RigidBodyWorld *rbw,
|
||||||
|
@@ -2374,6 +2374,9 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
|
|||||||
pchanw.mpath = pchan->mpath;
|
pchanw.mpath = pchan->mpath;
|
||||||
pchan->mpath = NULL;
|
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 */
|
/* this is freed so copy a copy, else undo crashes */
|
||||||
if (pchanw.prop) {
|
if (pchanw.prop) {
|
||||||
pchanw.prop = IDP_CopyProperty(pchanw.prop);
|
pchanw.prop = IDP_CopyProperty(pchanw.prop);
|
||||||
|
@@ -287,6 +287,16 @@ static Collection *collection_duplicate_recursive(Main *bmain,
|
|||||||
|
|
||||||
collection_object_add(bmain, collection_new, ob_new, 0, true);
|
collection_object_add(bmain, collection_new, ob_new, 0, true);
|
||||||
collection_object_remove(bmain, collection_new, ob_old, false);
|
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 *******************/
|
/******************* 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)) {
|
if (ELEM(NULL, collection, ob)) {
|
||||||
return false;
|
return false;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* 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) {
|
else if (cddata_type == CD_FAKE_LNOR) {
|
||||||
r_data_masks->vmask |= CD_MASK_NORMAL;
|
r_data_masks->vmask |= CD_MASK_NORMAL;
|
||||||
|
r_data_masks->pmask |= CD_MASK_NORMAL;
|
||||||
r_data_masks->lmask |= CD_MASK_NORMAL | CD_MASK_CUSTOMLOOPNORMAL;
|
r_data_masks->lmask |= CD_MASK_NORMAL | CD_MASK_CUSTOMLOOPNORMAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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_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);
|
BKE_object_copy_particlesystems(ob_dst, ob_src, flag_subdata);
|
||||||
|
|
||||||
|
@@ -34,7 +34,6 @@
|
|||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
#include "BLI_listbase.h"
|
|
||||||
|
|
||||||
#ifdef WITH_BULLET
|
#ifdef WITH_BULLET
|
||||||
# include "RBI_api.h"
|
# include "RBI_api.h"
|
||||||
@@ -229,7 +228,7 @@ void BKE_rigidbody_free_constraint(Object *ob)
|
|||||||
* be added to relevant groups later...
|
* 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;
|
RigidBodyOb *rboN = NULL;
|
||||||
|
|
||||||
@@ -250,7 +249,7 @@ static RigidBodyOb *rigidbody_copy_object(const Object *ob, const int flag)
|
|||||||
return rboN;
|
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;
|
RigidBodyCon *rbcN = NULL;
|
||||||
|
|
||||||
@@ -269,54 +268,6 @@ static RigidBodyCon *rigidbody_copy_constraint(const Object *ob, const int UNUSE
|
|||||||
return rbcN;
|
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 */
|
/* 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"
|
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
# endif
|
# 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)
|
void BKE_rigidbody_validate_sim_world(Scene *scene, RigidBodyWorld *rbw, bool rebuild)
|
||||||
{
|
{
|
||||||
|
@@ -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) {
|
if (us) {
|
||||||
bool is_not_empty = true;
|
bool is_not_empty = true;
|
||||||
UndoStep *us_iter;
|
UndoStep *us_iter;
|
||||||
do {
|
do {
|
||||||
us_iter = ustack->steps.first;
|
us_iter = ustack->steps.first;
|
||||||
|
if (us_iter == us_exclude) {
|
||||||
|
us_iter = us_iter->next;
|
||||||
|
}
|
||||||
BLI_assert(us_iter != ustack->step_active);
|
BLI_assert(us_iter != ustack->step_active);
|
||||||
undosys_step_free_and_unlink(ustack, us_iter);
|
undosys_step_free_and_unlink(ustack, us_iter);
|
||||||
undosys_stack_validate(ustack, is_not_empty);
|
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);
|
CLOG_INFO(&LOG, 1, "steps=%d, memory_limit=%zu", steps, memory_limit);
|
||||||
UndoStep *us;
|
UndoStep *us;
|
||||||
#ifdef WITH_GLOBAL_UNDO_KEEP_ONE
|
|
||||||
UndoStep *us_exclude = NULL;
|
UndoStep *us_exclude = NULL;
|
||||||
#endif
|
|
||||||
/* keep at least two (original + other) */
|
/* keep at least two (original + other) */
|
||||||
size_t data_size_all = 0;
|
size_t data_size_all = 0;
|
||||||
size_t us_count = 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. */
|
/* Hack, we need to keep at least one BKE_UNDOSYS_TYPE_MEMFILE. */
|
||||||
if (us->type != BKE_UNDOSYS_TYPE_MEMFILE) {
|
if (us->type != BKE_UNDOSYS_TYPE_MEMFILE) {
|
||||||
us_exclude = us->prev;
|
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;
|
us_exclude = us_exclude->prev;
|
||||||
}
|
}
|
||||||
if (us_exclude) {
|
|
||||||
BLI_remlink(&ustack->steps, us_exclude);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Free from first to last, free functions may update de-duplication info
|
/* Free from first to last, free functions may update de-duplication info
|
||||||
* (see #MemFileUndoStep). */
|
* (see #MemFileUndoStep). */
|
||||||
undosys_stack_clear_all_first(ustack, us->prev);
|
undosys_stack_clear_all_first(ustack, us->prev, us_exclude);
|
||||||
|
|
||||||
#ifdef WITH_GLOBAL_UNDO_KEEP_ONE
|
|
||||||
if (us_exclude) {
|
|
||||||
BLI_addhead(&ustack->steps, us_exclude);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3495,9 +3495,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
if (!MAIN_VERSION_ATLEAST(bmain, 280, 75)) {
|
||||||
/* Versioning code until next subversion bump goes here. */
|
|
||||||
|
|
||||||
for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
|
for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
|
||||||
if (scene->master_collection != NULL) {
|
if (scene->master_collection != NULL) {
|
||||||
scene->master_collection->flag &= ~(COLLECTION_RESTRICT_VIEWPORT |
|
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);
|
arm->flag &= ~(ARM_FLAG_UNUSED_6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
/* Versioning code until next subversion bump goes here. */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3201,7 +3201,7 @@ static BoundVert *pipe_test(BevVert *bv)
|
|||||||
/* check face planes: all should have normals perpendicular to epipe */
|
/* check face planes: all should have normals perpendicular to epipe */
|
||||||
for (e = &bv->edges[0]; e != &bv->edges[bv->edgecount]; e++) {
|
for (e = &bv->edges[0]; e != &bv->edges[bv->edgecount]; e++) {
|
||||||
if (e->fnext) {
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -102,7 +102,12 @@ void EffectsExporter::set_shader_type(COLLADASW::EffectProfile &ep, Material *ma
|
|||||||
void EffectsExporter::set_transparency(COLLADASW::EffectProfile &ep, Material *ma)
|
void EffectsExporter::set_transparency(COLLADASW::EffectProfile &ep, Material *ma)
|
||||||
{
|
{
|
||||||
double alpha = bc_get_alpha(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)
|
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)
|
void EffectsExporter::set_reflectivity(COLLADASW::EffectProfile &ep, Material *ma)
|
||||||
{
|
{
|
||||||
double reflectivity = bc_get_reflectivity(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)
|
void EffectsExporter::set_emission(COLLADASW::EffectProfile &ep, Material *ma)
|
||||||
|
@@ -168,13 +168,37 @@ void MaterialNode::set_alpha(COLLADAFW::EffectCommon::OpaqueMode mode,
|
|||||||
COLLADAFW::ColorOrTexture &cot,
|
COLLADAFW::ColorOrTexture &cot,
|
||||||
COLLADAFW::FloatOrParam &val)
|
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) {
|
if (effect == nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cot.isColor() || !cot.isValid()) {
|
if (cot.isColor() || !cot.isValid()) {
|
||||||
COLLADAFW::Color col = (cot.isValid()) ? cot.getColor() : COLLADAFW::Color(1, 1, 1, 1);
|
// transparent_cot is either a color or not defined
|
||||||
float alpha = val.getFloatValue() * col.getAlpha(); // Assuming A_ONE opaque mode
|
|
||||||
|
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");
|
bNodeSocket *socket = nodeFindSocket(shader_node, SOCK_IN, "Alpha");
|
||||||
((bNodeSocketValueFloat *)socket->default_value)->value = alpha;
|
((bNodeSocketValueFloat *)socket->default_value)->value = alpha;
|
||||||
@@ -182,7 +206,6 @@ void MaterialNode::set_alpha(COLLADAFW::EffectCommon::OpaqueMode mode,
|
|||||||
else if (cot.isTexture()) {
|
else if (cot.isTexture()) {
|
||||||
int locy = -300 * (node_map.size() - 2);
|
int locy = -300 * (node_map.size() - 2);
|
||||||
add_texture_node(cot, -300, locy, "Alpha");
|
add_texture_node(cot, -300, locy, "Alpha");
|
||||||
// TODO: Connect node
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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)) {
|
(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);
|
int mip_len = (int)(floorf(log2f(cube_res)) - MIN_CUBE_LOD_LEVEL);
|
||||||
if ((cube_res == light_cache->cube_tx.tex_size[0]) &&
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1659,14 +1659,17 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata,
|
|||||||
char *name = auto_layer_names;
|
char *name = auto_layer_names;
|
||||||
for (int j = 0; j < auto_layer_count; ++j) {
|
for (int j = 0; j < auto_layer_count; ++j) {
|
||||||
/* TODO don't add these uniform when not needed (default pass shaders). */
|
/* 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]) {
|
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]) {
|
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]) {
|
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. */
|
/* Go to next layer name. */
|
||||||
while (*name != '\0') {
|
while (*name != '\0') {
|
||||||
|
@@ -4830,7 +4830,7 @@ static void uvedit_fill_buffer_data(MeshRenderData *rdata,
|
|||||||
/* Tag hidden faces */
|
/* Tag hidden faces */
|
||||||
BM_elem_flag_set(efa, BM_ELEM_TAG, uvedit_face_visible_nolocal_ex(rdata->toolsettings, efa));
|
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(
|
edit_uv_preprocess_stretch_area(
|
||||||
efa, cd_loop_uv_offset, fidx++, &totarea, &totuvarea, faces_areas);
|
efa, cd_loop_uv_offset, fidx++, &totarea, &totuvarea, faces_areas);
|
||||||
}
|
}
|
||||||
|
@@ -62,7 +62,7 @@ typedef struct UndoFont {
|
|||||||
wchar_t *textbuf;
|
wchar_t *textbuf;
|
||||||
struct CharInfo *textbufinfo;
|
struct CharInfo *textbufinfo;
|
||||||
|
|
||||||
int len, pos;
|
int len, pos, selstart, selend;
|
||||||
|
|
||||||
#ifdef USE_ARRAY_STORE
|
#ifdef USE_ARRAY_STORE
|
||||||
struct {
|
struct {
|
||||||
@@ -241,10 +241,10 @@ static void undofont_to_editfont(UndoFont *uf, Curve *cu)
|
|||||||
memcpy(ef->textbufinfo, uf->textbufinfo, final_size);
|
memcpy(ef->textbufinfo, uf->textbufinfo, final_size);
|
||||||
|
|
||||||
ef->pos = uf->pos;
|
ef->pos = uf->pos;
|
||||||
|
ef->selstart = uf->selstart;
|
||||||
|
ef->selend = uf->selend;
|
||||||
ef->len = uf->len;
|
ef->len = uf->len;
|
||||||
|
|
||||||
ef->selstart = ef->selend = 0;
|
|
||||||
|
|
||||||
#ifdef USE_ARRAY_STORE
|
#ifdef USE_ARRAY_STORE
|
||||||
uf_arraystore_expand_clear(uf);
|
uf_arraystore_expand_clear(uf);
|
||||||
#endif
|
#endif
|
||||||
@@ -269,6 +269,8 @@ static void *undofont_from_editfont(UndoFont *uf, Curve *cu)
|
|||||||
memcpy(uf->textbufinfo, ef->textbufinfo, final_size);
|
memcpy(uf->textbufinfo, ef->textbufinfo, final_size);
|
||||||
|
|
||||||
uf->pos = ef->pos;
|
uf->pos = ef->pos;
|
||||||
|
uf->selstart = ef->selstart;
|
||||||
|
uf->selend = ef->selend;
|
||||||
uf->len = ef->len;
|
uf->len = ef->len;
|
||||||
|
|
||||||
#ifdef USE_ARRAY_STORE
|
#ifdef USE_ARRAY_STORE
|
||||||
|
@@ -68,9 +68,19 @@ typedef struct UndoLattice {
|
|||||||
|
|
||||||
static void undolatt_to_editlatt(UndoLattice *ult, EditLatt *editlatt)
|
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;
|
editlatt->latt->actbp = ult->actbp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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.
|
/* 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. */
|
* 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 = RNA_property_int_get(op->ptr, prop_span);
|
||||||
span = min_ii(span, (clamp / 2) - 1);
|
span = min_ii(span, (clamp / 2) - 1);
|
||||||
calc_span = false;
|
calc_span = false;
|
||||||
|
@@ -192,9 +192,8 @@ void gpencil_apply_modifier_material(
|
|||||||
BLI_ghash_insert(gh_color, mat->id.name, newmat);
|
BLI_ghash_insert(gh_color, mat->id.name, newmat);
|
||||||
DEG_id_tag_update(&newmat->id, ID_RECALC_COPY_ON_WRITE);
|
DEG_id_tag_update(&newmat->id, ID_RECALC_COPY_ON_WRITE);
|
||||||
}
|
}
|
||||||
/* Reaasign color index. */
|
/* Reassign color index. */
|
||||||
int idx = BKE_gpencil_object_material_get_index(ob, newmat);
|
gps->mat_nr = BKE_gpencil_object_material_get_index(ob, newmat);
|
||||||
gps->mat_nr = idx - 1;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* reuse existing color (but update only first time) */
|
/* reuse existing color (but update only first time) */
|
||||||
|
@@ -130,9 +130,6 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
|
|||||||
|
|
||||||
if (vertex_only) {
|
if (vertex_only) {
|
||||||
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
|
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
|
||||||
if (!BM_vert_is_manifold(v)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (bmd->lim_flags & MOD_BEVEL_WEIGHT) {
|
if (bmd->lim_flags & MOD_BEVEL_WEIGHT) {
|
||||||
weight = BM_elem_float_data_get(&bm->vdata, v, CD_BWEIGHT);
|
weight = BM_elem_float_data_get(&bm->vdata, v, CD_BWEIGHT);
|
||||||
if (weight == 0.0f) {
|
if (weight == 0.0f) {
|
||||||
|
@@ -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);
|
wmWindow *win = CTX_wm_window(C);
|
||||||
UI_popup_block_close(C, win, arg_block);
|
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)) {
|
if (ED_image_should_save_modified(C)) {
|
||||||
ReportList *reports = CTX_wm_reports(C);
|
ReportList *reports = CTX_wm_reports(C);
|
||||||
ED_image_save_all_modified(C, reports);
|
ED_image_save_all_modified(C, reports);
|
||||||
|
Reference in New Issue
Block a user