Merge branch 'master' into blender2.8
This commit is contained in:
@@ -3033,7 +3033,6 @@ void BKE_ptcache_id_clear(PTCacheID *pid, int mode, unsigned int cfra)
|
||||
if ((mode == PTCACHE_CLEAR_BEFORE && frame < cfra) ||
|
||||
(mode == PTCACHE_CLEAR_AFTER && frame > cfra))
|
||||
{
|
||||
|
||||
BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name);
|
||||
BLI_delete(path_full, false, false);
|
||||
if (pid->cache->cached_frames && frame >=sta && frame <= end)
|
||||
|
@@ -274,7 +274,8 @@ bool DebugInfo::graphviz_system(const ExecutionSystem *system, char *str, int ma
|
||||
|
||||
#if 0
|
||||
for (ExecutionSystem::Operations::const_iterator it = system->m_operations.begin();
|
||||
it != system->m_operations.end(); ++it) {
|
||||
it != system->m_operations.end(); ++it)
|
||||
{
|
||||
NodeOperation *op = *it;
|
||||
len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "// OPERATION: %s\r\n", node->getbNode()->typeinfo->ui_name);
|
||||
}
|
||||
|
@@ -3764,7 +3764,8 @@ static void brush_add_count_iter(
|
||||
&min_d,
|
||||
&add_pars[iter].num_dmcache,
|
||||
add_pars[iter].fuv,
|
||||
0, 0, 0, 0)) {
|
||||
0, 0, 0, 0))
|
||||
{
|
||||
if (psys->part->use_modifier_stack && !psmd_eval->mesh_final->runtime.deformed_only) {
|
||||
add_pars[iter].num = add_pars[iter].num_dmcache;
|
||||
add_pars[iter].num_dmcache = DMCACHE_ISCHILD;
|
||||
@@ -4645,7 +4646,8 @@ int PE_minmax(Scene *scene, ViewLayer *view_layer, float min[3], float max[3])
|
||||
static struct ParticleSystem *psys_eval_get(
|
||||
Depsgraph *depsgraph,
|
||||
Object *object,
|
||||
ParticleSystem *psys){
|
||||
ParticleSystem *psys)
|
||||
{
|
||||
Object *object_eval = DEG_get_evaluated_object(depsgraph, object);
|
||||
if (object_eval == object) {
|
||||
return psys;
|
||||
|
@@ -307,18 +307,61 @@ static void prepare(Render *re, ViewLayer *view_layer)
|
||||
if (G.debug & G_DEBUG_FREESTYLE) {
|
||||
cout << "Modules :" << endl;
|
||||
}
|
||||
for (FreestyleModuleConfig *module_conf = (FreestyleModuleConfig *)config->modules.first;
|
||||
module_conf;
|
||||
module_conf = module_conf->next)
|
||||
{
|
||||
if (module_conf->script && module_conf->is_displayed) {
|
||||
const char *id_name = module_conf->script->id.name + 2;
|
||||
}
|
||||
if (G.debug & G_DEBUG_FREESTYLE) {
|
||||
cout << " " << layer_count + 1 << ": " << id_name;
|
||||
if (module_conf->script->name)
|
||||
cout << " (" << module_conf->script->name << ")";
|
||||
cout << endl;
|
||||
}
|
||||
controller->setComputeRidgesAndValleysFlag((config->flags & FREESTYLE_RIDGES_AND_VALLEYS_FLAG) ? true : false);
|
||||
controller->setComputeSuggestiveContoursFlag((config->flags & FREESTYLE_SUGGESTIVE_CONTOURS_FLAG) ? true : false);
|
||||
controller->setComputeMaterialBoundariesFlag((config->flags & FREESTYLE_MATERIAL_BOUNDARIES_FLAG) ? true : false);
|
||||
break;
|
||||
case FREESTYLE_CONTROL_EDITOR_MODE:
|
||||
int use_ridges_and_valleys = 0;
|
||||
int use_suggestive_contours = 0;
|
||||
int use_material_boundaries = 0;
|
||||
struct edge_type_condition conditions[] = {
|
||||
{FREESTYLE_FE_SILHOUETTE, 0},
|
||||
{FREESTYLE_FE_BORDER, 0},
|
||||
{FREESTYLE_FE_CREASE, 0},
|
||||
{FREESTYLE_FE_RIDGE_VALLEY, 0},
|
||||
{FREESTYLE_FE_SUGGESTIVE_CONTOUR, 0},
|
||||
{FREESTYLE_FE_MATERIAL_BOUNDARY, 0},
|
||||
{FREESTYLE_FE_CONTOUR, 0},
|
||||
{FREESTYLE_FE_EXTERNAL_CONTOUR, 0},
|
||||
{FREESTYLE_FE_EDGE_MARK, 0}
|
||||
};
|
||||
int num_edge_types = sizeof(conditions) / sizeof(struct edge_type_condition);
|
||||
if (G.debug & G_DEBUG_FREESTYLE) {
|
||||
cout << "Linesets:" << endl;
|
||||
}
|
||||
for (FreestyleLineSet *lineset = (FreestyleLineSet *)config->linesets.first;
|
||||
lineset;
|
||||
lineset = lineset->next)
|
||||
{
|
||||
if (lineset->flags & FREESTYLE_LINESET_ENABLED) {
|
||||
if (G.debug & G_DEBUG_FREESTYLE) {
|
||||
cout << " " << layer_count+1 << ": " << lineset->name << " - " <<
|
||||
(lineset->linestyle ? (lineset->linestyle->id.name + 2) : "<NULL>") << endl;
|
||||
}
|
||||
char *buffer = create_lineset_handler(view_layer->name, lineset->name);
|
||||
controller->InsertStyleModule(layer_count, lineset->name, buffer);
|
||||
controller->toggleLayer(layer_count, true);
|
||||
MEM_freeN(buffer);
|
||||
if (!(lineset->selection & FREESTYLE_SEL_EDGE_TYPES) || !lineset->edge_types) {
|
||||
++use_ridges_and_valleys;
|
||||
++use_suggestive_contours;
|
||||
++use_material_boundaries;
|
||||
}
|
||||
else {
|
||||
// conditions for feature edge selection by edge types
|
||||
for (int i = 0; i < num_edge_types; i++) {
|
||||
if (!(lineset->edge_types & conditions[i].edge_type))
|
||||
conditions[i].value = 0; // no condition specified
|
||||
else if (!(lineset->exclude_edge_types & conditions[i].edge_type))
|
||||
conditions[i].value = 1; // condition: X
|
||||
else
|
||||
conditions[i].value = -1; // condition: NOT X
|
||||
}
|
||||
controller->InsertStyleModule(layer_count, id_name, module_conf->script);
|
||||
controller->toggleLayer(layer_count, true);
|
||||
layer_count++;
|
||||
@@ -359,7 +402,7 @@ static void prepare(Render *re, ViewLayer *view_layer)
|
||||
cout << " " << layer_count+1 << ": " << lineset->name << " - " <<
|
||||
(lineset->linestyle ? (lineset->linestyle->id.name + 2) : "<NULL>") << endl;
|
||||
}
|
||||
char *buffer = create_lineset_handler(view_layer->name, lineset->name);
|
||||
char *buffer = create_lineset_handler(srl->name, lineset->name);
|
||||
controller->InsertStyleModule(layer_count, lineset->name, buffer);
|
||||
controller->toggleLayer(layer_count, true);
|
||||
MEM_freeN(buffer);
|
||||
|
@@ -573,7 +573,8 @@ void FEdgeXDetector::ProcessSuggestiveContourFace(WXFace *iFace)
|
||||
real threshold = _meanKr;
|
||||
if (faceLayer->nPosDotP()!=numVertices) {
|
||||
if ((fabs(faceLayer->dotP(0)) < threshold) && (fabs(faceLayer->dotP(1)) < threshold) &&
|
||||
(fabs(faceLayer->dotP(2)) < threshold)) {
|
||||
(fabs(faceLayer->dotP(2)) < threshold))
|
||||
{
|
||||
faceLayer->ReplaceDotP(0, 0);
|
||||
faceLayer->ReplaceDotP(1, 0);
|
||||
faceLayer->ReplaceDotP(2, 0);
|
||||
|
@@ -1947,7 +1947,8 @@ int ViewMapBuilder::ComputeRayCastingVisibility(FEdge *fe, Grid *iGrid, real eps
|
||||
int viewport[4];
|
||||
SilhouetteGeomEngine::retrieveViewport(viewport);
|
||||
if ((A.x() < viewport[0]) || (A.x() > viewport[2]) || (A.y() < viewport[1]) || (A.y() > viewport[3]) ||
|
||||
(B.x() < viewport[0]) || (B.x() > viewport[2]) || (B.y() < viewport[1]) || (B.y() > viewport[3])) {
|
||||
(B.x() < viewport[0]) || (B.x() > viewport[2]) || (B.y() < viewport[1]) || (B.y() > viewport[3]))
|
||||
{
|
||||
cerr << "Warning: point is out of the grid for fedge " << fe->getId() << endl;
|
||||
//return 0;
|
||||
}
|
||||
|
@@ -590,7 +590,8 @@ bool RE_bake_pixels_populate_from_objects(
|
||||
/* cast ray */
|
||||
if (!cast_ray_highpoly(treeData, tri_low, tris_high,
|
||||
pixel_array_from, pixel_array_to, mat_low,
|
||||
highpoly, co, dir, i, tot_highpoly)) {
|
||||
highpoly, co, dir, i, tot_highpoly))
|
||||
{
|
||||
/* if it fails mask out the original pixel array */
|
||||
pixel_array_from[i].primitive_id = -1;
|
||||
}
|
||||
|
@@ -882,7 +882,8 @@ bool RE_WriteRenderResult(ReportList *reports, RenderResult *rr, const char *fil
|
||||
/* Skip non-RGBA and Z passes if not using multi layer. */
|
||||
if (!multi_layer && !(STREQ(rp->name, RE_PASSNAME_COMBINED) ||
|
||||
STREQ(rp->name, "") ||
|
||||
(STREQ(rp->name, RE_PASSNAME_Z) && write_z))) {
|
||||
(STREQ(rp->name, RE_PASSNAME_Z) && write_z)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user