Jump to content

Batch output Cache for GrowFX Objects


Recommended Posts

  • 3 weeks later...
  • 2 weeks later...

Hello Usman,

 

Sorry for the delay, for some reason I missed your post...

 

You can try this code:

for gfx in selection do (
	if (classOf gfx) == GrowFX then (
		gfx.CacheMode = on
		filename = "E:\\GfxFiles\\" + gfx.name + ".gfxcache"
		gfx.NewCacheFile filename
		gfx.OneFile = on
		gfx.RecordCurrentFrame = on
		gfx.RecordAnimation = off
		gfx.RecordCache()
	)
)

 

You need to select objects and execute this code.
The folder for cache files must exist.

 

Thanks!

Link to comment
Share on other sites

On 7/20/2024 at 12:29 AM, Eduard said:

Hello Usman,

 

Sorry for the delay, for some reason I missed your post...

 

You can try this code:

for gfx in selection do (
	if (classOf gfx) == GrowFX then (
		gfx.CacheMode = on
		filename = "E:\\GfxFiles\\" + gfx.name + ".gfxcache"
		gfx.NewCacheFile filename
		gfx.OneFile = on
		gfx.RecordCurrentFrame = on
		gfx.RecordAnimation = off
		gfx.RecordCache()
	)
)

 

You need to select objects and execute this code.
The folder for cache files must exist.

 

Thanks!

Thankyou so much this Eduard !!!! This works perfectly, but its only working for growfx 1.9 and not for objects in growfx 2.0. Can you please do another one for growfx 2.0 ?

Link to comment
Share on other sites

On 7/20/2024 at 12:29 AM, Eduard said:

Hello Usman,

 

Sorry for the delay, for some reason I missed your post...

 

You can try this code:

for gfx in selection do (
	if (classOf gfx) == GrowFX then (
		gfx.CacheMode = on
		filename = "E:\\GfxFiles\\" + gfx.name + ".gfxcache"
		gfx.NewCacheFile filename
		gfx.OneFile = on
		gfx.RecordCurrentFrame = on
		gfx.RecordAnimation = off
		gfx.RecordCache()
	)
)

 

You need to select objects and execute this code.
The folder for cache files must exist.

 

Thanks!

Please if you can update this to include growfx2.0 as well. 

Link to comment
Share on other sites

  • 2 weeks later...
On 8/9/2024 at 5:34 AM, Eduard said:

 

Hello Usman,

 

I think you just need to change this line like this:

if (classOf gfx) == GrowFX2 then (

Thanks!

hey @Eduard,

 

I initially tried doing that and didnt work. I tried it again and it gives this error. I think some options have changed in 2.0 or have been removed and that is why this doesnt work

 

 image.png.dc9de37fa1dcdb7cd3abc3568f188929.png

even thought the path is in the script it does update the path in growfx but no file is created in that folder. Also the record doesnt switch to current frame after running it. 

 

Can you please give it a go and let me know what do I need to change as its not working. Thankyou !

Link to comment
Share on other sites

  • 3 weeks later...
On 8/27/2024 at 5:20 PM, Eduard said:

Sorry, I forgot to answer your question.

 

Try to remove this line:

gfx.OneFile = on

The error is that GrowFX2 doesn't have the OneFile property.

 

Thanks!

 

sorry but yeah I tried that as well initially but didnt work, it doesnt record the cache file. Can you please test it ? 

Link to comment
Share on other sites

1 hour ago, Usman said:

sorry but yeah I tried that as well initially but didnt work, it doesnt record the cache file. Can you please test it ? 

 

Yes, you are right, it didn't work properly.
I noticed some bug in file name creation via MaxScript.
We've fixed it now and I can send you an update for version 2.0.1.
What version of 3dsMax do you have?

 

Thanks for your bug report!

Link to comment
Share on other sites

16 hours ago, Eduard said:

 

Yes, you are right, it didn't work properly.
I noticed some bug in file name creation via MaxScript.
We've fixed it now and I can send you an update for version 2.0.1.
What version of 3dsMax do you have?

 

Thanks for your bug report!

oh awesome, thank you so much for this. Can you please send the version for 2023 and 2025. 

Link to comment
Share on other sites

On 9/4/2024 at 5:59 AM, Eduard said:

Ok, I sent the updates via private message.

Thanks!

So I updated the growfx version but seem to be running into the same issue. It keeps giving error on lines 

                gfx.RecordCurrentFrame = on
                gfx.RecordAnimation = off         
       gfx.RecordCache()

Not sure why , but can you please test it. Also it adds the extra "_0000" at the end of each file name

Link to comment
Share on other sites

On 9/11/2024 at 8:41 AM, Usman said:

So I updated the growfx version but seem to be running into the same issue. It keeps giving error on lines 

                gfx.RecordCurrentFrame = on
                gfx.RecordAnimation = off         
       gfx.RecordCache()

Not sure why , but can you please test it. Also it adds the extra "_0000" at the end of each file name

 

Hi Usman,

Sorry again for the delay in replying!

 

This code works for me without errors:

for gfx in selection do (
	if (classOf gfx) == GrowFX2 then (
		gfx.CacheMode = on
		filename = "E:\\GfxFiles\\" + gfx.name + ".gfxcache"
		gfx.NewCacheFile filename
		gfx.RecordCurrentFrame = on
		gfx.RecordAnimation = off
		gfx.RecordCache()
	)
)

 

Are you confused by the addition of the characters "_0000" to the file name?

GrowFX works with these files through the user interface without problems.


But I noticed a problem if you try to open this file via MaxScript:

-- // $ - a new Growfx2 object...
$.CacheMode = on
$.RecordCurrentFrame = on
$.RecordAnimation = off
$.LoadCacheFile "E:\\GfxFiles\\GrowFX001.gfxcache"

In theory, it should open the file GrowFX003_0000.gfxcache, but it does not.

 

We fixed that too, and I can send you an update if needed. Just let me know.

 

Thanks!

Link to comment
Share on other sites

On 9/11/2024 at 3:50 AM, schellicon said:

how do we see when this update comes out ? in my login download i see newest Version is :February 10, 2023 ... which i know .. it`s not true ...the downloadable is newer... this bugs me forever till now ! would be cool to have here more love :)

Hi schellicon,

 

At the moment we haven't updated our plugin on the server yet, but once we do, you'll get a message in 3dsmax directly when you first launch GrowFX.

This message will only appear once, and you won't see it on subsequent launches.

Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...