Notifications
Clear all

[Closed] random values on selection of copies

Former title: random values on selection of copies

Hi!
I built an object where I took some params to Parameter-Collector. Now I want to copy (actually I have to merge it again and again otherwise there will be only one paramcollector for my first obj) this object several time and have random values on these params for each copy.

I think it can’t be too complicated to select all objects after copiing and build a easy script that modifies these params. But now where to start:
How do I get the exact names for my parameters I have in ParameterCollection?
How do I store my selection in an an array and go throug it changing eachs random value (I think “for j in selection do …” will do this)?

I found the blur Do-it-Script that does somehow what I want, but it works only on one param after each other and I can’t access all params I need to change with it.

So as soon as I find out about how to get those names I think my script should look like this:

for j in selection do
{
parametername_1 = random 0 100
parametername_2 = random 0.24 0.27

}

3 Replies

Hmmm, simply looking the names up in ScriptListener doesn’t work.

Changing one of my spinners in ParameterCollector brings up the message:

meditMaterials[1].materialList[2].diffuseMap.mapList[1].map1.map1.Flag__3__Texture.MixAmount = 40.1

I tried to simply copy this to the bottom part of the Listener, but when hitting Enter it sais

    • Unknown property: “Flag__3__Texture” in WandTex:Gradient Ramp

OK, maybe I have to ask more precise:

How do I find the correct parametername in ms to edit?

I need to access my materials via:

 for i in selection do 
(
i.material.FINDTHERIGHTPROPERTYNAME = random 1 100
)

Looking at Listener while changing params only gives me the propertyname in the form:

meditMaterials[1]. ...

How can I get from these names to the ones relative from my object?

Finally found it myself in Bobos beginners tutorial:

the command showproperties shows all the names!