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 CustomData;
|
|
|
|
|
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;
|
|
|
|
|
struct TexResult;
|
2010-04-11 22:12:30 +00:00
|
|
|
|
2012-04-10 14:11:45 +00:00
|
|
|
void modifier_init_texture(struct Scene *scene, struct Tex *texture);
|
Fix #36058: Displace Modifier errors using a baked Image and displace baking inconsistency between 2.67/2.68RC and previous versions
This was in fact really nasty bug, caused by multitex_nodes
function using global variable R (which is a copy of current
renderer). this variable is not initialized to anything
meaningful for until first rendering (preview or final)
happened.
Since multitex_nodes might be used outside of render pipeline,
made it so whether CM is on or off as an argument to functions
multitex_ext_safe and multitex_ext. Now multitex_nodes() is
only shall be used for stuff happening from render pipeline!
Also needed to make some changes to other places, so all the
usages of texture sampling knows for the fact whether CM is
on or off.
And one more change is related on behavior of dispalcement,
wave, warp, weightvg modifiers and smoke. They'll be always
using CM off since texture is used for influence, not for
color.
It's rather bigger patch, but it's mostly straightforward
changes, which we really need to be done.
Reviewed by Brecht, thanks!
2013-07-15 14:47:58 +00:00
|
|
|
void get_texture_value(struct Scene *scene, struct Tex *texture, float *tex_co, struct TexResult *texres, bool do_color_manage);
|
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);
|
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
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __MOD_UTIL_H__ */
|