ScriptSpot

Forum topic · General Scripting

Change value of custom modifiers

By mdrorum · 2012-06-22

Description

Hello, I try set values of a custom modifers.

Moving the slider, the listener show that:
$.modifiers[#Hip_controls].Hip_controls.Squash/stretch multiplier = 0.7079

But a copy/paste of the same:
$.modifiers[#Hip_controls].Hip_controls.Squash/stretch multiplier = 0.7079
in the command line give me this error:

-- No ""="" function for (%"/"() (prop squash (prop Hip_controls ((prop modifiers* (%"getDollarSel"()))[#Hip_controls]))) (Global:Stretch Global:multiplier))

Other custom modifiers works:
$.modifiers[#Hip_controls].Hip_controls.Chest position influence = 84.27
but using "_" like this:
$.modifiers[#Hip_controls].Hip_controls.Chest_position_influence = 84.27
the command line give me: 84.27

I supose my problem is the "/" character. Dont?

Help me please and sorry my poor english.

Oscar from Madrid.

Comments (5)

mdrorum · 2012-06-22

;)

mdrorum · 2012-06-22

Solved. Thanks!
The caption of modifier label is "Hip_controls.Squash/stretch multiplier"
but the variable name is "Squash_stretch_multiplier"
A rocky mistake. :|

barigazy · 2012-06-22

"/" sign break the code line, and "_" connect code line.
And this is also important ":)" - make a smile,man

barigazy · 2012-06-22

If you have problem you need to post Cust.Modifier code here if you want some help.

barigazy · 2012-06-22

Yes "/" is the problem.
You must replace every space between chars with "_".