Notifications
Clear all

[Closed] new challenge for a brain-twister lover

can you find all Particle Flow Classes nodes in a scene? (see the Particle Flow Classes topic in the mxs help for the list)[color=white][/color]

24 Replies

how about the catch…

node.numPViewParamBlocks() or classof node == Event
?

oops scratch that


  for i in objects do 
(
	if classof (refs.dependents i)[2] == Particle_View or classof i == PF_Source then
		print i
)

?

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

i’ve played both of this methods… and both have a problem…

most of PF classes (maybe all) can be created without a Particle View


 Birth()
 

the category doesn’t exactly identifies the class. everyone can make any scripted plugin in category “Particle_Flow”


 plugin Helper FakeParticles
 	name:"FakeParticles"
 	classID:#(0x5d14073f, 0x21b14957)
 	extends:Dummy
 	category:"Particle_Flow"
 (
 	rollout params ""
 	(
 	)
 )
 FakeParticles()
 

and both of these methods anyway missing one class

I’ve caught all the nodes, the Particle Flow systems and the Events…

(for o in objects where o.category == #Particle_Flow or o.category == #Particle_Systems or classof o == Event collect o).count

What have I missed Denis?

Klunk, I catch one more than yours in my test scene.

in mine yours returns 1 too many (hint not all particle systems are particle flow).

I can count 34 bits in my pflow view, your function only returns 33.

so what does it miss ?

Strange… I just did it again and yours got 34 also…

 most of PF classes (maybe all) can be created without a Particle View

maybe so but

b = birth();
   classof (refs.dependents b)[2]

still returns Particle_View

and both of these methods anyway missing one class

were you talking of the particle view ?

for i in objects do 
  (
  	if classof (refs.dependents i)[2] == Particle_View or classof i == PF_Source or classof i == Particle_View then
  		print i
  )

yes. that was it

Page 1 / 2