PDA

View Full Version : Snapshot vs. SnapshotAsMesh (and a thank you)


lehthanis
07-08-2008, 03:13 PM
First...I want to dump a thank you to Bobo, PEN, eek, Prof420, and everyone else in this sub-forum thats helped me weed my way through making this export script. Its coming along super-nicely right now, and I'm exporting 3d assets to xplane that only need a small bit of hand massaging, of which I'm slowly getting to the point of not having to do. I know I've been a little needy, and for that I apologize...I genuinely appreciate both the help and the gentle nudging to find things on my own...After this post I'm going to go read about vectors because thats the only thing that remains on this script is calculating the rotation vector...

Which leads me to my thread topic here.

Because my exporter does some scaling and rotating so the exported mesh will match up with the simulators scale and reference system...I'm using snapshotasmesh and doing all the export work on those in-memory copies. It works great at NOT disturbing the mesh in its native state...but it only works (I think) on the actual geometry bits...

I've got some point helpers that also need to get scaled and rotated...so I used all the fantastic scale/rotate code eek helped me with and prefaced it with a snapshot of the helpers.

This DOES work...it leaves my original helpers in place...BUT...at the end of the program execution, the snapshots of the helpers that were scaled and rotated still exist in my scene...which tells me that snapshot makes a physical copy...not an in-memory copy.

So...

Is that the primary difference between: tmesh = snapshotAsMesh currentObj and ANIMRotPivot = snapshot currentPointHelper?

I'm pretty sure I can just have my script delete the snapshots they left behind at the end...but I wanted to make sure there isn't already another way built into the snapshot operation.

eek
07-08-2008, 07:22 PM
snapShotasMesh will definately make a copy of an object in the scene. And as you said, just after you've made it append it to an array and delete that at the end.

ssArr = #()

append ssArr tmpMesh

delete ssArr

lehthanis
07-08-2008, 08:04 PM
when I do tmesh = snapshotAsMesh objName it doesn't create a physical copy in my scene...just in memory, and I don't have to perform any deletes...

Its the snapshot that seems to be making physical copies.

I'll give that a shot tho. Thanks!

CGTalk Moderation
07-08-2008, 08:04 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.