Tools/Debugging/PyFromC

Note that this is a very specific debugging/testing facility, if you are new to debugging its probably not what your looking for.

Rationale
This function lets you set one line in your code which calls python to execute code, modifying C/C++ variables, so you can write and test code while blenders running - renders/animates/redraws.

Python running in C is nothing new, but normally this is done with predefined API glue code which has strict entry points, where setting up a proper API would be prohibitively slow for quick tests in the middle of a C function.

Usage
PyC_RunQuicky("script.py", vars...)
 * Add a line into your code.
 * create a python script that edits values, a list which stores each variable given.
 * Run blender and modify the script leaving blender open, modifications to values are copied back into blender after each execution.

Example
Having C call python is just one function call.

The first argument is the file to run, the second is the number of arguments, the rest are format & pointer pairs. This formatting is passed onto struct.pack/unpack.

The script can be very simple, just modify values in place.

Summery
Pros Cons
 * immediate feedback.
 * quick setup.
 * no need to write api wrapper code.
 * access to blender python modules like bgl and mathutils.
 * not so useful when the fix involves changes in many places.
 * not so useful for modifying structures or pointers.
 * allows for bad practice - "trial & error, without understanding".