Cloning a Field loader doesn’t retain the proper Mask channels, and ‘update channels’ doesn’t repopulate them either. Have to re-pick the file sequence to update properly.
v 2.0.11.55986
Repro:
Create a FieldLoader
Pick an FXD sequence. Verify it has smoke/fire/velocity.
Clone the FieldLoader. The mask is set to No Mask and none of the previous masks are available.
I was able to reproduce it.
Logging as bug.
It looks like a C++ issue, but you can fix it temporarily via a MAXScript call.
*Locate the file Stoke_Field.ms in your Stoke installation and open it for editing.
*Go to around line 1705 (might be slightly different depending on your version) and look for the code block
try
(
local theInterface = stokeGlobalInterface.CreateMXSField selection[1] StackIndex:0
local theChannels = theInterface.Channels
for aChannel in theChannels do
(
theChannel = (filterString aChannel " []")
if theChannel[3] == "1" do append theScalars theChannel[1]
if theChannel[3] == "3" do append theVectors theChannel[1]
)
theInterface.Clear()
)catch()
*Change it by adding the following line before the ‘local theInterface…’ part:
try
(
selection[1].baseobject.delegate.FilenamePattern = selection[1].baseobject.delegate.FilenamePattern --> NEW CODE!
local theInterface = stokeGlobalInterface.CreateMXSField selection[1] StackIndex:0
local theChannels = theInterface.Channels
for aChannel in theChannels do
(
theChannel = (filterString aChannel " []")
if theChannel[3] == "1" do append theScalars theChannel[1]
if theChannel[3] == "3" do append theVectors theChannel[1]
)
theInterface.Clear()
)catch()
Basically this sets the file name of the cloned object to the same value again (same as repicking it) before the lists are updated.
Of course, the correct fix would be to update the field data on clone in the C++ plugin. It looks like the Field Loader’s field is not initialized after cloning and the stokeGlobalInterface.CreateMXSField() function gets nothing from it when I call it. Or something like that.
We uploaded a new build today, so I am not sure when the next update will be.