Merge branch 'master' into blender2.8

This commit is contained in:
Campbell Barton 2017-07-25 17:36:49 +10:00
commit 9bdd12d884
36 changed files with 140 additions and 76 deletions

1
.gitignore vendored
View File

@ -21,7 +21,6 @@ Desktop.ini
# commonly used paths in blender
/blender.bin
/user-config.py
/BUILD_NOTES.txt
# local patches

View File

@ -40,20 +40,20 @@ ccl_device_forceinline float D_ggx_aniso(const float3 wm, const float2 alpha)
}
/* Sample slope distribution (based on page 14 of the supplemental implementation). */
ccl_device_forceinline float2 mf_sampleP22_11(const float cosI, const float2 randU)
ccl_device_forceinline float2 mf_sampleP22_11(const float cosI, const float randx, const float randy)
{
if(cosI > 0.9999f || fabsf(cosI) < 1e-6f) {
const float r = sqrtf(randU.x / max(1.0f - randU.x, 1e-7f));
const float phi = M_2PI_F * randU.y;
const float r = sqrtf(randx / max(1.0f - randx, 1e-7f));
const float phi = M_2PI_F * randy;
return make_float2(r*cosf(phi), r*sinf(phi));
}
const float sinI = sqrtf(1.0f - cosI*cosI);
const float sinI = safe_sqrtf(1.0f - cosI*cosI);
const float tanI = sinI/cosI;
const float projA = 0.5f * (cosI + 1.0f);
if(projA < 0.0001f)
return make_float2(0.0f, 0.0f);
const float A = 2.0f*randU.x*projA / cosI - 1.0f;
const float A = 2.0f*randx*projA / cosI - 1.0f;
float tmp = A*A-1.0f;
if(fabsf(tmp) < 1e-7f)
return make_float2(0.0f, 0.0f);
@ -64,24 +64,24 @@ ccl_device_forceinline float2 mf_sampleP22_11(const float cosI, const float2 ran
const float slopeX = (A < 0.0f || slopeX2 > 1.0f/tanI)? (tanI*tmp - D) : slopeX2;
float U2;
if(randU.y >= 0.5f)
U2 = 2.0f*(randU.y - 0.5f);
if(randy >= 0.5f)
U2 = 2.0f*(randy - 0.5f);
else
U2 = 2.0f*(0.5f - randU.y);
U2 = 2.0f*(0.5f - randy);
const float z = (U2*(U2*(U2*0.27385f-0.73369f)+0.46341f)) / (U2*(U2*(U2*0.093073f+0.309420f)-1.0f)+0.597999f);
const float slopeY = z * sqrtf(1.0f + slopeX*slopeX);
if(randU.y >= 0.5f)
if(randy >= 0.5f)
return make_float2(slopeX, slopeY);
else
return make_float2(slopeX, -slopeY);
}
/* Visible normal sampling for the GGX distribution (based on page 7 of the supplemental implementation). */
ccl_device_forceinline float3 mf_sample_vndf(const float3 wi, const float2 alpha, const float2 randU)
ccl_device_forceinline float3 mf_sample_vndf(const float3 wi, const float2 alpha, const float randx, const float randy)
{
const float3 wi_11 = normalize(make_float3(alpha.x*wi.x, alpha.y*wi.y, wi.z));
const float2 slope_11 = mf_sampleP22_11(wi_11.z, randU);
const float2 slope_11 = mf_sampleP22_11(wi_11.z, randx, randy);
const float3 cossin_phi = safe_normalize(make_float3(wi_11.x, wi_11.y, 0.0f));
const float slope_x = alpha.x*(cossin_phi.x * slope_11.x - cossin_phi.y * slope_11.y);
@ -474,6 +474,7 @@ ccl_device int bsdf_microfacet_multi_ggx_sample(KernelGlobals *kg, const ShaderC
*eval *= *pdf;
*omega_in = X*localO.x + Y*localO.y + Z*localO.z;
#ifdef __RAY_DIFFERENTIALS__
*domega_in_dx = (2 * dot(Z, dIdx)) * Z - dIdx;
*domega_in_dy = (2 * dot(Z, dIdy)) * Z - dIdy;

View File

@ -100,11 +100,14 @@ ccl_device_forceinline float3 MF_FUNCTION_FULL_NAME(mf_eval)(
bool outside = true;
for(int order = 0; order < 10; order++) {
/* Sample microfacet height and normal */
if(!mf_sample_height(wr, &hr, &C1_r, &G1_r, &lambda_r, lcg_step_float_addrspace(lcg_state)))
/* Sample microfacet height. */
float height_rand = lcg_step_float_addrspace(lcg_state);
if(!mf_sample_height(wr, &hr, &C1_r, &G1_r, &lambda_r, height_rand))
break;
float3 wm = mf_sample_vndf(-wr, alpha, make_float2(lcg_step_float_addrspace(lcg_state),
lcg_step_float_addrspace(lcg_state)));
/* Sample microfacet normal. */
float vndf_rand_y = lcg_step_float_addrspace(lcg_state);
float vndf_rand_x = lcg_step_float_addrspace(lcg_state);
float3 wm = mf_sample_vndf(-wr, alpha, vndf_rand_x, vndf_rand_y);
#ifdef MF_MULTI_GLASS
if(order == 0 && use_fresnel) {
@ -136,7 +139,8 @@ ccl_device_forceinline float3 MF_FUNCTION_FULL_NAME(mf_eval)(
#ifdef MF_MULTI_GLASS
bool next_outside;
float3 wi_prev = -wr;
wr = mf_sample_phase_glass(-wr, outside? eta: 1.0f/eta, wm, lcg_step_float_addrspace(lcg_state), &next_outside);
float phase_rand = lcg_step_float_addrspace(lcg_state);
wr = mf_sample_phase_glass(-wr, outside? eta: 1.0f/eta, wm, phase_rand, &next_outside);
if(!next_outside) {
outside = !outside;
wr = -wr;
@ -204,14 +208,16 @@ ccl_device_forceinline float3 MF_FUNCTION_FULL_NAME(mf_sample)(
int order;
for(order = 0; order < 10; order++) {
/* Sample microfacet height. */
if(!mf_sample_height(wr, &hr, &C1_r, &G1_r, &lambda_r, lcg_step_float_addrspace(lcg_state))) {
float height_rand = lcg_step_float_addrspace(lcg_state);
if(!mf_sample_height(wr, &hr, &C1_r, &G1_r, &lambda_r, height_rand)) {
/* The random walk has left the surface. */
*wo = outside? wr: -wr;
return throughput;
}
/* Sample microfacet normal. */
float3 wm = mf_sample_vndf(-wr, alpha, make_float2(lcg_step_float_addrspace(lcg_state),
lcg_step_float_addrspace(lcg_state)));
float vndf_rand_y = lcg_step_float_addrspace(lcg_state);
float vndf_rand_x = lcg_step_float_addrspace(lcg_state);
float3 wm = mf_sample_vndf(-wr, alpha, vndf_rand_x, vndf_rand_y);
/* First-bounce color is already accounted for in mix weight. */
if(!use_fresnel && order > 0)
@ -221,7 +227,8 @@ ccl_device_forceinline float3 MF_FUNCTION_FULL_NAME(mf_sample)(
#ifdef MF_MULTI_GLASS
bool next_outside;
float3 wi_prev = -wr;
wr = mf_sample_phase_glass(-wr, outside? eta: 1.0f/eta, wm, lcg_step_float_addrspace(lcg_state), &next_outside);
float phase_rand = lcg_step_float_addrspace(lcg_state);
wr = mf_sample_phase_glass(-wr, outside? eta: 1.0f/eta, wm, phase_rand, &next_outside);
if(!next_outside) {
hr = -hr;
wr = -wr;

View File

@ -61,8 +61,8 @@ ccl_device void kernel_filter_divide_shadow(int sample,
varA = max(0.0f, varA - unfilteredA[idx]*unfilteredA[idx]*odd_sample);
varB = max(0.0f, varB - unfilteredB[idx]*unfilteredB[idx]*even_sample);
}
varA /= (odd_sample - 1);
varB /= (even_sample - 1);
varA /= max(odd_sample - 1, 1);
varB /= max(even_sample - 1, 1);
sampleVariance[idx] = 0.5f*(varA + varB) / sample;
sampleVarianceV[idx] = 0.5f * (varA - varB) * (varA - varB) / (sample*sample);
@ -96,11 +96,17 @@ ccl_device void kernel_filter_get_feature(int sample,
int idx = (y-rect.y)*buffer_w + (x - rect.x);
mean[idx] = center_buffer[m_offset] / sample;
if(use_split_variance) {
variance[idx] = max(0.0f, (center_buffer[v_offset] - mean[idx]*mean[idx]*sample) / (sample * (sample-1)));
if (sample > 1) {
if(use_split_variance) {
variance[idx] = max(0.0f, (center_buffer[v_offset] - mean[idx]*mean[idx]*sample) / (sample * (sample-1)));
}
else {
variance[idx] = center_buffer[v_offset] / (sample * (sample-1));
}
}
else {
variance[idx] = center_buffer[v_offset] / (sample * (sample-1));
/* Can't compute variance with single sample, just set it very high. */
variance[idx] = 1e10f;
}
}

View File

@ -76,8 +76,8 @@ shader node_principled_bsdf(
float aspect = sqrt(1.0 - Anisotropic * 0.9);
float r2 = Roughness * Roughness;
float alpha_x = max(0.001, r2 / aspect);
float alpha_y = max(0.001, r2 * aspect);
float alpha_x = r2 / aspect;
float alpha_y = r2 * aspect;
color tmp_col = color(1.0, 1.0, 1.0) * (1.0 - SpecularTint) + m_ctint * SpecularTint;

View File

@ -280,8 +280,8 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg, ShaderData *sd, float *
float aspect = safe_sqrtf(1.0f - anisotropic * 0.9f);
float r2 = roughness * roughness;
bsdf->alpha_x = fmaxf(0.001f, r2 / aspect);
bsdf->alpha_y = fmaxf(0.001f, r2 * aspect);
bsdf->alpha_x = r2 / aspect;
bsdf->alpha_y = r2 * aspect;
float m_cdlum = 0.3f * base_color.x + 0.6f * base_color.y + 0.1f * base_color.z; // luminance approx.
float3 m_ctint = m_cdlum > 0.0f ? base_color / m_cdlum : make_float3(0.0f, 0.0f, 0.0f); // normalize lum. to isolate hue+sat

View File

@ -961,6 +961,7 @@ void Session::update_status_time(bool show_pause, bool show_done)
}
else if(show_done) {
status = "Done";
progress.set_end_time(); /* Save end time so that further calls to get_time are accurate. */
}
else {
status = substatus;

View File

@ -190,6 +190,7 @@ Shader::Shader()
has_volume_spatial_varying = false;
has_object_dependency = false;
has_integrator_dependency = false;
has_volume_connected = false;
displacement_method = DISPLACE_BUMP;

View File

@ -41,6 +41,7 @@ public:
denoised_tiles = 0;
start_time = time_dt();
render_start_time = time_dt();
end_time = 0.0;
status = "Initializing";
substatus = "";
sync_status = "";
@ -80,6 +81,7 @@ public:
denoised_tiles = 0;
start_time = time_dt();
render_start_time = time_dt();
end_time = 0.0;
status = "Initializing";
substatus = "";
sync_status = "";
@ -146,6 +148,7 @@ public:
thread_scoped_lock lock(progress_mutex);
start_time = time_dt();
end_time = 0.0;
}
void set_render_start_time()
@ -169,8 +172,15 @@ public:
{
thread_scoped_lock lock(progress_mutex);
total_time_ = time_dt() - start_time;
render_time_ = time_dt() - render_start_time;
double time = (end_time > 0) ? end_time : time_dt();
total_time_ = time - start_time;
render_time_ = time - render_start_time;
}
void set_end_time()
{
end_time = time_dt();
}
void reset_sample()
@ -337,6 +347,8 @@ protected:
int rendered_tiles, denoised_tiles;
double start_time, render_start_time;
/* End time written when render is done, so it doesn't keep increasing on redraws. */
double end_time;
string status;
string substatus;

View File

@ -861,19 +861,14 @@ void GHOST_WindowWin32::processWin32TabletEvent(WPARAM wParam, LPARAM lParam)
if (fpWTPacket) {
if (fpWTPacket((HCTX)lParam, wParam, &pkt)) {
if (m_tabletData) {
switch (pkt.pkCursor) {
case 0: /* first device */
case 3: /* second device */
switch (pkt.pkCursor % 3) { /* % 3 for multiple devices ("DualTrack") */
case 0:
m_tabletData->Active = GHOST_kTabletModeNone; /* puck - not yet supported */
break;
case 1:
case 4:
case 7:
m_tabletData->Active = GHOST_kTabletModeStylus; /* stylus */
break;
case 2:
case 5:
case 8:
m_tabletData->Active = GHOST_kTabletModeEraser; /* eraser */
break;
}

View File

@ -19,8 +19,8 @@
# Filename : apriori_and_causal_density.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Selects the lines with high a priori density and
# subjects them to the causal density so as to avoid
# Purpose : Selects the lines with high a priori density and
# subjects them to the causal density so as to avoid
# cluttering
from freestyle.chainingiterators import ChainPredicateIterator

View File

@ -19,7 +19,7 @@
# Filename : cartoon.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Draws colored lines. The color is automatically
# Purpose : Draws colored lines. The color is automatically
# inferred from each object's material in a cartoon-like
# fashion.

View File

@ -19,8 +19,8 @@
# Filename : external_contour_sketchy.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Draws the external contour of the scene using a sketchy
# chaining iterator (in particular each ViewEdge can be drawn
# Purpose : Draws the external contour of the scene using a sketchy
# chaining iterator (in particular each ViewEdge can be drawn
# several times
from freestyle.chainingiterators import pySketchyChainingIterator
@ -41,7 +41,7 @@ from freestyle.shaders import (
from freestyle.types import Operators
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
Operators.select(upred)
Operators.bidirectional_chain(pySketchyChainingIterator(), NotUP1D(upred))
shaders_list = [

View File

@ -19,8 +19,8 @@
# Filename : haloing.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : This style module selects the lines that
# are connected (in the image) to a specific
# Purpose : This style module selects the lines that
# are connected (in the image) to a specific
# object and trims them in order to produce
# a haloing effect around the target shape
@ -42,14 +42,14 @@ from freestyle.shaders import (
from freestyle.types import Id, Operators
# id corresponds to the id of the target object
# id corresponds to the id of the target object
# (accessed by SHIFT+click)
id = Id(3,0)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyIsOccludedByUP1D(id))
Operators.select(upred)
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(upred))
shaders_list = [
IncreasingThicknessShader(3, 5),
IncreasingThicknessShader(3, 5),
IncreasingColorShader(1,0,0, 1,0,1,0,1),
SamplingShader(1.0),
pyTVertexRemoverShader(),

View File

@ -19,7 +19,7 @@
# Filename : invisible_lines.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Draws all lines whose Quantitative Invisibility
# Purpose : Draws all lines whose Quantitative Invisibility
# is different from 0
from freestyle.chainingiterators import ChainSilhouetteIterator

View File

@ -19,13 +19,13 @@
# Filename : long_anisotropically_dense.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Selects the lines that are long and have a high anisotropic
# a priori density and uses causal density
# Purpose : Selects the lines that are long and have a high anisotropic
# a priori density and uses causal density
# to draw without cluttering. Ideally, half of the
# selected lines are culled using the causal density.
#
# ********************* WARNING *************************************
# ******** The Directional a priori density maps must ******
# ******** The Directional a priori density maps must ******
# ******** have been computed prior to using this style module ******
from freestyle.chainingiterators import ChainSilhouetteIterator
@ -75,7 +75,7 @@ Operators.sort(pyLengthBP1D())
shaders_list = [
SamplingShader(2.0),
ConstantThicknessShader(2),
ConstantColorShader(0.2,0.2,0.25,1),
ConstantColorShader(0.2,0.2,0.25,1),
]
## uniform culling
Operators.create(pyDensityUP1D(3.0,2.0e-2, IntegrationType.MEAN, 0.1), shaders_list)

View File

@ -19,7 +19,7 @@
# Filename : multiple_parameterization.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : The thickness and the color of the strokes vary continuously
# Purpose : The thickness and the color of the strokes vary continuously
# independently from occlusions although only
# visible lines are actually drawn. This is equivalent
# to assigning the thickness using a parameterization covering

View File

@ -22,7 +22,7 @@
# Purpose : Uses the NatureUP1D predicate to select the lines
# of a given type (among Nature.SILHOUETTE, Nature.CREASE, Nature.SUGGESTIVE_CONTOURS,
# Nature.BORDERS).
# The suggestive contours must have been enabled in the
# The suggestive contours must have been enabled in the
# options dialog to appear in the View Map.
from freestyle.chainingiterators import ChainSilhouetteIterator

View File

@ -19,7 +19,7 @@
# Filename : near_lines.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Draws the lines that are "closer" than a threshold
# Purpose : Draws the lines that are "closer" than a threshold
# (between 0 and 1)
from freestyle.chainingiterators import ChainSilhouetteIterator

View File

@ -20,7 +20,7 @@
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Draws lines hidden by one surface.
# *** Quantitative Invisibility must have been
# *** Quantitative Invisibility must have been
# enabled in the options dialog to use this style module ****
from freestyle.chainingiterators import ChainSilhouetteIterator

View File

@ -20,7 +20,7 @@
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Draws lines hidden by two surfaces.
# *** Quantitative Invisibility must have been
# *** Quantitative Invisibility must have been
# enabled in the options dialog to use this style module ****
from freestyle.chainingiterators import ChainSilhouetteIterator

View File

@ -21,7 +21,7 @@
# Date : 04/08/2005
# Purpose : Use the sequential split with two different
# predicates to specify respectively the starting and
# the stopping extremities for strokes
# the stopping extremities for strokes
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (

View File

@ -19,7 +19,7 @@
# Filename : sketchy_multiple_parameterization.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Builds sketchy strokes whose topology relies on a
# Purpose : Builds sketchy strokes whose topology relies on a
# parameterization that covers the complete lines (visible+invisible)
# whereas only the visible portions are actually drawn

View File

@ -17,7 +17,7 @@
# ##### END GPL LICENSE BLOCK #####
# Filename : uniformpruning_zsort.py
# Authors : Fredo Durand, Stephane Grabli, Francois Sillion, Emmanuel Turquin
# Authors : Fredo Durand, Stephane Grabli, Francois Sillion, Emmanuel Turquin
# Date : 08/04/2005
from freestyle.chainingiterators import ChainSilhouetteIterator

View File

@ -128,7 +128,7 @@ class SpellChecker:
"multisampling",
"multiscatter",
"multitexture",
"multithreaded",
"multithreaded",
"multiuser",
"multiview",
"namespace",

View File

@ -37,6 +37,7 @@ __all__ = (
"register_module",
"register_manual_map",
"unregister_manual_map",
"register_submodule_factory",
"make_rna_paths",
"manual_map",
"previews",
@ -684,6 +685,47 @@ def unregister_module(module, verbose=False):
print("done.\n")
def register_submodule_factory(module_name, submodule_names):
"""
Utility function to create register and unregister functions
which simply load submodules,
calling their register & unregister functions.
.. note::
Modules are registered in the order given,
unregistered in reverse order.
:arg module_name: The module name, typically ``__name__``.
:type module_name: string
:arg submodule_names: List of submodule names to load and unload.
:type submodule_names: list of strings
:return: register and unregister functions.
:rtype: tuple pair of functions
"""
module = None
submodules = []
def register():
nonlocal module
module = __import__(name=module_name, fromlist=submodule_names)
submodules[:] = [getattr(module, name) for name in submodule_names]
for mod in submodules:
mod.register()
def unregister():
from sys import modules
for mod in reversed(submodules):
mod.unregister()
name = mod.__name__
delattr(module, name.partition(".")[2])
del modules[name]
submodules.clear()
return register, unregister
# -----------------------------------------------------------------------------
# Manual lookups, each function has to return a basepath and a sequence
# of...

View File

@ -232,7 +232,7 @@ bbone_property_ids = (
"bbone_scalein",
"bbone_scaleout",
# NOTE: These are in the nested bone struct
# NOTE: These are in the nested bone struct
# Do it this way to force them to be included
# in whatever actions are being keyed here
"bone.bbone_in",

View File

@ -723,7 +723,7 @@ def main(context,
global USER_FILL_HOLES_QUALITY
global USER_STRETCH_ASPECT
global USER_ISLAND_MARGIN
from math import cos
import time
@ -747,7 +747,7 @@ def main(context,
USER_FILL_HOLES = 0
USER_FILL_HOLES_QUALITY = 50 # Only for hole filling.
USER_VIEW_INIT = 0 # Only for hole filling.
is_editmode = (context.active_object.mode == 'EDIT')
if is_editmode:
obList = [ob for ob in [context.active_object] if ob and ob.type == 'MESH']

View File

@ -886,10 +886,10 @@ class ConstraintButtonsPanel:
box.template_cache_file(con, "cache_file")
cache_file = con.cache_file
layout.label(text="Constraint Properties:")
box = layout.box()
if cache_file is not None:
box.prop_search(con, "object_path", cache_file, "object_paths")

View File

@ -180,7 +180,7 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
if poselib:
# warning about poselib being in an invalid state
if len(poselib.fcurves) > 0 and len(poselib.pose_markers) == 0:
layout.label(icon='ERROR', text="Error: Potentially corrupt library, run 'Sanitize' operator to fix")
layout.label(icon='ERROR', text="Error: Potentially corrupt library, run 'Sanitize' operator to fix")
# list of poses in pose library
row = layout.row()

View File

@ -494,7 +494,7 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
# bendy bone properties
def doBBone(ksi, context, ks, pchan):
bone = pchan.bone
# This check is crude, but is the best we can do for now
# It simply adds all of these if the bbone has segments
# (and the bone is a control bone). This may lead to some

View File

@ -65,10 +65,10 @@ void GlareSimpleStarOperation::generateGlare(float *data, MemoryBuffer *inputTil
}
}
// // B
for (y = tbuf1->getHeight() - 1 && (!breaked); y >= 0; y--) {
for (y = this->getHeight() - 1; y >= 0 && (!breaked); y--) {
ym = y - i;
yp = y + i;
for (x = tbuf1->getWidth() - 1; x >= 0; x--) {
for (x = this->getWidth() - 1; x >= 0; x--) {
xm = x - i;
xp = x + i;
tbuf1->read(c, x, y);

View File

@ -710,7 +710,7 @@ static bool gp_brush_randomize_apply(tGP_BrushEditData *gso, bGPDstroke *gps, in
}
else {
/* ERROR */
BLI_assert("3D stroke being sculpted in non-3D view");
BLI_assert(!"3D stroke being sculpted in non-3D view");
}
}
else {

View File

@ -1241,7 +1241,7 @@ static void render_view3d_startjob(void *customdata, short *stop, short *do_upda
use_border = render_view3d_disprect(rp->scene, rp->ar, rp->v3d,
rp->rv3d, &cliprct);
if ((update_flag & (PR_UPDATE_RENDERSIZE | PR_UPDATE_DATABASE)) || rstats->convertdone == 0) {
if ((update_flag & (PR_UPDATE_RENDERSIZE | PR_UPDATE_DATABASE | PR_UPDATE_VIEW)) || rstats->convertdone == 0) {
RenderData rdata;
/* no osa, blur, seq, layers, savebuffer etc for preview render */

View File

@ -1822,7 +1822,7 @@ static void paste_mtex_copybuf(ID *id)
mtex = &(((FreestyleLineStyle *)id)->mtex[(int)((FreestyleLineStyle *)id)->texact]);
break;
default:
BLI_assert("invalid id type");
BLI_assert(!"invalid id type");
return;
}

View File

@ -4299,7 +4299,7 @@ static void do_projectpaint_soften_f(ProjPaintState *ps, ProjPixel *projPixel, f
return;
}
else {
blend_color_interpolate_float(rgba, rgba, projPixel->pixel.f_pt, mask);
blend_color_interpolate_float(rgba, projPixel->pixel.f_pt, rgba, mask);
}
BLI_linklist_prepend_arena(softenPixels, (void *)projPixel, softenArena);