forked from bartvdbraak/blender
code cleanup: unused defines, shadowing and unintended enum-as-variable.
This commit is contained in:
parent
1d68c28541
commit
9379dcb507
@ -26,15 +26,14 @@
|
|||||||
* \ingroup audaspaceintern
|
* \ingroup audaspaceintern
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// needed for INT64_C
|
// needed for INT64_C
|
||||||
#ifndef __STDC_CONSTANT_MACROS
|
#ifndef __STDC_CONSTANT_MACROS
|
||||||
#define __STDC_CONSTANT_MACROS
|
#define __STDC_CONSTANT_MACROS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_PYTHON
|
#ifdef WITH_PYTHON
|
||||||
#include "AUD_PyInit.h"
|
# include "AUD_PyInit.h"
|
||||||
#include "AUD_PyAPI.h"
|
# include "AUD_PyAPI.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
@ -207,8 +207,10 @@ void BLF_lang_free(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ULANGUAGE ((U.language >= 0 && U.language < num_locales) ? U.language : 0)
|
#ifdef WITH_INTERNATIONAL
|
||||||
#define LOCALE(_id) (locales ? locales[(_id)] : "")
|
# define ULANGUAGE ((U.language >= 0 && U.language < num_locales) ? U.language : 0)
|
||||||
|
# define LOCALE(_id) (locales ? locales[(_id)] : "")
|
||||||
|
#endif
|
||||||
|
|
||||||
void BLF_lang_set(const char *str)
|
void BLF_lang_set(const char *str)
|
||||||
{
|
{
|
||||||
|
@ -1132,7 +1132,6 @@ static void node_draw(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTre
|
|||||||
void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNodeInstanceKey parent_key)
|
void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNodeInstanceKey parent_key)
|
||||||
{
|
{
|
||||||
bNode *node;
|
bNode *node;
|
||||||
bNodeInstanceKey key;
|
|
||||||
bNodeLink *link;
|
bNodeLink *link;
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
@ -1146,6 +1145,7 @@ void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeT
|
|||||||
|
|
||||||
/* draw background nodes, last nodes in front */
|
/* draw background nodes, last nodes in front */
|
||||||
for (a = 0, node = ntree->nodes.first; node; node = node->next, a++) {
|
for (a = 0, node = ntree->nodes.first; node; node = node->next, a++) {
|
||||||
|
bNodeInstanceKey key;
|
||||||
|
|
||||||
#ifdef USE_DRAW_TOT_UPDATE
|
#ifdef USE_DRAW_TOT_UPDATE
|
||||||
/* unrelated to background nodes, update the v2d->tot,
|
/* unrelated to background nodes, update the v2d->tot,
|
||||||
|
@ -5742,10 +5742,10 @@ static void createTransNodeData(bContext *UNUSED(C), TransInfo *t)
|
|||||||
|
|
||||||
/* * motion tracking * */
|
/* * motion tracking * */
|
||||||
|
|
||||||
enum {
|
enum transDataTracking_Mode {
|
||||||
transDataTracking_ModeTracks = 0,
|
transDataTracking_ModeTracks = 0,
|
||||||
transDataTracking_ModeCurves = 1,
|
transDataTracking_ModeCurves = 1
|
||||||
} transDataTracking_Mode;
|
};
|
||||||
|
|
||||||
typedef struct TransDataTracking {
|
typedef struct TransDataTracking {
|
||||||
int mode, flag;
|
int mode, flag;
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
/* State */
|
/* State */
|
||||||
|
|
||||||
#define NUM_OPENGL_LIGHTS 8
|
// #define NUM_OPENGL_LIGHTS 8
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
GPUShader *cached_shaders[GPU_SHADER_OPTION_COMBINATIONS];
|
GPUShader *cached_shaders[GPU_SHADER_OPTION_COMBINATIONS];
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
* to access C defined builtin functions.
|
* to access C defined builtin functions.
|
||||||
* A script writer should never directly access this module.
|
* A script writer should never directly access this module.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define WITH_PYTHON /* for AUD_PyInit.h, possibly others */
|
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
|
||||||
|
@ -107,9 +107,10 @@ static PyObject *make_app_info(void)
|
|||||||
if (app_info == NULL) {
|
if (app_info == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
#define SetIntItem(flag) \
|
#define SetIntItem(flag) \
|
||||||
PyStructSequence_SET_ITEM(app_info, pos++, PyLong_FromLong(flag))
|
PyStructSequence_SET_ITEM(app_info, pos++, PyLong_FromLong(flag))
|
||||||
|
#endif
|
||||||
#define SetStrItem(str) \
|
#define SetStrItem(str) \
|
||||||
PyStructSequence_SET_ITEM(app_info, pos++, PyUnicode_FromString(str))
|
PyStructSequence_SET_ITEM(app_info, pos++, PyUnicode_FromString(str))
|
||||||
#define SetBytesItem(str) \
|
#define SetBytesItem(str) \
|
||||||
|
@ -131,6 +131,7 @@ static PyObject *PyInit_gpu(void)
|
|||||||
PyDict_SetItemString(d, # f, val); \
|
PyDict_SetItemString(d, # f, val); \
|
||||||
Py_DECREF(val)
|
Py_DECREF(val)
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#define PY_OBJ_ADD_ID(d, s, f) \
|
#define PY_OBJ_ADD_ID(d, s, f) \
|
||||||
val = PyUnicode_FromString(&s->f->id.name[2]); \
|
val = PyUnicode_FromString(&s->f->id.name[2]); \
|
||||||
PyObject_SetAttrString(d, # f, val); \
|
PyObject_SetAttrString(d, # f, val); \
|
||||||
@ -145,6 +146,7 @@ static PyObject *PyInit_gpu(void)
|
|||||||
val = PyUnicode_FromString(s->f); \
|
val = PyUnicode_FromString(s->f); \
|
||||||
PyObject_SetAttrString(d, # f, val); \
|
PyObject_SetAttrString(d, # f, val); \
|
||||||
Py_DECREF(val)
|
Py_DECREF(val)
|
||||||
|
#endif
|
||||||
|
|
||||||
PyDoc_STRVAR(GPU_export_shader_doc,
|
PyDoc_STRVAR(GPU_export_shader_doc,
|
||||||
"export_shader(scene, material)\n"
|
"export_shader(scene, material)\n"
|
||||||
|
@ -67,10 +67,6 @@ extern "C"{
|
|||||||
#include "BLI_blenlib.h"
|
#include "BLI_blenlib.h"
|
||||||
#include "BLI_math.h"
|
#include "BLI_math.h"
|
||||||
|
|
||||||
#define __NLA_DEFNORMALS
|
|
||||||
//#undef __NLA_DEFNORMALS
|
|
||||||
|
|
||||||
|
|
||||||
BL_ModifierDeformer::~BL_ModifierDeformer()
|
BL_ModifierDeformer::~BL_ModifierDeformer()
|
||||||
{
|
{
|
||||||
if (m_dm) {
|
if (m_dm) {
|
||||||
|
Loading…
Reference in New Issue
Block a user