From fbf208d63fe0ba9770cb225726eb94888aa0994d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 14 Oct 2010 06:29:17 +0000 Subject: add UNUSED() to modifiers, also removed some unused args. --- source/blender/modifiers/intern/MOD_util.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_util.c') diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 754b18bc282..de96684a2dd 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -84,13 +84,13 @@ void validate_layer_name(const CustomData *data, int type, char *name, char *out /* if a layer name was given, try to find that layer */ if(name[0]) - index = CustomData_get_named_layer_index(data, CD_MTFACE, name); + index = CustomData_get_named_layer_index(data, type, name); if(index < 0) { /* either no layer was specified, or the layer we want has been * deleted, so assign the active layer to name */ - index = CustomData_get_active_layer_index(data, CD_MTFACE); + index = CustomData_get_active_layer_index(data, type); strcpy(outname, data->layers[index].name); } else @@ -98,13 +98,13 @@ void validate_layer_name(const CustomData *data, int type, char *name, char *out } /* returns a cdderivedmesh if dm == NULL or is another type of derivedmesh */ -DerivedMesh *get_cddm(struct Scene *scene, Object *ob, struct EditMesh *em, DerivedMesh *dm, float (*vertexCos)[3]) +DerivedMesh *get_cddm(Object *ob, struct EditMesh *em, DerivedMesh *dm, float (*vertexCos)[3]) { if(dm && dm->type == DM_TYPE_CDDM) return dm; if(!dm) { - dm= get_dm(scene, ob, em, dm, vertexCos, 0); + dm= get_dm(ob, em, dm, vertexCos, 0); } else { dm= CDDM_copy(dm); @@ -118,7 +118,7 @@ DerivedMesh *get_cddm(struct Scene *scene, Object *ob, struct EditMesh *em, Deri } /* returns a derived mesh if dm == NULL, for deforming modifiers that need it */ -DerivedMesh *get_dm(struct Scene *scene, Object *ob, struct EditMesh *em, DerivedMesh *dm, float (*vertexCos)[3], int orco) +DerivedMesh *get_dm(Object *ob, struct EditMesh *em, DerivedMesh *dm, float (*vertexCos)[3], int orco) { if(dm) return dm; @@ -143,7 +143,7 @@ DerivedMesh *get_dm(struct Scene *scene, Object *ob, struct EditMesh *em, Derive } /* only called by BKE_modifier.h/modifier.c */ -void modifier_type_init(ModifierTypeInfo *types[], ModifierType type) +void modifier_type_init(ModifierTypeInfo *types[]) { memset(types, 0, sizeof(types)); #define INIT_TYPE(typeName) (types[eModifierType_##typeName] = &modifierType_##typeName) -- cgit v1.2.3 From b2be78c0ccbeb24995584ad7d5c70ae9f49ef04a Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 27 Dec 2010 19:26:38 +0000 Subject: Bugfix #25392 Compositor: Texture node didn't use texture-nodes itself. Now composites initialize texture nodes correctly. Also reviewed the fix for crashing texture nodes for displace. It appears texture nodes also are used for sculpt/paint brushes, in these cases it can be allowed again. But, don't do this during rendering for now! --- source/blender/modifiers/intern/MOD_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/modifiers/intern/MOD_util.c') diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index de96684a2dd..cbf2bd8af4b 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -53,7 +53,8 @@ void get_texture_value(Tex *texture, float *tex_co, TexResult *texres) { int result_type; - result_type = multitex_ext(texture, tex_co, NULL, NULL, 0, texres); + /* no node textures for now */ + result_type = multitex_ext_safe(texture, tex_co, texres); /* if the texture gave an RGB value, we assume it didn't give a valid * intensity, so calculate one (formula from do_material_tex). -- cgit v1.2.3 From 8f21a43535cb200c0569566a1b012aec883aa53c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 7 Jan 2011 18:36:47 +0000 Subject: split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h. no functional changes. --- source/blender/modifiers/intern/MOD_util.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/modifiers/intern/MOD_util.c') diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index cbf2bd8af4b..0b92794051c 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -36,6 +36,8 @@ #include "DNA_object_types.h" #include "DNA_curve_types.h" +#include "BLI_utildefines.h" + #include "BKE_cdderivedmesh.h" #include "BKE_mesh.h" #include "BKE_displist.h" -- cgit v1.2.3 From 89c9aaaa25cc7ce60c305d8e30e1c008cb117cf1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 7 Jan 2011 19:18:31 +0000 Subject: remove references to BKE_utildefines where its not needed. - move GS() define into DNA_ID.h - add BLI_utildefines as an automatic include with makesrna generated files. --- source/blender/modifiers/intern/MOD_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/modifiers/intern/MOD_util.c') diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 0b92794051c..036ae276a7b 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -41,7 +41,7 @@ #include "BKE_cdderivedmesh.h" #include "BKE_mesh.h" #include "BKE_displist.h" -#include "BKE_utildefines.h" + #include "BKE_modifier.h" #include "MOD_util.h" -- cgit v1.2.3 From 55f68c36574779ae2fac3652466584628b22c633 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 12 Feb 2011 16:54:24 +0000 Subject: fix for more warnings. - modifier code was using sizeof() without knowing the sizeof the array when clearing the modifier type array. - use BLI_snprintf rather then sprintf where the size of the string is known. - particle drawing code kept a reference to stack float values (not a problem at the moment but would crash if accessed later). --- source/blender/modifiers/intern/MOD_util.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source/blender/modifiers/intern/MOD_util.c') diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 036ae276a7b..8ea717469a3 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -148,7 +148,6 @@ DerivedMesh *get_dm(Object *ob, struct EditMesh *em, DerivedMesh *dm, float (*ve /* only called by BKE_modifier.h/modifier.c */ void modifier_type_init(ModifierTypeInfo *types[]) { - memset(types, 0, sizeof(types)); #define INIT_TYPE(typeName) (types[eModifierType_##typeName] = &modifierType_##typeName) INIT_TYPE(None); INIT_TYPE(Curve); -- cgit v1.2.3 From 5b607701a7541c328cc058e10bd7a8c6d0c998ab Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Wed, 23 Feb 2011 10:52:22 +0000 Subject: doxygen: prevent GPL license block from being parsed as doxygen comment. --- source/blender/modifiers/intern/MOD_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/modifiers/intern/MOD_util.c') diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 8ea717469a3..2cc9c6601c7 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** -- cgit v1.2.3 From caa7bea1c591277556b5cf3a076e90f1804a84f6 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Fri, 25 Feb 2011 13:57:17 +0000 Subject: doxygendoxygen: blender/modifiers tagged. --- source/blender/modifiers/intern/MOD_util.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/modifiers/intern/MOD_util.c') diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 2cc9c6601c7..8c94e6f65bc 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -30,6 +30,11 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file blender/modifiers/intern/MOD_util.c + * \ingroup modifiers + */ + + #include #include "DNA_modifier_types.h" -- cgit v1.2.3