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) ||
|
if ((mode == PTCACHE_CLEAR_BEFORE && frame < cfra) ||
|
||||||
(mode == PTCACHE_CLEAR_AFTER && frame > cfra))
|
(mode == PTCACHE_CLEAR_AFTER && frame > cfra))
|
||||||
{
|
{
|
||||||
|
|
||||||
BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name);
|
BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name);
|
||||||
BLI_delete(path_full, false, false);
|
BLI_delete(path_full, false, false);
|
||||||
if (pid->cache->cached_frames && frame >=sta && frame <= end)
|
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
|
#if 0
|
||||||
for (ExecutionSystem::Operations::const_iterator it = system->m_operations.begin();
|
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;
|
NodeOperation *op = *it;
|
||||||
len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "// OPERATION: %s\r\n", node->getbNode()->typeinfo->ui_name);
|
len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "// OPERATION: %s\r\n", node->getbNode()->typeinfo->ui_name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,10 +145,10 @@ static void GPENCIL_render_update_viewvecs(float invproj[4][4], float winmat[4][
|
|||||||
/* view vectors for the corners of the view frustum.
|
/* view vectors for the corners of the view frustum.
|
||||||
* Can be used to recreate the world space position easily */
|
* Can be used to recreate the world space position easily */
|
||||||
float view_vecs[4][4] = {
|
float view_vecs[4][4] = {
|
||||||
{ -1.0f, -1.0f, -1.0f, 1.0f },
|
{-1.0f, -1.0f, -1.0f, 1.0f},
|
||||||
{ 1.0f, -1.0f, -1.0f, 1.0f },
|
{1.0f, -1.0f, -1.0f, 1.0f},
|
||||||
{ -1.0f, 1.0f, -1.0f, 1.0f },
|
{-1.0f, 1.0f, -1.0f, 1.0f},
|
||||||
{ -1.0f, -1.0f, 1.0f, 1.0f }
|
{-1.0f, -1.0f, 1.0f, 1.0f}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* convert the view vectors to view space */
|
/* convert the view vectors to view space */
|
||||||
|
|||||||
@@ -683,9 +683,9 @@ static int gp_frame_clean_fill_exec(bContext *C, wmOperator *op)
|
|||||||
void GPENCIL_OT_frame_clean_fill(wmOperatorType *ot)
|
void GPENCIL_OT_frame_clean_fill(wmOperatorType *ot)
|
||||||
{
|
{
|
||||||
static const EnumPropertyItem duplicate_mode[] = {
|
static const EnumPropertyItem duplicate_mode[] = {
|
||||||
{ GP_FRAME_CLEAN_FILL_ACTIVE, "ACTIVE", 0, "Active Frame Only", "Clean active frame only" },
|
{GP_FRAME_CLEAN_FILL_ACTIVE, "ACTIVE", 0, "Active Frame Only", "Clean active frame only"},
|
||||||
{ GP_FRAME_CLEAN_FILL_ALL, "ALL", 0, "All Frames", "Clean all frames in all layers" },
|
{GP_FRAME_CLEAN_FILL_ALL, "ALL", 0, "All Frames", "Clean all frames in all layers"},
|
||||||
{ 0, NULL, 0, NULL, NULL }
|
{0, NULL, 0, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* identifiers */
|
/* identifiers */
|
||||||
|
|||||||
@@ -3330,10 +3330,10 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
|
|||||||
void GPENCIL_OT_stroke_separate(wmOperatorType *ot)
|
void GPENCIL_OT_stroke_separate(wmOperatorType *ot)
|
||||||
{
|
{
|
||||||
static const EnumPropertyItem separate_type[] = {
|
static const EnumPropertyItem separate_type[] = {
|
||||||
{GP_SEPARATE_POINT, "POINT", 0, "Selected Points", "Separate the selected points" },
|
{GP_SEPARATE_POINT, "POINT", 0, "Selected Points", "Separate the selected points"},
|
||||||
{GP_SEPARATE_STROKE, "STROKE", 0, "Selected Strokes", "Separate the selected strokes"},
|
{GP_SEPARATE_STROKE, "STROKE", 0, "Selected Strokes", "Separate the selected strokes"},
|
||||||
{GP_SEPARATE_LAYER, "LAYER", 0, "Active Layer", "Separate the strokes of the current layer" },
|
{GP_SEPARATE_LAYER, "LAYER", 0, "Active Layer", "Separate the strokes of the current layer"},
|
||||||
{ 0, NULL, 0, NULL, NULL }
|
{0, NULL, 0, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* identifiers */
|
/* identifiers */
|
||||||
|
|||||||
@@ -3764,7 +3764,8 @@ static void brush_add_count_iter(
|
|||||||
&min_d,
|
&min_d,
|
||||||
&add_pars[iter].num_dmcache,
|
&add_pars[iter].num_dmcache,
|
||||||
add_pars[iter].fuv,
|
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) {
|
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 = add_pars[iter].num_dmcache;
|
||||||
add_pars[iter].num_dmcache = DMCACHE_ISCHILD;
|
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(
|
static struct ParticleSystem *psys_eval_get(
|
||||||
Depsgraph *depsgraph,
|
Depsgraph *depsgraph,
|
||||||
Object *object,
|
Object *object,
|
||||||
ParticleSystem *psys){
|
ParticleSystem *psys)
|
||||||
|
{
|
||||||
Object *object_eval = DEG_get_evaluated_object(depsgraph, object);
|
Object *object_eval = DEG_get_evaluated_object(depsgraph, object);
|
||||||
if (object_eval == object) {
|
if (object_eval == object) {
|
||||||
return psys;
|
return psys;
|
||||||
|
|||||||
@@ -307,18 +307,61 @@ static void prepare(Render *re, ViewLayer *view_layer)
|
|||||||
if (G.debug & G_DEBUG_FREESTYLE) {
|
if (G.debug & G_DEBUG_FREESTYLE) {
|
||||||
cout << "Modules :" << endl;
|
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) {
|
if (G.debug & G_DEBUG_FREESTYLE) {
|
||||||
cout << " " << layer_count + 1 << ": " << id_name;
|
|
||||||
if (module_conf->script->name)
|
|
||||||
cout << " (" << module_conf->script->name << ")";
|
|
||||||
cout << endl;
|
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->InsertStyleModule(layer_count, id_name, module_conf->script);
|
||||||
controller->toggleLayer(layer_count, true);
|
controller->toggleLayer(layer_count, true);
|
||||||
layer_count++;
|
layer_count++;
|
||||||
@@ -359,7 +402,7 @@ static void prepare(Render *re, ViewLayer *view_layer)
|
|||||||
cout << " " << layer_count+1 << ": " << lineset->name << " - " <<
|
cout << " " << layer_count+1 << ": " << lineset->name << " - " <<
|
||||||
(lineset->linestyle ? (lineset->linestyle->id.name + 2) : "<NULL>") << endl;
|
(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->InsertStyleModule(layer_count, lineset->name, buffer);
|
||||||
controller->toggleLayer(layer_count, true);
|
controller->toggleLayer(layer_count, true);
|
||||||
MEM_freeN(buffer);
|
MEM_freeN(buffer);
|
||||||
|
|||||||
@@ -573,7 +573,8 @@ void FEdgeXDetector::ProcessSuggestiveContourFace(WXFace *iFace)
|
|||||||
real threshold = _meanKr;
|
real threshold = _meanKr;
|
||||||
if (faceLayer->nPosDotP()!=numVertices) {
|
if (faceLayer->nPosDotP()!=numVertices) {
|
||||||
if ((fabs(faceLayer->dotP(0)) < threshold) && (fabs(faceLayer->dotP(1)) < threshold) &&
|
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(0, 0);
|
||||||
faceLayer->ReplaceDotP(1, 0);
|
faceLayer->ReplaceDotP(1, 0);
|
||||||
faceLayer->ReplaceDotP(2, 0);
|
faceLayer->ReplaceDotP(2, 0);
|
||||||
|
|||||||
@@ -1947,7 +1947,8 @@ int ViewMapBuilder::ComputeRayCastingVisibility(FEdge *fe, Grid *iGrid, real eps
|
|||||||
int viewport[4];
|
int viewport[4];
|
||||||
SilhouetteGeomEngine::retrieveViewport(viewport);
|
SilhouetteGeomEngine::retrieveViewport(viewport);
|
||||||
if ((A.x() < viewport[0]) || (A.x() > viewport[2]) || (A.y() < viewport[1]) || (A.y() > viewport[3]) ||
|
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;
|
cerr << "Warning: point is out of the grid for fedge " << fe->getId() << endl;
|
||||||
//return 0;
|
//return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -961,8 +961,8 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
|
|||||||
|
|
||||||
/* Grease Pencil Drawing - generated dynamically */
|
/* Grease Pencil Drawing - generated dynamically */
|
||||||
static const EnumPropertyItem prop_dynamic_gpencil_type[] = {
|
static const EnumPropertyItem prop_dynamic_gpencil_type[] = {
|
||||||
{ 1, "DRAW", 0, "Draw", "" },
|
{1, "DRAW", 0, "Draw", ""},
|
||||||
{ 0, NULL, 0, NULL, NULL }
|
{0, NULL, 0, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
srna = RNA_def_struct(brna, "BrushGpencilSettings", NULL);
|
srna = RNA_def_struct(brna, "BrushGpencilSettings", NULL);
|
||||||
|
|||||||
@@ -590,7 +590,8 @@ bool RE_bake_pixels_populate_from_objects(
|
|||||||
/* cast ray */
|
/* cast ray */
|
||||||
if (!cast_ray_highpoly(treeData, tri_low, tris_high,
|
if (!cast_ray_highpoly(treeData, tri_low, tris_high,
|
||||||
pixel_array_from, pixel_array_to, mat_low,
|
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 */
|
/* if it fails mask out the original pixel array */
|
||||||
pixel_array_from[i].primitive_id = -1;
|
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. */
|
/* Skip non-RGBA and Z passes if not using multi layer. */
|
||||||
if (!multi_layer && !(STREQ(rp->name, RE_PASSNAME_COMBINED) ||
|
if (!multi_layer && !(STREQ(rp->name, RE_PASSNAME_COMBINED) ||
|
||||||
STREQ(rp->name, "") ||
|
STREQ(rp->name, "") ||
|
||||||
(STREQ(rp->name, RE_PASSNAME_Z) && write_z))) {
|
(STREQ(rp->name, RE_PASSNAME_Z) && write_z)))
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user