Merge branch 'blender-v2.93-release'
This commit is contained in:
@@ -267,6 +267,7 @@ class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
|
|||||||
# these are for paths only
|
# these are for paths only
|
||||||
col.separator()
|
col.separator()
|
||||||
|
|
||||||
|
col.prop(curve, "use_path_clamp")
|
||||||
col.prop(curve, "use_path_follow")
|
col.prop(curve, "use_path_follow")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1473,8 +1473,12 @@ static void followpath_get_tarmat(struct Depsgraph *UNUSED(depsgraph),
|
|||||||
* that's animated, but this will only work if it actually is animated...
|
* that's animated, but this will only work if it actually is animated...
|
||||||
*
|
*
|
||||||
* we divide the curvetime calculated in the previous step by the length of the path,
|
* we divide the curvetime calculated in the previous step by the length of the path,
|
||||||
* to get a time factor, which then gets clamped to lie within 0.0 - 1.0 range. */
|
* to get a time factor. */
|
||||||
curvetime /= cu->pathlen;
|
curvetime /= cu->pathlen;
|
||||||
|
|
||||||
|
if (cu->flag & CU_PATH_CLAMP) {
|
||||||
|
CLAMP(curvetime, 0.0f, 1.0f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* fixed position along curve */
|
/* fixed position along curve */
|
||||||
|
|||||||
@@ -3285,6 +3285,10 @@ static bool ob_parcurve(Object *ob, Object *par, float r_mat[4][4])
|
|||||||
ctime = cu->ctime;
|
ctime = cu->ctime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cu->flag & CU_PATH_CLAMP) {
|
||||||
|
CLAMP(ctime, 0.0f, 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
unit_m4(r_mat);
|
unit_m4(r_mat);
|
||||||
|
|
||||||
/* vec: 4 items! */
|
/* vec: 4 items! */
|
||||||
|
|||||||
@@ -2069,6 +2069,24 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set default value for the new bisect_threshold parameter in the mirror modifier. */
|
||||||
|
if (!MAIN_VERSION_ATLEAST(bmain, 293, 19)) {
|
||||||
|
LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
|
||||||
|
LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
|
||||||
|
if (md->type == eModifierType_Mirror) {
|
||||||
|
MirrorModifierData *mmd = (MirrorModifierData *)md;
|
||||||
|
/* This was the previous hard-coded value. */
|
||||||
|
mmd->bisect_threshold = 0.001f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
LISTBASE_FOREACH (Curve *, cu, &bmain->curves) {
|
||||||
|
/* Turn on clamping as this was implicit before. */
|
||||||
|
cu->flag |= CU_PATH_CLAMP;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Versioning code until next subversion bump goes here.
|
* Versioning code until next subversion bump goes here.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ enum {
|
|||||||
CU_BACK = 1 << 2,
|
CU_BACK = 1 << 2,
|
||||||
CU_PATH = 1 << 3,
|
CU_PATH = 1 << 3,
|
||||||
CU_FOLLOW = 1 << 4,
|
CU_FOLLOW = 1 << 4,
|
||||||
/* CU_UV_ORCO = 1 << 5, */ /* DEPRECATED */
|
CU_PATH_CLAMP = 1 << 5,
|
||||||
CU_DEFORM_BOUNDS_OFF = 1 << 6,
|
CU_DEFORM_BOUNDS_OFF = 1 << 6,
|
||||||
CU_STRETCH = 1 << 7,
|
CU_STRETCH = 1 << 7,
|
||||||
/* CU_OFFS_PATHDIST = 1 << 8, */ /* DEPRECATED */
|
/* CU_OFFS_PATHDIST = 1 << 8, */ /* DEPRECATED */
|
||||||
|
|||||||
@@ -1030,6 +1030,14 @@ static void rna_def_path(BlenderRNA *UNUSED(brna), StructRNA *srna)
|
|||||||
RNA_def_property_ui_text(prop, "Follow", "Make curve path children to rotate along the path");
|
RNA_def_property_ui_text(prop, "Follow", "Make curve path children to rotate along the path");
|
||||||
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
|
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
|
||||||
|
|
||||||
|
prop = RNA_def_property(srna, "use_path_clamp", PROP_BOOLEAN, PROP_NONE);
|
||||||
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH_CLAMP);
|
||||||
|
RNA_def_property_ui_text(
|
||||||
|
prop,
|
||||||
|
"Clamp",
|
||||||
|
"Clamp the curve path children so they can't travel past the start/end point of the curve");
|
||||||
|
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
|
prop = RNA_def_property(srna, "use_stretch", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_STRETCH);
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_STRETCH);
|
||||||
RNA_def_property_ui_text(prop,
|
RNA_def_property_ui_text(prop,
|
||||||
|
|||||||
Reference in New Issue
Block a user