Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Maxon Cinema 4D Auto-center motext with variable number of lines

  • Auto-center motext with variable number of lines

     Sam Treadway updated 2 weeks, 6 days ago 2 Members · 2 Posts
  • Greg Sage

    September 2, 2020 at 6:51 pm

    I’ve got a template that generates short videos where I just feed it different text, and the rest is auto generated, but the vertical alignment is proving to be the biggest issue because the number of lines per segment keeps changing, and will change every time I feed it new lines.

    I have absurdly complex kludges to work around this based on manually aligning text stacks between 1 and 5 lines tall, and then manually entering text into the motext object with the matching number of lines, but it would be MUCH simpler if there was a way to simply auto center the full text block vertically.

    I have some basic xpresso familiarity, so not afraid of using that, but not seeing how to have it either simply auto-align vertically, or auto-detect the number of lines and then offset by predetermined shims.

  • Sam Treadway

    September 3, 2020 at 5:14 am

    Here are two versions in xPresso that should get you almost there.
    Keep in mind I’m only feeding in the line heights and vertical line spacing to get the total height.

    The first version has all the math strung out in nodes and the second takes care of the math within the python node.

Viewing 1 - 2 of 2 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can. Our Privacy policy | GDPR Policy