2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2010-04-11 22:12:30 +00:00
|
|
|
* ***** BEGIN GPL 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
|
2011-11-29 10:54:47 +00:00
|
|
|
* of the License, or (at your option) any later version.
|
2010-04-11 22:12:30 +00:00
|
|
|
*
|
2011-11-29 10:54:47 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
2010-04-11 22:12:30 +00:00
|
|
|
* 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
|
2011-11-29 10:54:47 +00:00
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-08-10 21:22:26 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2010-04-11 22:12:30 +00:00
|
|
|
*
|
|
|
|
* Contributor(s): Ben Batt
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
|
2011-02-25 13:57:17 +00:00
|
|
|
/** \file blender/modifiers/intern/MOD_util.h
|
|
|
|
* \ingroup modifiers
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __MOD_UTIL_H__
|
|
|
|
#define __MOD_UTIL_H__
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2011-02-13 14:16:36 +00:00
|
|
|
/* so modifier types match their defines */
|
|
|
|
#include "MOD_modifiertypes.h"
|
|
|
|
|
2010-04-11 22:12:30 +00:00
|
|
|
struct DerivedMesh;
|
2011-07-11 09:15:20 +00:00
|
|
|
struct MDeformVert;
|
2010-04-11 22:12:30 +00:00
|
|
|
struct ModifierData;
|
2011-07-11 09:15:20 +00:00
|
|
|
struct Object;
|
|
|
|
struct Scene;
|
|
|
|
struct Tex;
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2015-03-21 22:10:43 +11:00
|
|
|
void modifier_init_texture(const struct Scene *scene, struct Tex *texture);
|
2012-10-22 15:39:06 +00:00
|
|
|
void get_texture_coords(struct MappingInfoModifierData *dmd, struct Object *ob, struct DerivedMesh *dm,
|
|
|
|
float (*co)[3], float (*texco)[3], int numVerts);
|
2010-04-11 22:12:30 +00:00
|
|
|
void modifier_vgroup_cache(struct ModifierData *md, float (*vertexCos)[3]);
|
2012-10-22 15:39:06 +00:00
|
|
|
struct DerivedMesh *get_cddm(struct Object *ob, struct BMEditMesh *em, struct DerivedMesh *dm,
|
2013-07-16 08:24:53 +00:00
|
|
|
float (*vertexCos)[3], bool use_normals);
|
2012-10-22 15:39:06 +00:00
|
|
|
struct DerivedMesh *get_dm(struct Object *ob, struct BMEditMesh *em, struct DerivedMesh *dm,
|
2013-07-16 08:24:53 +00:00
|
|
|
float (*vertexCos)[3], bool use_normals, bool use_orco);
|
2013-12-26 17:24:42 +06:00
|
|
|
struct DerivedMesh *get_dm_for_modifier(struct Object *ob, ModifierApplyFlag flag);
|
2012-10-22 15:39:06 +00:00
|
|
|
void modifier_get_vgroup(struct Object *ob, struct DerivedMesh *dm,
|
|
|
|
const char *name, struct MDeformVert **dvert, int *defgrp_index);
|
2010-04-25 01:10:03 +00:00
|
|
|
|
2014-01-30 13:06:48 +01:00
|
|
|
/* XXX workaround for non-threadsafe context in OpenNL (T38403)
|
|
|
|
* OpenNL uses global pointer for "current context", which causes
|
|
|
|
* conflict when multiple modifiers get evaluated in threaded depgraph.
|
|
|
|
* This is just a stupid hack to prevent assert failure / crash,
|
|
|
|
* otherwise we'd have to modify OpenNL on a large scale.
|
|
|
|
* OpenNL should be replaced eventually, there are other options (eigen, ceres).
|
|
|
|
* - lukas_t
|
|
|
|
*/
|
|
|
|
#ifdef WITH_OPENNL
|
|
|
|
#define OPENNL_THREADING_HACK
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef OPENNL_THREADING_HACK
|
|
|
|
void modifier_opennl_lock(void);
|
|
|
|
void modifier_opennl_unlock(void);
|
|
|
|
#endif
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __MOD_UTIL_H__ */
|