Howto set a python parameter in a text box

110 views
Skip to first unread message

Rc Spam

unread,
Jun 19, 2015, 7:27:48 AM6/19/15
to Natro...@googlegroups.com
Hi,
How to write a user python parameter in the text box of Text Node.
How to escape its name.
thanx

Alexandre

unread,
Jun 19, 2015, 9:47:12 AM6/19/15
to Rc Spam, Natro...@googlegroups.com
You would have to set an expression on the text parameter of the Text node referring to the python parameter 
--
You received this message because you are subscribed to the Google Groups "Natron" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Natron-VFX+...@googlegroups.com.
To post to this group, send email to Natro...@googlegroups.com.
Visit this group at http://groups.google.com/group/Natron-VFX.
To view this discussion on the web visit https://groups.google.com/d/msgid/Natron-VFX/7d466dca-2bac-45ce-b23f-1af1acc05338%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rc Spam

unread,
Jun 19, 2015, 10:25:37 AM6/19/15
to Natro...@googlegroups.com, rcs...@gmail.com
If i write for example "thisNode.testParam.get()" in the "set expression" of text param of the Text Node, testParam being a new user parameter (using the user param manager), the value of testParam should be displayed ?
I have surely misunderstand something here,  if i do that, nothing is displayed

Very sorry for my misunderstanding...

screenshot1.png

Rc Spam

unread,
Jun 20, 2015, 3:33:40 AM6/20/15
to Natro...@googlegroups.com
Someone can tell me what have i do wrong ?
Thank you

Alexandre

unread,
Jun 20, 2015, 4:02:55 AM6/20/15
to Rc Spam, Natro...@googlegroups.com
You should post a video so we can tell you what’s wrong, here is how I do it:


On 20 Jun 2015, at 09:33, Rc Spam <rcs...@gmail.com> wrote:

Someone can tell me what have i do wrong ?
Thank you


--
You received this message because you are subscribed to the Google Groups "Natron" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Natron-VFX+...@googlegroups.com.
To post to this group, send email to Natro...@googlegroups.com.
Visit this group at http://groups.google.com/group/Natron-VFX.

Rc Spam

unread,
Jun 20, 2015, 4:26:18 AM6/20/15
to Natro...@googlegroups.com, rcs...@gmail.com
what you do in your screen shot is ok for me.
I just want that the value of a user parameter create with "user parameter manager" (right clik on properties node) appears in the text canvas of the viewer.
e.g. useful for write the frame number in viewer or to write some variables in a text....
I just want to know how to write it in the text box in order to natron interpret it as variable and not as text.


Alexandre

unread,
Jun 20, 2015, 4:34:00 AM6/20/15
to Rc Spam, Natro...@googlegroups.com
You have to set an expression on the text parameter, eg. :  thisGroup.otherParam.get() + “blablabla”.
The Text field does not recognise expressions by itself 

--
You received this message because you are subscribed to the Google Groups "Natron" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Natron-VFX+...@googlegroups.com.
To post to this group, send email to Natro...@googlegroups.com.
Visit this group at http://groups.google.com/group/Natron-VFX.

Rc Spam

unread,
Jun 20, 2015, 4:34:25 AM6/20/15
to Natro...@googlegroups.com
Here is screencast.

thanx

Alexandre

unread,
Jun 20, 2015, 4:39:28 AM6/20/15
to Rc Spam, Natro...@googlegroups.com
The text parameter of the Text node is holding a String, while you are trying to input it a number.
You have instead to write the following expression:

str(thisGroup.numericParameter.get())

This will cast to string the number 

On 20 Jun 2015, at 10:34, Rc Spam <rcs...@gmail.com> wrote:

Here is screencast.

thanx

--
You received this message because you are subscribed to the Google Groups "Natron" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Natron-VFX+...@googlegroups.com.
To post to this group, send email to Natro...@googlegroups.com.
Visit this group at http://groups.google.com/group/Natron-VFX.

Rc Spam

unread,
Jun 20, 2015, 6:29:59 AM6/20/15
to Natro...@googlegroups.com, rcs...@gmail.com
Very thanx, that's all i wanna know, i'm not a python geek ;)

tagliapietr...@gmail.com

unread,
Jun 15, 2016, 6:22:51 PM6/15/16
to Natron, rcs...@gmail.com
Hi there,

is it possible to declare the value of the parameter from command line?

Bests
Reply all
Reply to author
Forward
Message has been deleted
0 new messages