Jul 2012
1 / 3
Jul 2012
Jul 2012

Hey everyone, so I am writing a plugin that will take selected animated objects and combine them into a new mesh and bake the mesh positions out to a geometry cache.

Everything is working great as far as creating a new mesh from the object's mesh data and even updating the vertex positions, but I am stumped on the geometry cache part.

Could someone point me in the right direction or briefly describe the process of hooking up and creating a geometry cache from scratch? I don't quite understand all the node connections and I feel that I am missing some important parts.

Is it possible to create a geometry cache soley from the API ?

Any information would be much appreciated. Thank you! 

  • created

    Jul '12
  • last reply

    Jul '12
  • 2

    replies

  • 2.4k

    views

  • 1

    user

Well for starters did you make a node or what?

Is it possible to create a geometry cache soley from the API ?

Obviously, you can use the scripting layer trough api so it stands to reason you can do anything you can do in the scripting layer with the api. Since the gui only does scripting layer stuff you can doe everything you can do in the gui. However for maya to do anything useful you MUST provide your data in form of a node.

But yes even if you wanted to do this purely in api commands wth no scripts its possible, but counter productive. If you dont understand why then read: New To The Api? Then Read This!.

Theres really no reason to involve the API for what your doing tough. That is unless you have soime really exotic, badly made, custom node your bakeing down. All you need to do is merge the data with normal merge, possibly put a shape node in between, run cache, then delete the merge nodes and their connections. This to all intents and purposes as effective as doing it in the API. (buttakes 5 minutes to do*, and is fully forwards compatible with no need to recompile)

You only really need the API if you are missing some node to do the work for you, or you need to integrate some third party library.

  • actually tested this and it took 2 minutes to do manually and then 3 minutes to script out for polygonal objects.