1
$\begingroup$

I want to make a driver that combines the value of ShapeKey1 multiplied by 3 and the value of ShapeKey2 multiplied by 2.

I set the DriverSettings Type to Sum Values as shown in the image below.

And, I entered "var * 3" and "var * 2" in Expression.

enter image description here

However, an error message like the following image appears.

enter image description here

What should I do?

$\endgroup$
4
  • 1
    $\begingroup$ Change to scripted experession, (from sum variables) call your variables say sk1 and sk2 and make the expression 3 * sk1 + 2 * sk2 Currently you are naming your variables var * 3 hence the error. $\endgroup$
    – batFINGER
    Commented Nov 29, 2019 at 13:27
  • 1
    $\begingroup$ @batFINGER you can add this as an answer, this is the solution to the whole question $\endgroup$ Commented Nov 29, 2019 at 13:28
  • $\begingroup$ @RobertGützkow Been an advocate for a subexpression variable in drivers, (sim to as used in math surface) $\endgroup$
    – batFINGER
    Commented Nov 29, 2019 at 13:33
  • $\begingroup$ @batFINGER Might be worth discussing on right-click select (if you haven't already) $\endgroup$ Commented Nov 29, 2019 at 13:36

1 Answer 1

2
$\begingroup$

Change driver type to scripted expression, (from sum variables) call your variables say sk1 and sk2 and make the expression

3 * sk1 + 2 * sk2 

or

sum(3 * sk1, 2 * sk2)

Currently you are typing an expression var * 3 into the name field of the variable hence the error.

To do this with sum variables driver type would need to add the sk1 variable 3 times and the sk2 variable twice. (all with unique names)

$\endgroup$
3
  • $\begingroup$ I think there's a typo, you might have pressed enter after the first ` character $\endgroup$
    – Luciano
    Commented Nov 29, 2019 at 14:13
  • $\begingroup$ Cheers went from inline eg between backticks to tabbed. Thanks. Feel free to edit stuff like that. $\endgroup$
    – batFINGER
    Commented Nov 29, 2019 at 14:27
  • $\begingroup$ I thought it'd be quicker to just tell you this time, since the answer is quite 'fresh' and my edit would be put on a queue $\endgroup$
    – Luciano
    Commented Nov 29, 2019 at 15:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .