shape: center node

This commit is contained in:
itsmattkc
2021-09-21 21:32:31 -07:00
parent 8277748719
commit 2ea29f9ea9
5 changed files with 21 additions and 5 deletions
+7
View File
@@ -79,4 +79,11 @@ void ShapeNode::Value(const NodeValueRow &value, const NodeGlobals &globals, Nod
table->Push(NodeValue::kShaderJob, QVariant::fromValue(job), this);
}
void ShapeNode::DrawGizmos(const NodeValueRow &row, const NodeGlobals &globals, QPainter *p)
{
// Use offsets to make the appearance of values that start in the top left, even though we
// really anchor around the center
SetInputProperty(kPositionInput, QStringLiteral("offset"), globals.resolution() * 0.5);
}
}