Merge remote-tracking branch 'origin/blender-v2.82-release'

This commit is contained in:
Sybren A. Stüvel 2020-01-21 11:13:47 +01:00
commit 463941b6a1
10 changed files with 73 additions and 31 deletions

@ -386,8 +386,8 @@ if(WITH_BOOST)
set(BOOST_INCLUDE_DIR ${BOOST}/include)
set(BOOST_LIBPATH ${BOOST}/lib)
if(CMAKE_CL_64)
set(BOOST_POSTFIX "vc141-mt-x64-1_68.lib")
set(BOOST_DEBUG_POSTFIX "vc141-mt-gd-x64-1_68.lib")
set(BOOST_POSTFIX "vc141-mt-x64-1_70.lib")
set(BOOST_DEBUG_POSTFIX "vc141-mt-gd-x64-1_70.lib")
endif()
set(BOOST_LIBRARIES
optimized ${BOOST_LIBPATH}/libboost_date_time-${BOOST_POSTFIX}

@ -47,6 +47,7 @@ extern "C" {
#include "DNA_gpencil_types.h"
#include "DNA_key_types.h"
#include "DNA_light_types.h"
#include "DNA_linestyle_types.h"
#include "DNA_material_types.h"
#include "DNA_mask_types.h"
#include "DNA_mesh_types.h"
@ -432,6 +433,9 @@ void DepsgraphNodeBuilder::build_id(ID *id)
case ID_MSK:
build_mask((Mask *)id);
break;
case ID_LS:
build_freestyle_linestyle((FreestyleLineStyle *)id);
break;
case ID_MC:
build_movieclip((MovieClip *)id);
break;
@ -1557,6 +1561,18 @@ void DepsgraphNodeBuilder::build_mask(Mask *mask)
}
}
void DepsgraphNodeBuilder::build_freestyle_linestyle(FreestyleLineStyle *linestyle)
{
if (built_map_.checkIsBuiltAndTag(linestyle)) {
return;
}
ID *linestyle_id = &linestyle->id;
build_parameters(linestyle_id);
build_animdata(linestyle_id);
build_nodetree(linestyle->nodetree);
}
void DepsgraphNodeBuilder::build_movieclip(MovieClip *clip)
{
if (built_map_.checkIsBuiltAndTag(clip)) {

@ -35,6 +35,8 @@ struct CacheFile;
struct Camera;
struct Collection;
struct FCurve;
struct FreestyleLineSet;
struct FreestyleLineStyle;
struct GHash;
struct ID;
struct Image;
@ -201,6 +203,8 @@ class DepsgraphNodeBuilder : public DepsgraphBuilder {
virtual void build_nodetree(bNodeTree *ntree);
virtual void build_material(Material *ma);
virtual void build_materials(Material **materials, int num_materials);
virtual void build_freestyle_lineset(FreestyleLineSet *fls);
virtual void build_freestyle_linestyle(FreestyleLineStyle *linestyle);
virtual void build_texture(Tex *tex);
virtual void build_image(Image *image);
virtual void build_world(World *world);

@ -37,6 +37,7 @@
extern "C" {
#include "DNA_freestyle_types.h"
#include "DNA_layer_types.h"
#include "DNA_linestyle_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
@ -74,6 +75,16 @@ void DepsgraphNodeBuilder::build_layer_collections(ListBase *lb)
}
}
void DepsgraphNodeBuilder::build_freestyle_lineset(FreestyleLineSet *fls)
{
if (fls->group != NULL) {
build_collection(NULL, fls->group);
}
if (fls->linestyle != NULL) {
build_freestyle_linestyle(fls->linestyle);
}
}
void DepsgraphNodeBuilder::build_view_layer(Scene *scene,
ViewLayer *view_layer,
eDepsNode_LinkedState_Type linked_state)
@ -140,11 +151,9 @@ void DepsgraphNodeBuilder::build_view_layer(Scene *scene,
if (view_layer->mat_override != NULL) {
build_material(view_layer->mat_override);
}
/* Freestyle collections. */
/* Freestyle linesets. */
LISTBASE_FOREACH (FreestyleLineSet *, fls, &view_layer->freestyle_config.linesets) {
if (fls->group != NULL) {
build_collection(NULL, fls->group);
}
build_freestyle_lineset(fls);
}
/* Sequencer. */
if (linked_state == DEG_ID_LINKED_DIRECTLY) {

@ -47,6 +47,7 @@ extern "C" {
#include "DNA_gpencil_types.h"
#include "DNA_key_types.h"
#include "DNA_light_types.h"
#include "DNA_linestyle_types.h"
#include "DNA_material_types.h"
#include "DNA_mask_types.h"
#include "DNA_mesh_types.h"
@ -536,6 +537,9 @@ void DepsgraphRelationBuilder::build_id(ID *id)
case ID_MSK:
build_mask((Mask *)id);
break;
case ID_LS:
build_freestyle_linestyle((FreestyleLineStyle *)id);
break;
case ID_MC:
build_movieclip((MovieClip *)id);
break;
@ -2429,6 +2433,18 @@ void DepsgraphRelationBuilder::build_mask(Mask *mask)
}
}
void DepsgraphRelationBuilder::build_freestyle_linestyle(FreestyleLineStyle *linestyle)
{
if (built_map_.checkIsBuiltAndTag(linestyle)) {
return;
}
ID *linestyle_id = &linestyle->id;
build_parameters(linestyle_id);
build_animdata(linestyle_id);
build_nodetree(linestyle->nodetree);
}
void DepsgraphRelationBuilder::build_movieclip(MovieClip *clip)
{
if (built_map_.checkIsBuiltAndTag(clip)) {

@ -51,6 +51,8 @@ struct Camera;
struct Collection;
struct EffectorWeights;
struct FCurve;
struct FreestyleLineSet;
struct FreestyleLineStyle;
struct ID;
struct Image;
struct Key;
@ -264,6 +266,8 @@ class DepsgraphRelationBuilder : public DepsgraphBuilder {
virtual void build_nodetree(bNodeTree *ntree);
virtual void build_material(Material *ma);
virtual void build_materials(Material **materials, int num_materials);
virtual void build_freestyle_lineset(FreestyleLineSet *fls);
virtual void build_freestyle_linestyle(FreestyleLineStyle *linestyle);
virtual void build_texture(Tex *tex);
virtual void build_image(Image *image);
virtual void build_gpencil(bGPdata *gpd);

@ -35,6 +35,7 @@
#include "BLI_blenlib.h"
extern "C" {
#include "DNA_linestyle_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
@ -75,6 +76,16 @@ void DepsgraphRelationBuilder::build_layer_collections(ListBase *lb)
}
}
void DepsgraphRelationBuilder::build_freestyle_lineset(FreestyleLineSet *fls)
{
if (fls->group != NULL) {
build_collection(NULL, NULL, fls->group);
}
if (fls->linestyle != NULL) {
build_freestyle_linestyle(fls->linestyle);
}
}
void DepsgraphRelationBuilder::build_view_layer(Scene *scene,
ViewLayer *view_layer,
eDepsNode_LinkedState_Type linked_state)
@ -120,11 +131,9 @@ void DepsgraphRelationBuilder::build_view_layer(Scene *scene,
if (view_layer->mat_override != NULL) {
build_material(view_layer->mat_override);
}
/* Freestyle collections. */
/* Freestyle linesets. */
LISTBASE_FOREACH (FreestyleLineSet *, fls, &view_layer->freestyle_config.linesets) {
if (fls->group != NULL) {
build_collection(NULL, NULL, fls->group);
}
build_freestyle_lineset(fls);
}
/* Scene parameters, compositor and such. */
build_scene_compositor(scene);

@ -499,21 +499,6 @@ BLI_INLINE bool check_datablock_expanded(const ID *id_cow)
return (id_cow->name[0] != '\0');
}
/* Those are data-blocks which are not covered by dependency graph and hence
* does not need any remapping or anything.
*
* TODO(sergey): How to make it more robust for the future, so we don't have
* to maintain exception lists all over the code? */
bool check_datablocks_copy_on_writable(const ID *id_orig)
{
const ID_Type id_type = GS(id_orig->name);
/* We shouldn't bother if copied ID is same as original one. */
if (!deg_copy_on_write_is_needed(id_orig)) {
return false;
}
return !ELEM(id_type, ID_BR, ID_LS, ID_PAL);
}
/* Callback for BKE_library_foreach_ID_link which remaps original ID pointer
* with the one created by CoW system. */
@ -536,7 +521,7 @@ int foreach_libblock_remap_callback(void *user_data_v, ID *id_self, ID **id_p, i
RemapCallbackUserData *user_data = (RemapCallbackUserData *)user_data_v;
const Depsgraph *depsgraph = user_data->depsgraph;
ID *id_orig = *id_p;
if (check_datablocks_copy_on_writable(id_orig)) {
if (deg_copy_on_write_is_needed(id_orig)) {
ID *id_cow;
if (user_data->create_placeholders) {
/* Special workaround to stop creating temp datablocks for
@ -1123,7 +1108,7 @@ bool deg_copy_on_write_is_expanded(const ID *id_cow)
bool deg_copy_on_write_is_needed(const ID *id_orig)
{
const ID_Type id_type = GS(id_orig->name);
return !ELEM(id_type, ID_IM);
return ID_TYPE_IS_COW(id_type);
}
} // namespace DEG

@ -457,9 +457,8 @@ typedef enum ID_Type {
(!ID_IS_LINKED((_id)) && ID_IS_OVERRIDE_LIBRARY((_id)) && \
(((ID *)(_id))->override_library->flag & OVERRIDE_LIBRARY_AUTO))
/* No copy-on-write for these types.
* Keep in sync with check_datablocks_copy_on_writable and deg_copy_on_write_is_needed */
#define ID_TYPE_IS_COW(_id_type) (!ELEM(_id_type, ID_BR, ID_LS, ID_PAL, ID_IM))
/* Check whether datablock type is covered by copy-on-write. */
#define ID_TYPE_IS_COW(_id_type) (!ELEM(_id_type, ID_BR, ID_PAL, ID_IM))
#ifdef GS
# undef GS

@ -178,7 +178,7 @@ ModifierTypeInfo modifierType_DynamicPaint = {
/* structSize */ sizeof(DynamicPaintModifierData),
/* type */ eModifierTypeType_Constructive,
/* flags */ eModifierTypeFlag_AcceptsMesh |
/* eModifierTypeFlag_SupportsMapping |*/
eModifierTypeFlag_SupportsMapping |
eModifierTypeFlag_UsesPointCache | eModifierTypeFlag_Single |
eModifierTypeFlag_UsesPreview,