Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Operator Prefix in replicator

Helpful techniques for working with TouchDesigner. Answers only, no questions.

Operator Prefix in replicator

Postby franzrosati » Fri Jan 12, 2018 1:12 pm

hi there,

I'm trying to generate replicated items with replicator script,
I need every new item to have a 3 digits incremental number after the name,
can I use something like
Code: Select all
 'name_' + '%f.3'
in python?

thanks!
franzrosati
 
Posts: 12
Joined: Sun Dec 05, 2010 5:47 pm

Re: Operator Prefix in replicator

Postby prochoy » Mon Jan 15, 2018 7:21 pm

The replicator callbacks have several arguments you can loop through to do simple things like this - such as newOps or allOps. A simple example is below demonstrating what you are looking for...

Code: Select all
   digits = 0
   for c in newOps:
      c.name = 'name_{}'.format(digits)
      digits += 3
prochoy
 
Posts: 65
Joined: Wed Dec 31, 2014 2:20 pm


Return to Techniques

Who is online

Users browsing this forum: No registered users and 1 guest