out = embed_node.change_ext('.' + c.type + 'c') sub_task.set_outputs(out) sub_task.set_run_after(task) out = node.change_ext('.goc') task.set_outputs([out] + embed_output_nodes) except (google.protobuf.text_format.ParseError, google.protobuf.message.EncodeError, Exception) as e: stderr_lock.acquire() try: print >> sys.stderr, '%s: %s' % (node.srcpath(self.env), str(e)) finally: stderr_lock.release() return 1 proto_compile_task('collection', 'gameobject_ddf_pb2', 'CollectionDesc', '.collection', '.collectionc', transform_collection) proto_compile_task('collectionproxy', 'gamesys_ddf_pb2', 'CollectionProxyDesc', '.collectionproxy', '.collectionproxyc', transform_collectionproxy) proto_compile_task('particlefx', 'particle.particle_ddf_pb2', 'particle_ddf_pb2.ParticleFX', '.particlefx', '.particlefxc', transform_particlefx) proto_compile_task('convexshape', 'physics_ddf_pb2', 'ConvexShape', '.convexshape', '.convexshapec') proto_compile_task('collisionobject', 'physics_ddf_pb2', 'CollisionObjectDesc', '.collisionobject', '.collisionobjectc', transform_collisionobject) proto_compile_task('gui', 'gui_ddf_pb2', 'SceneDesc', '.gui', '.guic', transform_gui) proto_compile_task('camera', 'camera_ddf_pb2', 'CameraDesc', '.camera', '.camerac')
from TaskGen import extension from waf_content import proto_compile_task def configure(conf): pass def transform_material(task, msg): msg.vertex_program = msg.vertex_program.replace('.vp', '.vpc') msg.fragment_program = msg.fragment_program.replace('.fp', '.fpc') return msg proto_compile_task('material', 'render.material_ddf_pb2', 'material_ddf_pb2.MaterialDesc', '.material', '.materialc', transform_material) Task.simple_task_type( 'fontmap', '${JAVA} -classpath ${CLASSPATH} com.dynamo.bob.font.Fontc ${SRC} ${CONTENT_ROOT} ${TGT}', color='PINK', after='proto_gen_py', before='cc cxx', shell=False) @extension('.font') def font_file(self, node): classpath = [self.env['DYNAMO_HOME'] + '/share/java/bob-light.jar'] fontmap = self.create_task('fontmap')