Page 1 of 1

Python / Scatterer: get time variance per instance

Unread postPosted: Fri Jan 10, 2020 5:28 pm
by dziga
Hey there,

I'm finally getting my hands dirty with Clarisse and I am working on a scatterer exporter.
I already read through some very useful forum posts but I am currently stuck with getting the time variance per instance from the scatterer.
I thought that maybe the 'frame' or 'frame_offset' attribute on the alembic is driven by the scatterer and that I have to grab this one but this just gave me the current frame on the timeline (or the static offset value currently entered on the alembic).

How would one go about this? ^.^ Is there a nice and simple attribute to grab from the scatterer/instance?

Any help, pointer, insight, comment is greatly appreciated!

Thank you!!
Dziga

Re: Python / Scatterer: get time variance per instance

Unread postPosted: Mon Jan 13, 2020 10:30 am
by adomon
Hello

I'm sorry, but there is no method exposed in the scatterer to get per instance time offset.
It's now in our roadmap, and the function will be available in one of the next release coming soon.

Sorry for the inconvenience

Antoine

Re: Python / Scatterer: get time variance per instance

Unread postPosted: Tue Jan 14, 2020 1:03 pm
by dziga
Hey Antoine,

ah, that's a shame but I am glad to hear it will be implemented in the future!

Thank you!
Dziga

Re: Python / Scatterer: get time variance per instance

Unread postPosted: Wed Mar 03, 2021 11:19 am
by adomon
Hello

A little update to announce the new method to get the time offset of instances have just been added, and it will be available in the next major release.
Here a sample showing how to use it when it will be available :

Code: Select all
times = ix.api.FloatArray()
ix.selection[0].get_module().get_instances_time_offset(times)


Antoine

Re: Python / Scatterer: get time variance per instance

Unread postPosted: Wed Mar 17, 2021 4:19 pm
by dcourtois
Hi all,

Another little update to announce a slight change to the method:

python code

time_offsets = ix.selection[0].get_module().get_instances_time_offsets()

It's a bit easier to use like this, and it was missing a `s` at the end.