You'll consider C++ but not something simpler like JScript of VBScript? Seems rather odd logic.

Anyway, how you access information is important. Calling Envelopes(0).GetWeights2().Array as a single statement will incur more overhead than doing this:

   var oEnvelope = Envelopes(0);
   var oWeights = oEnvelope.GetWeights2();
   var aWeightData = oWeights.Array;

Every time you call a property or method, you prod the system to allocate resources to satisfy the request. There are limits to how much memory you can grab at a time, as you've encountered, and by asking for all of it at once you're more likely to exhaust it. By separating statements you split the allocation into 3 separate smaller pools, which if taken to the limits, allows you to access more memory than with a single transaction and with less worry of bumping into the ceiling.

It's more code to write, but it'll work more efficiently in the case you're dealing with. Works particularly well with JScript ;-)


Matt






Date: Fri, 30 Oct 2015 14:50:26 -0400
From: Eric Thivierge <[email protected]>
Subject: Envelope Weights Array, out of memory error
To: "[email protected]"

Hello all,

Right off the bat, no I'm not going to use VBScript or JScript.

I'm running into an issue in Python that I'm pretty sure is just a simple
case of literally out of memory that Python has available but I'm posting
anyway to see if anyone has ideas.

I have a mesh with ~350k points and 498 skin deformers. When I try to
access the Weights Array it errors out saying Out of Memory Error in Python.

Code:
Envelopes(0).GetWeights2().Array

This simply doesn't work. Anyone have any ideas on how to get around this
in Python or should I look to other tools for this?

I'm guessing I need to get a buddy to write me a C++ command instead.

Thanks in advance.

--------------------------------------------
Eric Thivierge
http://www.ethivierge.com

Reply via email to