Notifications
Clear all

[Closed] new challenge for a brain-twister lover

try to reset max and run the code again

if PView_Manager doesn’t exist the system itself doesn’t create Particle Views

you could also use

object.classid[2] == 515064320 or object.classid[2] == 515064321

though for some reason that id in mxs doesn’t match the value in pluginapi.h in the sdk (which seems it should be 515063808).

so that would make it…

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

ignoring mxs no creatables.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

there is the same problem as a category use. I can make scripted plugin with the same second part of id. And more… I do it all the time if want to make a node hidden for any max built-in node selector.

also there are some built-in plugins that use the same id[2] but they are not a particle at all.
check the list:


for c in helper.classes where c.creatable and c.classid[2] == 0x1EB34200 collect c

it seems like I already gave you too many hints …

how about…

(for i in objects where (getInterface i.baseobject "PViewItem") != undefined collect i)
3 Replies
(@denist)
Joined: 11 months ago

Posts: 0

wow!!! that’s super cool. it’s better than mine! i don’t see any pitfalls.

(@denist)
Joined: 11 months ago

Posts: 0

because we have a leader (claude666) i show my version:


   fn findParticleFlowClasses = 
   (
   	events = getclassinstances Event
   	pfs = #()
   	for e in events do 
   	(
   		if isvalidnode (ev = refs.dependentnodes e firstonly:on) do append pfs ev
   		join pfs (refs.dependson (refs.dependson e)[1])
   	)
   	pfs
   )
   
(@davewortley)
Joined: 11 months ago

Posts: 0

GetInterface is a new one on me… clever stuff, have some brownie points for beating Denis!

should have twigged on the interface method earlier as I’ve been adding particle flow to my SDK exporter and all the access to them is via interfaces on the base objects and I knew the common denominator for all particle flow objects is the particle view window

i didn’t work too much with particles. so the ‘interface’ idea looks really good for me.

i use this search for a ‘scene clean-up’. because user can see only visible particle nodes he deletes sometimes only them. but the rest of other related nodes still stays. and they keep send/receive messages.

i had this interface idea yesterday but according to the reference, not a single one of the pflow interfaces are implemented in ALL pflow nodes. eg. Collision node does not implement PViewItem. BUT i didnt actually test it… After testing it seems that it’s just missing from the docs, even in 2013 docs…

Page 2 / 2