Community
3ds Max Forum
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I want to update a particle flow shape instance with maxscript.

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
531 Views, 2 Replies

I want to update a particle flow shape instance with maxscript.

I'm trying to write a script that corresponds to the Update Particle Shape button.
It does n’t work. Is there a good way?

2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

By the way, I want to update the assigned material.

Even if you turn on / off the Acquire_Material of the shape instance, it will not be updated.

To be precise, it will not work if written in a function or dialog.

Message 3 of 3
Anonymous
in reply to: Anonymous

This has been resolved. It was the effect of undo off defined in the running ui. 

Set the function used below.

 

fn pf_source_shapeins=(
print "pf_source shape ins"
selll = (execute"selection as array")

gtcmp = getCommandPanelTaskMode()
buttonnames = #("パーティクル シェイプを更新","Update Particle Shape")

max modify mode

for ob in (execute"objects as array") do(
if classof ob.baseobject == Shape_Instance do(
select ob
maxChildren = windows.getChildrenHWND (windows.getMaxHWND())
trfl = false
for child in maxChildren while trfl == false do(
fnds = finditem buttonnames child[5]
if fnds > 0 do(
UIAccessor.pressButton child[1]
trfl = true
)
)
)
)
setCommandPanelTaskMode gtcmp
clearSelection()
select selll
)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report