Example #1
0
static void populate_bake_data(BakeData *data, BL::BakePixel pixel_array, const int num_pixels)
{
	BL::BakePixel bp = pixel_array;

	int i;
	for(i=0; i < num_pixels; i++) {
		data->set(i, bp.primitive_id(), bp.uv());
		bp = bp.next();
	}
}
Example #2
0
static void populate_bake_data(BakeData *data, const int object_id, BL::BakePixel pixel_array, const int num_pixels)
{
	BL::BakePixel bp = pixel_array;

	int i;
	for(i=0; i < num_pixels; i++) {
		if(bp.object_id() == object_id) {
			data->set(i, bp.primitive_id(), bp.uv(), bp.du_dx(), bp.du_dy(), bp.dv_dx(), bp.dv_dy());
		} else {
			data->set_null(i);
		}
		bp = bp.next();
	}
}