store the mesh vertices -> track name verts = Ĥ. set the first key value to 1 for the 1st track and 0 for the othersģ. If(key mesh always has the same number of vertsįrames.append(key.GetTime().GetFrame(fps))īlendvecs.append()Ĭode += '\n\n# shape keys\nverts = ' + str(verts) + '\n'Ĭode += "if(ob.activeShape = 0):\n\tob.insertShapeKey()\n\n"Ĭode += "if editmode: Window.EditMode(0)\n"Ĭode += "for v in range(0,"+str(vertsNum)+"):\n\.x = verts\n\.y = verts\n\.z = verts\n"Ĭode += "if editmode: Window.EditMode(1)\n"Ĭode += "shapeKey = ob.getData().getKey()\n"Ĭode += "newIpo = Ipo.New('Key','newIpo')\n"Ĭode += "if(shapeKey.ipo = None): shapeKey.ipo = newIpo\n"Ĭode += "if(shapeKey.ipo = None): ('Key "+kNum+"')\n" MaxProp = max(enumerate(props), key = lambda tup: len(tup))Ĭode += "Blender.Set('curframe',"+str(maxProp)+")\n" Props.append(key.GetTime().GetFrame(fps)) Print 'Selected Object is not an editable mesh'Ĭode = 'import Blender\nfrom Blender import *\nimport bpy\nfrom Blender.Mathutils import *\n\nscn = \ncontext=scn.getRenderingContext()\ncontext.fps = '+str(fps)+'\ncontext.sFrame = '+str(sFrame)+'\ncontext.eFrame = '+str(eFrame)+'\ncontext.sizeX = '+str(sizeX)+'\ncontext.sizeY = ' + str(sizeY) + '\n'Ĭ4d.DrawViews( c4d.DA_ONLY_ACTIVE_VIEW|c4d.DA_NO_THREAD|c4d.DA_NO_REDUCTION|c4d.DA_STATICBREAK )Ĭode += 'editmode = Window.EditMode()\nif editmode:\tWindow.EditMode(0)\n'Ĭoords += ','Ĭoords = coords.rpartition(',') + ']\n' import c4dįrom c4d import symbols as sy, plugins, utils, bitmaps, gui I needed to export Point Level Animation and Morph Tag animation into Blender so I wrote a little script that handles that. I ended up installing Py4D since I could barely found usable C.O.F.F.E.E.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |