BPython - first step for better integration of Python in Blender:
- add a new space: Space Script - add a new dna struct: Script - add these two properly everywhere they are meant to It's not a tiny commit, but most of it is ground work for what is still to be done. Right now the benefits should be: freeing the Text Editor to be used in a window even while a script w/ gui in "on" and letting more than one currently running script w/ gui be accessible from each window Some files are added, so some build systems (not autotools) will need updates
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
#include "gen_utils.h"
|
||||
#include "constant.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Description: This function clamps an int to the given interval */
|
||||
@@ -184,13 +185,9 @@ PyObject *EXPP_tuple_repr(PyObject *self, int size)
|
||||
Py_DECREF(item);
|
||||
}
|
||||
|
||||
|
||||
return repr;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/****************************************************************************/
|
||||
/* Description: searches through a map for a pair with a given name. If the */
|
||||
/* pair is present, its ival is stored in *ival and nonzero is */
|
||||
@@ -238,20 +235,16 @@ int EXPP_map_getShortVal (const EXPP_map_pair *map,
|
||||
/* and nonzero is returned. If the pair is absent, zero is */
|
||||
/* returned. */
|
||||
/****************************************************************************/
|
||||
int EXPP_map_getStrVal (const EXPP_map_pair *map,
|
||||
int ival, const char **sval)
|
||||
int EXPP_map_getStrVal (const EXPP_map_pair *map, int ival, const char **sval)
|
||||
{
|
||||
while (map->sval)
|
||||
while (map->sval)
|
||||
{
|
||||
if (ival == map->ival)
|
||||
{
|
||||
if (ival == map->ival)
|
||||
{
|
||||
*sval = map->sval;
|
||||
return 1;
|
||||
}
|
||||
++map;
|
||||
*sval = map->sval;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
++map;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user