Forum: Poser Python Scripting


Subject: Looking for script - morphed .obj exporter

Spanki opened this issue on Oct 22, 2005 ยท 11 posts


Spanki posted Mon, 31 October 2005 at 6:43 PM

Good tip, but I never found my way around Compose and I think it might have trouble reading P6 files (?). At any rate, since there didn't seem to be an existing Python solution to this issue, I decided to get my Python feet wet and managed to come up with something that works... mostly. The current script just bakes the currently dialed in morphs to the figure's geometry, so when you export the mesh (as morph target), it includes the morphs, but none of the rig-induced errors (yay!). There are a few ways I could refine this process, but having never programmed Python, I'm not quite sure how to do some (very simple) things I need to do in order to implement the changes I have in mind. In particular, I want to create a (boolean type) array of a runtime-determined size -> 'numVerts', initialize the values to zero and be able set and later check values in that array. If someone could fill me in with a quickie example of that, that would be great. For example: . . . numVerts = geom.NumVertices() myboolarray = ?? # <-- how do I allocate a simple array of 'numVert' size and set all the values to zero? ...I assume once that's done, I can later just: myboolarray[i] = 1 ...to set values and... if( not myboolarray[i] ) do_something_here() ...to test for values, but I'm just unclear on allocating the array to start with. - Keith

Cinema4D Plugins (Home of Riptide, Riptide Pro, Undertow, Morph Mill, KyamaSlide and I/Ogre plugins) Poser products Freelance Modelling, Poser Rigging, UV-mapping work for hire.