First you will require a mesh and something to drive the shapekey. Here im using a Mesh 'Cube' extruded two times, and an Armature 'Armature' with two bones 'Bone' and 'Bone.001'. So, remembering the Blender Python exporters, I volunteered to write an export script for Blender, so it could be used as level editor. And it worked out very well, Blender can be completely used as level editor for that game now. In this tutorial we'll learn how to write a simple Python export script for Blender. I made a little test scene for using them for controlling wheels when vehicle follows path. I did not find any previous examples of doing this so here is my solution: When the length of the curve (actual length, not path length) and radius of the wheel are known, the rotation can be calculated based on Speed-curve that controls the vehicle motion. Crack sage 100 v14. Here is the expression from my sample file: b.Ipo.Get(“ppspeed”).getCurve(“Speed”).evaluate(b. Get(“curframe”)) * (47.5/21.1) * (-36) 47.5 is the lenght of the path and 21.1 is perimeter of the wheel. I did not quite understand the logic of the rotation handling of this driver. Rotations are n * 10 degrees, so if I want to rotate object 90 degrees, the script must output 9. Thas why there is 36 in the expression above. System Information Win 7 64 bit Blender Version 2.76 Short description of error The length of scripted expression strings is limited to 256 characters. A misfeature rather than a bug, but something that I ran into and I don't know how to get around. Exact steps for others to reproduce the error I have a script that imports duf/dsf files from Daz Studio. In the Genesis3 character, the face is deformed by bones, but it is more convenient to manipulate high-level facial expressions and visemes, which I have mapped to object properties that drive the face bones. The problem is that Daz has created many of these, and the length of the expression string grows too big. As an illustration, the first expression that becomes too big is the following: Expression: 0.000+(0.0187*x00)+(0.0627*x01)+(-0.0017*x02)+(-0.0006*x03)+(0.0627*x04)+(0.0588 *x05)+(-0.0003*x06)+(0.0017*x07)+(-0.0067*x08)+(0.0602*x09)+(0.0058*x10)+(0.0009 *x11)+(0.1198*x12)+(-0.0083*x13)+(0.0012*x14)+(-0.0119*x15)+(-0.0187*x16)+(0.014 8*x17)+(-0.0043*x18) Variables. X00: ['eCTRLCheeksBalloon'] x01: ['eCTRLCheeksBalloonPucker'] x02: ['eCTRLLipBottomUp-DownR'] x03: ['eCTRLLipsPart'] x04: ['eCTRLLipsPucker'] x05: ['eCTRLLipsPuckerWide'] x06: ['eCTRLMouthCornerBackR'] x07: ['eCTRLMouthCornerUp-Down'] x08: ['eCTRLMouthFrown'] x09: ['eCTRLMouthNarrowR'] x10: ['eCTRLMouthOpen'] x11: ['eCTRLMouthOpenWide'] x12: ['eCTRLMouthSide-SideL'] x13: ['eCTRLMouthSide-SideR'] x14: ['eCTRLMouthSmile'] x15: ['eCTRLMouthSmileOpen'] x16: ['eCTRLMouthSmileSimpleR'] x17: ['eCTRLvAA'] x18: ['eCTRLvEE'] ERROR: Cannot add driver ['eCTRLvEE'] to bone rLipLowerOuter. Expression too long. It is the first string that contains more than 256 characters. The expression is put in an ordinary string before assigning it to the driver, in order to generate a better error message. I don't expect that anybody human would write such a thing, but a script can. The script halts when it has created a too long string; otherwise it would add more variables. As you might guess from the variable names, there are at least half a dozen more visemes waiting to be loaded.
0 Comments
Leave a Reply. |