Merge branch 'master' into blender2.8
This commit is contained in:
@@ -283,7 +283,7 @@ void DepsgraphRelationBuilder::add_time_relation(TimeSourceDepsNode *timesrc,
|
|||||||
graph_->add_new_relation(timesrc, node_to, description, check_unique);
|
graph_->add_new_relation(timesrc, node_to, description, check_unique);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEG_DEBUG_PRINTF("add_time_relation(%p = %s, %p = %s, %s) Failed\n",
|
DEG_DEBUG_PRINTF(BUILD, "add_time_relation(%p = %s, %p = %s, %s) Failed\n",
|
||||||
timesrc, (timesrc) ? timesrc->identifier().c_str() : "<None>",
|
timesrc, (timesrc) ? timesrc->identifier().c_str() : "<None>",
|
||||||
node_to, (node_to) ? node_to->identifier().c_str() : "<None>",
|
node_to, (node_to) ? node_to->identifier().c_str() : "<None>",
|
||||||
description);
|
description);
|
||||||
@@ -300,7 +300,7 @@ void DepsgraphRelationBuilder::add_operation_relation(
|
|||||||
graph_->add_new_relation(node_from, node_to, description, check_unique);
|
graph_->add_new_relation(node_from, node_to, description, check_unique);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEG_DEBUG_PRINTF("add_operation_relation(%p = %s, %p = %s, %s) Failed\n",
|
DEG_DEBUG_PRINTF(BUILD, "add_operation_relation(%p = %s, %p = %s, %s) Failed\n",
|
||||||
node_from, (node_from) ? node_from->identifier().c_str() : "<None>",
|
node_from, (node_from) ? node_from->identifier().c_str() : "<None>",
|
||||||
node_to, (node_to) ? node_to->identifier().c_str() : "<None>",
|
node_to, (node_to) ? node_to->identifier().c_str() : "<None>",
|
||||||
description);
|
description);
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *object,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEG_DEBUG_PRINTF("\nStarting IK Build: pchan = %s, target = (%s, %s), segcount = %d\n",
|
DEG_DEBUG_PRINTF(BUILD, "\nStarting IK Build: pchan = %s, target = (%s, %s), segcount = %d\n",
|
||||||
pchan->name, data->tar->id.name, data->subtarget, data->rootbone);
|
pchan->name, data->tar->id.name, data->subtarget, data->rootbone);
|
||||||
|
|
||||||
bPoseChannel *parchan = pchan;
|
bPoseChannel *parchan = pchan;
|
||||||
@@ -218,7 +218,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *object,
|
|||||||
root_map->add_bone(parchan->name, rootchan->name);
|
root_map->add_bone(parchan->name, rootchan->name);
|
||||||
|
|
||||||
/* continue up chain, until we reach target number of items... */
|
/* continue up chain, until we reach target number of items... */
|
||||||
DEG_DEBUG_PRINTF(" %d = %s\n", segcount, parchan->name);
|
DEG_DEBUG_PRINTF(BUILD, " %d = %s\n", segcount, parchan->name);
|
||||||
segcount++;
|
segcount++;
|
||||||
if ((segcount == data->rootbone) || (segcount > 255)) break; /* 255 is weak */
|
if ((segcount == data->rootbone) || (segcount > 255)) break; /* 255 is weak */
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ void deg_graph_transitive_reduction(Depsgraph *graph)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DEG_DEBUG_PRINTF("Removed %d relations\n", num_removed_relations);
|
DEG_DEBUG_PRINTF(BUILD, "Removed %d relations\n", num_removed_relations);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace DEG
|
} // namespace DEG
|
||||||
|
|||||||
@@ -32,16 +32,12 @@
|
|||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
// #define DEBUG_TIME
|
|
||||||
|
|
||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
#include "BLI_ghash.h"
|
#include "BLI_ghash.h"
|
||||||
#include "BLI_listbase.h"
|
#include "BLI_listbase.h"
|
||||||
|
|
||||||
#ifdef DEBUG_TIME
|
#include "PIL_time.h"
|
||||||
# include "PIL_time.h"
|
#include "PIL_time_utildefines.h"
|
||||||
# include "PIL_time_utildefines.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "DNA_cachefile_types.h"
|
#include "DNA_cachefile_types.h"
|
||||||
@@ -202,9 +198,10 @@ void DEG_graph_build_from_view_layer(Depsgraph *graph,
|
|||||||
Scene *scene,
|
Scene *scene,
|
||||||
ViewLayer *view_layer)
|
ViewLayer *view_layer)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_TIME
|
double start_time;
|
||||||
TIMEIT_START(DEG_graph_build_from_view_layer);
|
if (G.debug & G_DEBUG_DEPSGRAPH_BUILD) {
|
||||||
#endif
|
start_time = PIL_check_seconds_timer();
|
||||||
|
}
|
||||||
|
|
||||||
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
|
DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
|
||||||
BLI_assert(BLI_findindex(&scene->view_layers, view_layer) != -1);
|
BLI_assert(BLI_findindex(&scene->view_layers, view_layer) != -1);
|
||||||
@@ -257,16 +254,17 @@ void DEG_graph_build_from_view_layer(Depsgraph *graph,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_TIME
|
|
||||||
TIMEIT_END(DEG_graph_build_from_view_layer);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Relations are up to date. */
|
/* Relations are up to date. */
|
||||||
deg_graph->need_update = false;
|
deg_graph->need_update = false;
|
||||||
|
|
||||||
if (need_on_visible_update) {
|
if (need_on_visible_update) {
|
||||||
DEG_graph_on_visible_update(bmain, graph);
|
DEG_graph_on_visible_update(bmain, graph);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (G.debug & G_DEBUG_DEPSGRAPH_BUILD) {
|
||||||
|
printf("Depsgraph built in %f seconds.\n",
|
||||||
|
PIL_check_seconds_timer() - start_time);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tag graph relations for update. */
|
/* Tag graph relations for update. */
|
||||||
@@ -293,7 +291,7 @@ void DEG_graph_relations_update(Depsgraph *graph,
|
|||||||
/* Tag all relations for update. */
|
/* Tag all relations for update. */
|
||||||
void DEG_relations_tag_update(Main *bmain)
|
void DEG_relations_tag_update(Main *bmain)
|
||||||
{
|
{
|
||||||
DEG_DEBUG_PRINTF("%s: Tagging relations for update.\n", __func__);
|
DEG_DEBUG_PRINTF(TAG, "%s: Tagging relations for update.\n", __func__);
|
||||||
LISTBASE_FOREACH (Scene *, scene, &bmain->scene) {
|
LISTBASE_FOREACH (Scene *, scene, &bmain->scene) {
|
||||||
LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) {
|
LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) {
|
||||||
Depsgraph *depsgraph =
|
Depsgraph *depsgraph =
|
||||||
@@ -341,21 +339,19 @@ void DEG_add_forcefield_relations(DepsNodeHandle *handle,
|
|||||||
const char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
ListBase *effectors = pdInitEffectors(NULL, scene, object, NULL, effector_weights, false);
|
ListBase *effectors = pdInitEffectors(NULL, scene, object, NULL, effector_weights, false);
|
||||||
|
if (effectors == NULL) {
|
||||||
if (effectors) {
|
return;
|
||||||
|
}
|
||||||
for (EffectorCache *eff = (EffectorCache*)effectors->first; eff; eff = eff->next) {
|
for (EffectorCache *eff = (EffectorCache*)effectors->first; eff; eff = eff->next) {
|
||||||
if (eff->ob != object && eff->pd->forcefield != skip_forcefield) {
|
if (eff->ob != object && eff->pd->forcefield != skip_forcefield) {
|
||||||
DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_TRANSFORM, name);
|
DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_TRANSFORM, name);
|
||||||
|
|
||||||
if (eff->psys) {
|
if (eff->psys) {
|
||||||
DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_EVAL_PARTICLES, name);
|
DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_EVAL_PARTICLES, name);
|
||||||
|
|
||||||
/* TODO: remove this when/if EVAL_PARTICLES is sufficient
|
/* TODO: remove this when/if EVAL_PARTICLES is sufficient
|
||||||
* for up to date particles.
|
* for up to date particles.
|
||||||
*/
|
*/
|
||||||
DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_GEOMETRY, name);
|
DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_GEOMETRY, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eff->pd->forcefield == PFIELD_SMOKEFLOW && eff->pd->f_source) {
|
if (eff->pd->forcefield == PFIELD_SMOKEFLOW && eff->pd->f_source) {
|
||||||
DEG_add_object_relation(handle,
|
DEG_add_object_relation(handle,
|
||||||
eff->pd->f_source,
|
eff->pd->f_source,
|
||||||
@@ -366,7 +362,6 @@ void DEG_add_forcefield_relations(DepsNodeHandle *handle,
|
|||||||
DEG_OB_COMP_GEOMETRY,
|
DEG_OB_COMP_GEOMETRY,
|
||||||
"Smoke Force Domain");
|
"Smoke Force Domain");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (add_absorption && (eff->pd->flag & PFIELD_VISIBILITY)) {
|
if (add_absorption && (eff->pd->flag & PFIELD_VISIBILITY)) {
|
||||||
DEG_add_collision_relations(handle,
|
DEG_add_collision_relations(handle,
|
||||||
scene,
|
scene,
|
||||||
@@ -379,7 +374,5 @@ void DEG_add_forcefield_relations(DepsNodeHandle *handle,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pdEndEffectors(&effectors);
|
pdEndEffectors(&effectors);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,11 +112,10 @@ void deg_editors_id_update(const DEGEditorUpdateContext *update_ctx,
|
|||||||
void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx,
|
void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx,
|
||||||
bool updated);
|
bool updated);
|
||||||
|
|
||||||
#define DEG_DEBUG_PRINTF(...) \
|
#define DEG_DEBUG_PRINTF(type, ...) \
|
||||||
do { \
|
do { \
|
||||||
if (G.debug & G_DEBUG_DEPSGRAPH_BUILD) { \
|
if (G.debug & G_DEBUG_DEPSGRAPH_ ## type) { \
|
||||||
fprintf(stderr, __VA_ARGS__); \
|
fprintf(stderr, __VA_ARGS__); \
|
||||||
fflush(stderr); \
|
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ void flush_editors_id_update(Main *bmain,
|
|||||||
id_cow->recalc |= factory->id_recalc_tag();
|
id_cow->recalc |= factory->id_recalc_tag();
|
||||||
}
|
}
|
||||||
GHASH_FOREACH_END();
|
GHASH_FOREACH_END();
|
||||||
DEG_DEBUG_PRINTF("Accumulated recalc bits for %s: %u\n",
|
DEG_DEBUG_PRINTF(EVAL, "Accumulated recalc bits for %s: %u\n",
|
||||||
id_orig->name, (unsigned int)id_cow->recalc);
|
id_orig->name, (unsigned int)id_cow->recalc);
|
||||||
/* Inform editors. */
|
/* Inform editors. */
|
||||||
if (deg_copy_on_write_is_expanded(id_cow)) {
|
if (deg_copy_on_write_is_expanded(id_cow)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user