Merge branch 'blender-v2.83-release'
This commit is contained in:
2
extern/mantaflow/preprocessed/gitinfo.h
vendored
2
extern/mantaflow/preprocessed/gitinfo.h
vendored
@@ -1,3 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
#define MANTA_GIT_VERSION "commit b4a2742bd743e2913fba94dd35846042e2650212"
|
#define MANTA_GIT_VERSION "commit 534495ae4528094e382e4daadbacaa32d5878de1"
|
||||||
|
|||||||
54
extern/mantaflow/preprocessed/particle.h
vendored
54
extern/mantaflow/preprocessed/particle.h
vendored
@@ -469,6 +469,7 @@ template<class S> class ParticleSystem : public ParticleBase {
|
|||||||
const int integrationMode,
|
const int integrationMode,
|
||||||
const bool deleteInObstacle = true,
|
const bool deleteInObstacle = true,
|
||||||
const bool stopInObstacle = true,
|
const bool stopInObstacle = true,
|
||||||
|
const bool skipNew = false,
|
||||||
const ParticleDataImpl<int> *ptype = NULL,
|
const ParticleDataImpl<int> *ptype = NULL,
|
||||||
const int exclude = 0);
|
const int exclude = 0);
|
||||||
static PyObject *_W_9(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
|
static PyObject *_W_9(PyObject *_self, PyObject *_linargs, PyObject *_kwds)
|
||||||
@@ -486,13 +487,20 @@ template<class S> class ParticleSystem : public ParticleBase {
|
|||||||
const int integrationMode = _args.get<int>("integrationMode", 2, &_lock);
|
const int integrationMode = _args.get<int>("integrationMode", 2, &_lock);
|
||||||
const bool deleteInObstacle = _args.getOpt<bool>("deleteInObstacle", 3, true, &_lock);
|
const bool deleteInObstacle = _args.getOpt<bool>("deleteInObstacle", 3, true, &_lock);
|
||||||
const bool stopInObstacle = _args.getOpt<bool>("stopInObstacle", 4, true, &_lock);
|
const bool stopInObstacle = _args.getOpt<bool>("stopInObstacle", 4, true, &_lock);
|
||||||
|
const bool skipNew = _args.getOpt<bool>("skipNew", 5, false, &_lock);
|
||||||
const ParticleDataImpl<int> *ptype = _args.getPtrOpt<ParticleDataImpl<int>>(
|
const ParticleDataImpl<int> *ptype = _args.getPtrOpt<ParticleDataImpl<int>>(
|
||||||
"ptype", 5, NULL, &_lock);
|
"ptype", 6, NULL, &_lock);
|
||||||
const int exclude = _args.getOpt<int>("exclude", 6, 0, &_lock);
|
const int exclude = _args.getOpt<int>("exclude", 7, 0, &_lock);
|
||||||
pbo->_args.copy(_args);
|
pbo->_args.copy(_args);
|
||||||
_retval = getPyNone();
|
_retval = getPyNone();
|
||||||
pbo->advectInGrid(
|
pbo->advectInGrid(flags,
|
||||||
flags, vel, integrationMode, deleteInObstacle, stopInObstacle, ptype, exclude);
|
vel,
|
||||||
|
integrationMode,
|
||||||
|
deleteInObstacle,
|
||||||
|
stopInObstacle,
|
||||||
|
skipNew,
|
||||||
|
ptype,
|
||||||
|
exclude);
|
||||||
pbo->_args.check();
|
pbo->_args.check();
|
||||||
}
|
}
|
||||||
pbFinalizePlugin(pbo->getParent(), "ParticleSystem::advectInGrid", !noTiming);
|
pbFinalizePlugin(pbo->getParent(), "ParticleSystem::advectInGrid", !noTiming);
|
||||||
@@ -1863,6 +1871,7 @@ template<class S> struct _GridAdvectKernel : public KernelBase {
|
|||||||
const Real dt,
|
const Real dt,
|
||||||
const bool deleteInObstacle,
|
const bool deleteInObstacle,
|
||||||
const bool stopInObstacle,
|
const bool stopInObstacle,
|
||||||
|
const bool skipNew,
|
||||||
const ParticleDataImpl<int> *ptype,
|
const ParticleDataImpl<int> *ptype,
|
||||||
const int exclude,
|
const int exclude,
|
||||||
std::vector<Vec3> &u)
|
std::vector<Vec3> &u)
|
||||||
@@ -1873,6 +1882,7 @@ template<class S> struct _GridAdvectKernel : public KernelBase {
|
|||||||
dt(dt),
|
dt(dt),
|
||||||
deleteInObstacle(deleteInObstacle),
|
deleteInObstacle(deleteInObstacle),
|
||||||
stopInObstacle(stopInObstacle),
|
stopInObstacle(stopInObstacle),
|
||||||
|
skipNew(skipNew),
|
||||||
ptype(ptype),
|
ptype(ptype),
|
||||||
exclude(exclude),
|
exclude(exclude),
|
||||||
u(u)
|
u(u)
|
||||||
@@ -1885,11 +1895,13 @@ template<class S> struct _GridAdvectKernel : public KernelBase {
|
|||||||
const Real dt,
|
const Real dt,
|
||||||
const bool deleteInObstacle,
|
const bool deleteInObstacle,
|
||||||
const bool stopInObstacle,
|
const bool stopInObstacle,
|
||||||
|
const bool skipNew,
|
||||||
const ParticleDataImpl<int> *ptype,
|
const ParticleDataImpl<int> *ptype,
|
||||||
const int exclude,
|
const int exclude,
|
||||||
std::vector<Vec3> &u) const
|
std::vector<Vec3> &u) const
|
||||||
{
|
{
|
||||||
if ((p[idx].flag & ParticleBase::PDELETE) || (ptype && ((*ptype)[idx] & exclude))) {
|
if ((p[idx].flag & ParticleBase::PDELETE) || (ptype && ((*ptype)[idx] & exclude)) ||
|
||||||
|
(skipNew && (p[idx].flag & ParticleBase::PNEW))) {
|
||||||
u[idx] = 0.;
|
u[idx] = 0.;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1910,7 +1922,7 @@ template<class S> struct _GridAdvectKernel : public KernelBase {
|
|||||||
void operator()(const tbb::blocked_range<IndexInt> &__r) const
|
void operator()(const tbb::blocked_range<IndexInt> &__r) const
|
||||||
{
|
{
|
||||||
for (IndexInt idx = __r.begin(); idx != (IndexInt)__r.end(); idx++)
|
for (IndexInt idx = __r.begin(); idx != (IndexInt)__r.end(); idx++)
|
||||||
op(idx, p, vel, flags, dt, deleteInObstacle, stopInObstacle, ptype, exclude, u);
|
op(idx, p, vel, flags, dt, deleteInObstacle, stopInObstacle, skipNew, ptype, exclude, u);
|
||||||
}
|
}
|
||||||
void run()
|
void run()
|
||||||
{
|
{
|
||||||
@@ -1922,6 +1934,7 @@ template<class S> struct _GridAdvectKernel : public KernelBase {
|
|||||||
const Real dt;
|
const Real dt;
|
||||||
const bool deleteInObstacle;
|
const bool deleteInObstacle;
|
||||||
const bool stopInObstacle;
|
const bool stopInObstacle;
|
||||||
|
const bool skipNew;
|
||||||
const ParticleDataImpl<int> *ptype;
|
const ParticleDataImpl<int> *ptype;
|
||||||
const int exclude;
|
const int exclude;
|
||||||
std::vector<Vec3> &u;
|
std::vector<Vec3> &u;
|
||||||
@@ -1933,6 +1946,7 @@ template<class S> struct GridAdvectKernel : public KernelBase {
|
|||||||
const Real dt,
|
const Real dt,
|
||||||
const bool deleteInObstacle,
|
const bool deleteInObstacle,
|
||||||
const bool stopInObstacle,
|
const bool stopInObstacle,
|
||||||
|
const bool skipNew,
|
||||||
const ParticleDataImpl<int> *ptype,
|
const ParticleDataImpl<int> *ptype,
|
||||||
const int exclude)
|
const int exclude)
|
||||||
: KernelBase(p.size()),
|
: KernelBase(p.size()),
|
||||||
@@ -1943,6 +1957,7 @@ template<class S> struct GridAdvectKernel : public KernelBase {
|
|||||||
dt,
|
dt,
|
||||||
deleteInObstacle,
|
deleteInObstacle,
|
||||||
stopInObstacle,
|
stopInObstacle,
|
||||||
|
skipNew,
|
||||||
ptype,
|
ptype,
|
||||||
exclude,
|
exclude,
|
||||||
u),
|
u),
|
||||||
@@ -1952,6 +1967,7 @@ template<class S> struct GridAdvectKernel : public KernelBase {
|
|||||||
dt(dt),
|
dt(dt),
|
||||||
deleteInObstacle(deleteInObstacle),
|
deleteInObstacle(deleteInObstacle),
|
||||||
stopInObstacle(stopInObstacle),
|
stopInObstacle(stopInObstacle),
|
||||||
|
skipNew(skipNew),
|
||||||
ptype(ptype),
|
ptype(ptype),
|
||||||
exclude(exclude),
|
exclude(exclude),
|
||||||
u((size))
|
u((size))
|
||||||
@@ -2001,16 +2017,21 @@ template<class S> struct GridAdvectKernel : public KernelBase {
|
|||||||
return stopInObstacle;
|
return stopInObstacle;
|
||||||
}
|
}
|
||||||
typedef bool type5;
|
typedef bool type5;
|
||||||
inline const ParticleDataImpl<int> *getArg6()
|
inline const bool &getArg6()
|
||||||
|
{
|
||||||
|
return skipNew;
|
||||||
|
}
|
||||||
|
typedef bool type6;
|
||||||
|
inline const ParticleDataImpl<int> *getArg7()
|
||||||
{
|
{
|
||||||
return ptype;
|
return ptype;
|
||||||
}
|
}
|
||||||
typedef ParticleDataImpl<int> type6;
|
typedef ParticleDataImpl<int> type7;
|
||||||
inline const int &getArg7()
|
inline const int &getArg8()
|
||||||
{
|
{
|
||||||
return exclude;
|
return exclude;
|
||||||
}
|
}
|
||||||
typedef int type7;
|
typedef int type8;
|
||||||
void runMessage()
|
void runMessage()
|
||||||
{
|
{
|
||||||
debMsg("Executing kernel GridAdvectKernel ", 3);
|
debMsg("Executing kernel GridAdvectKernel ", 3);
|
||||||
@@ -2025,6 +2046,7 @@ template<class S> struct GridAdvectKernel : public KernelBase {
|
|||||||
const Real dt;
|
const Real dt;
|
||||||
const bool deleteInObstacle;
|
const bool deleteInObstacle;
|
||||||
const bool stopInObstacle;
|
const bool stopInObstacle;
|
||||||
|
const bool skipNew;
|
||||||
const ParticleDataImpl<int> *ptype;
|
const ParticleDataImpl<int> *ptype;
|
||||||
const int exclude;
|
const int exclude;
|
||||||
std::vector<Vec3> u;
|
std::vector<Vec3> u;
|
||||||
@@ -2195,6 +2217,7 @@ void ParticleSystem<S>::advectInGrid(const FlagGrid &flags,
|
|||||||
const int integrationMode,
|
const int integrationMode,
|
||||||
const bool deleteInObstacle,
|
const bool deleteInObstacle,
|
||||||
const bool stopInObstacle,
|
const bool stopInObstacle,
|
||||||
|
const bool skipNew,
|
||||||
const ParticleDataImpl<int> *ptype,
|
const ParticleDataImpl<int> *ptype,
|
||||||
const int exclude)
|
const int exclude)
|
||||||
{
|
{
|
||||||
@@ -2208,8 +2231,15 @@ void ParticleSystem<S>::advectInGrid(const FlagGrid &flags,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// update positions
|
// update positions
|
||||||
GridAdvectKernel<S> kernel(
|
GridAdvectKernel<S> kernel(mData,
|
||||||
mData, vel, flags, getParent()->getDt(), deleteInObstacle, stopInObstacle, ptype, exclude);
|
vel,
|
||||||
|
flags,
|
||||||
|
getParent()->getDt(),
|
||||||
|
deleteInObstacle,
|
||||||
|
stopInObstacle,
|
||||||
|
skipNew,
|
||||||
|
ptype,
|
||||||
|
exclude);
|
||||||
integratePointSet(kernel, integrationMode);
|
integratePointSet(kernel, integrationMode);
|
||||||
|
|
||||||
if (!deleteInObstacle) {
|
if (!deleteInObstacle) {
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ def liquid_step_$ID$():\n\
|
|||||||
mantaMsg('Liquid step')\n\
|
mantaMsg('Liquid step')\n\
|
||||||
\n\
|
\n\
|
||||||
mantaMsg('Advecting particles')\n\
|
mantaMsg('Advecting particles')\n\
|
||||||
pp_s$ID$.advectInGrid(flags=flags_s$ID$, vel=vel_s$ID$, integrationMode=IntRK4, deleteInObstacle=deleteInObstacle_s$ID$, stopInObstacle=False)\n\
|
pp_s$ID$.advectInGrid(flags=flags_s$ID$, vel=vel_s$ID$, integrationMode=IntRK4, deleteInObstacle=deleteInObstacle_s$ID$, stopInObstacle=False, skipNew=True)\n\
|
||||||
\n\
|
\n\
|
||||||
mantaMsg('Pushing particles out of obstacles')\n\
|
mantaMsg('Pushing particles out of obstacles')\n\
|
||||||
pushOutofObs(parts=pp_s$ID$, flags=flags_s$ID$, phiObs=phiObs_s$ID$)\n\
|
pushOutofObs(parts=pp_s$ID$, flags=flags_s$ID$, phiObs=phiObs_s$ID$)\n\
|
||||||
|
|||||||
@@ -90,7 +90,11 @@ if(WITH_OPENSUBDIV)
|
|||||||
OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK)
|
OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK)
|
||||||
OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_GLSL_COMPUTE)
|
OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_GLSL_COMPUTE)
|
||||||
|
|
||||||
add_definitions(-DGLEW_STATIC)
|
data_to_c_simple(shader/gpu_shader_opensubdiv_vertex.glsl SRC)
|
||||||
|
data_to_c_simple(shader/gpu_shader_opensubdiv_geometry.glsl SRC)
|
||||||
|
data_to_c_simple(shader/gpu_shader_opensubdiv_fragment.glsl SRC)
|
||||||
|
|
||||||
|
add_definitions(${GL_DEFINITIONS})
|
||||||
add_definitions(-DOSD_USES_GLEW)
|
add_definitions(-DOSD_USES_GLEW)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|||||||
@@ -401,4 +401,6 @@ if(WITH_XR_OPENXR)
|
|||||||
add_definitions(-DWITH_XR_OPENXR)
|
add_definitions(-DWITH_XR_OPENXR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_definitions(${GL_DEFINITIONS})
|
||||||
|
|
||||||
blender_add_lib(bf_draw "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
blender_add_lib(bf_draw "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||||
|
|||||||
@@ -287,6 +287,9 @@ static void image_camera_background_matrix_get(const Camera *cam,
|
|||||||
translate[3][0] = bgpic->offset[0];
|
translate[3][0] = bgpic->offset[0];
|
||||||
translate[3][1] = bgpic->offset[1];
|
translate[3][1] = bgpic->offset[1];
|
||||||
translate[3][2] = cam_corners[0][2];
|
translate[3][2] = cam_corners[0][2];
|
||||||
|
if (cam->type == CAM_ORTHO) {
|
||||||
|
mul_v2_fl(translate[3], cam->ortho_scale);
|
||||||
|
}
|
||||||
/* These lines are for keeping 2.80 behavior and could be removed to keep 2.79 behavior. */
|
/* These lines are for keeping 2.80 behavior and could be removed to keep 2.79 behavior. */
|
||||||
translate[3][0] *= min_ff(1.0f, cam_aspect);
|
translate[3][0] *= min_ff(1.0f, cam_aspect);
|
||||||
translate[3][1] /= max_ff(1.0f, cam_aspect) * (image_aspect / cam_aspect);
|
translate[3][1] /= max_ff(1.0f, cam_aspect) * (image_aspect / cam_aspect);
|
||||||
|
|||||||
@@ -1034,7 +1034,7 @@ void DRW_curve_batch_cache_create_requested(Object *ob)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (DRW_vbo_requested(cache->ordered.loop_pos_nor) ||
|
if (DRW_vbo_requested(cache->ordered.loop_pos_nor) ||
|
||||||
DRW_vbo_requested(cache->ordered.loop_uv)) {
|
DRW_vbo_requested(cache->ordered.loop_uv) || DRW_vbo_requested(cache->ordered.loop_tan)) {
|
||||||
DRW_displist_vertbuf_create_loop_pos_and_nor_and_uv_and_tan(
|
DRW_displist_vertbuf_create_loop_pos_and_nor_and_uv_and_tan(
|
||||||
lb, cache->ordered.loop_pos_nor, cache->ordered.loop_uv, cache->ordered.loop_tan);
|
lb, cache->ordered.loop_pos_nor, cache->ordered.loop_uv, cache->ordered.loop_tan);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3374,14 +3374,15 @@ static void rna_def_tool_settings(BlenderRNA *brna)
|
|||||||
prop = RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN, PROP_NONE);
|
prop = RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
|
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
|
||||||
RNA_def_property_ui_text(
|
RNA_def_property_ui_text(
|
||||||
prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones");
|
prop, "Auto Keying", "Automatic keyframe insertion for Objects, Bones and Masks");
|
||||||
RNA_def_property_ui_icon(prop, ICON_REC, 0);
|
RNA_def_property_ui_icon(prop, ICON_REC, 0);
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
|
prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
|
||||||
RNA_def_property_enum_bitflag_sdna(prop, NULL, "autokey_mode");
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "autokey_mode");
|
||||||
RNA_def_property_enum_items(prop, auto_key_items);
|
RNA_def_property_enum_items(prop, auto_key_items);
|
||||||
RNA_def_property_ui_text(
|
RNA_def_property_ui_text(prop,
|
||||||
prop, "Auto-Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
|
"Auto-Keying Mode",
|
||||||
|
"Mode of automatic keyframe insertion for Objects, Bones and Masks");
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "use_record_with_nla", PROP_BOOLEAN, PROP_NONE);
|
prop = RNA_def_property(srna, "use_record_with_nla", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLAG_WITHNLA);
|
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLAG_WITHNLA);
|
||||||
|
|||||||
@@ -108,4 +108,6 @@ if(APPLE)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_definitions(${GL_DEFINITIONS})
|
||||||
|
|
||||||
blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||||
|
|||||||
Reference in New Issue
Block a user