Deleting parts from BinLoader using script corrupts scene

Post Reply
laura@ghostproductions.com
Posts: 2
Joined: Thu Sep 17, 2015 10:34 pm

Deleting parts from BinLoader using script corrupts scene

Post by laura@ghostproductions.com » Thu Sep 17, 2015 10:53 pm

I want to delete some particles from binary loader over frames.
If I do it manually frame by frame, it won't cause any problem.
(select particle using Particle Selection tool, remove particle, rebuild mesh)

I tried to automate this process using following script;

Code: Select all

emitter = Binary_LoaderBlood
mesher = BloodMesh
firstframe = 5201
lastframe = 5740

removep = emitter.getSelectedParticles("group 1")
removeid = []
for partic in removep:
	pid = partic.getId()
	removeid.append(pid)

for frame in range (firstframe, lastframe +1):
	scene.setCurrentFrame(frame)
	for parti in removeid:
		emitter.removeParticle(parti)
	emitter.export()
	mesher.build()
	mesher.export()
This script runs fine, it removes selected particle and builds new mesh as expected.
However, every time I try to save the scene file after running this script, RealFlow crushes and I will never be able to open the scene file again.
Can anyone think of any cause of it?
I'm using RealFlow2014 and 2015, both cause the same error.

Another question, is this the best place to report bug?
I couldn't find anywhere else to report.

User avatar
atena
Site Admin
Posts: 112
Joined: Fri Jun 04, 2010 1:25 pm

Re: Deleting parts from BinLoader using script corrupts scen

Post by atena » Fri Sep 18, 2015 3:33 pm

Thank you for this report. It is indeed a bug we have to fix. In the meantime there is a workaround for it. Just before saving your scene go to the "Tools->Particle Selection", select the group you have deleted in your script and click on "Del group" button. Now you can save/load your scene.

Sorry for this inconvenience.

BTW, when you remove particles is a good practice to disable "painting" just to speed up the process. See this code:

Code: Select all

scene.enablePaint( False )
for parti in removeid:
   emitter.removeParticle(parti)
scene.enablePaint( True )
Angel Tena
Head of RealFlow Technology
Next Limit Technologies

laura@ghostproductions.com
Posts: 2
Joined: Thu Sep 17, 2015 10:34 pm

Re: Deleting parts from BinLoader using script corrupts scen

Post by laura@ghostproductions.com » Fri Sep 18, 2015 4:28 pm

Oh great.
Thank you for your quick reply!

User avatar
atena
Site Admin
Posts: 112
Joined: Fri Jun 04, 2010 1:25 pm

Re: Deleting parts from BinLoader using script corrupts scen

Post by atena » Fri Sep 18, 2015 4:38 pm

I'm glad to inform you that this bug has been fixed and will be part of the next patch version of RF2015, scheduled for early October 2015.

Thank you for your report.
Angel Tena
Head of RealFlow Technology
Next Limit Technologies

Post Reply