Notifications
Clear all

[Closed] Multiple array of 2

I need the following help:

The specific question is if the initial selection of objects is a multiple of 2 that performs an action and if it is not a multiple of 2 that performs a different action

If a selection of objects is converted into an array and this is a multiple of 2 for example there are a total of 8 objects that perform a defined action for example all the objects are scaled differently.

On the other hand if the array is not multiple of 2 for example there are a total of 13 objects to that array a different action is applied, for example that its rotation is different in all the objects.

2 Replies

One way:

(
	case (mod selection.count 2 == 0) of
	(
		 true: print "even number"
		false: print "odd number"
	)
)

Excellent, it’s exactly what I needed
Thank you very much.