opacity pressure and jitter, initial direction

This commit is contained in:
2019-02-25 01:31:32 +01:00
parent bfaff312f8
commit abca1d5162
12 changed files with 94 additions and 38 deletions

View File

@@ -126,7 +126,7 @@ std::vector<std::shared_ptr<Brush>> ABR::compute_brushes(const std::string& path
b->m_tip_aspect = (1.f - samp->value<UnitFloat>("Rndn") * 0.01) * 0.5f + 0.5f;
b->m_tip_size = samp->value<UnitFloat>("Dmtr");
b->m_tip_spacing = samp->value<UnitFloat>("Spcn") * 0.01f;
b->m_tip_angle = samp->value<UnitFloat>("Angl") / 360.f; // [-180, 180] -> [0, 1]
b->m_tip_angle = -samp->value<UnitFloat>("Angl") / 360.f; // [0, 360] -> [0, 1]
b->m_tip_flipx = samp->value<Boolean>("flipX");
b->m_tip_flipy = samp->value<Boolean>("flipY");
@@ -186,8 +186,7 @@ std::vector<std::shared_ptr<Brush>> ABR::compute_brushes(const std::string& path
else if (mode == 6)
{
b->m_jitter_angle = jitter_angle->value<UnitFloat>("jitter") * 0.01f;
b->m_tip_angle_follow = true; // temporary use full direction
// TODO: implement initial direction only
b->m_tip_angle_init = true;
}
}
@@ -290,7 +289,7 @@ std::vector<std::shared_ptr<Brush>> ABR::compute_brushes(const std::string& path
if (db->value<Boolean>("useScatter"))
{
auto scatter = db->get<Descriptor>("scatterDynamics");
b->m_dual_scatter = scatter->value<UnitFloat>("jitter") * 0.001f;
b->m_dual_scatter = scatter->value<UnitFloat>("jitter") * 0.01f;
}
// brush sample