This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/python/api2_2x/Material.h
Willian Padovani Germano 7b3b3ae432 Trying to fix bug reported by Peter den Bak and Meino Christian Cramer (thanks!):
-- splash screen disappeared (duh, I did that!) and Blender quits upon exiting from some 225 games:

It was troublesome to find how to run demos in general with the screen correctly redrawn before they started, etc.  Ended up making the above error in screenmain().  About the games, I don't have them and will need some time to get the files for testing, but I'll do it, though only on linux.

BPython:
-- Window: added GetScreens, SetScreen and improved GetScreenInfo.
-- Object, NMesh: updated (added in NMesh) method getMaterials to return either only valid materials as before or also empty slots (as None).  This previous omission can be considered a bug, since it made info about materials incomplete / incompatible with face mat indices.  Thanks Yann Vernier for bringing this up and sending/proposing a patch that also fixed a bug related to assigning lists of materials with different lengths to obj and its mesh. setMaterials also accepts Py_None entries now, which become empty slots in Blender.
-- doc updates.
2004-07-20 08:16:46 +00:00

70 lines
2.4 KiB
C++

/*
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
*
* This is a new part of Blender.
*
* Contributor(s): Willian P. Germano
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#ifndef EXPP_MATERIAL_H
#define EXPP_MATERIAL_H
#include <Python.h>
#include <DNA_material_types.h>
#include <BKE_material.h>
#include "rgbTuple.h"
/*****************************************************************************/
/* Python BPy_Material structure definition: */
/*****************************************************************************/
typedef struct {
PyObject_HEAD
Material *material;
BPy_rgbTuple *col, *amb, *spec, *mir;
} BPy_Material;
extern PyTypeObject Material_Type; /* The Material PyType Object */
#define BPy_Material_Check(v) \
((v)->ob_type == &Material_Type) /* for type checking */
/*****************************************************************************/
/* Module Blender.Material - public functions */
/*****************************************************************************/
PyObject *M_Material_Init (void);
PyObject *Material_CreatePyObject (Material *mat);
Material *Material_FromPyObject (PyObject *pyobj);
int Material_CheckPyObject (PyObject *pyobj);
/* Some functions needed by NMesh.c */
PyObject *EXPP_PyList_fromMaterialList (Material **matlist, int len, int all);
Material **EXPP_newMaterialList_fromPyList (PyObject *list);
Material **EXPP_newMaterialList(int len);
#endif /* EXPP_MATERIAL_H */