[Bf-blender-cvs] [686a4f7] temp_custom_loop_normals: Nuke CopySplitNormals, txdata proved to be able to handle that nicely, as expected.

Bastien Montagne noreply at git.blender.org
Mon Jan 19 22:25:25 CET 2015


Commit: 686a4f7370bada1323dca8a1db6293c9b41af585
Author: Bastien Montagne
Date:   Mon Jan 19 21:28:44 2015 +0100
Branches: temp_custom_loop_normals
https://developer.blender.org/rB686a4f7370bada1323dca8a1db6293c9b41af585

Nuke CopySplitNormals, txdata proved to be able to handle that nicely, as expected.

===================================================================

M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesrna/RNA_access.h
M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/modifiers/CMakeLists.txt
M	source/blender/modifiers/MOD_modifiertypes.h
D	source/blender/modifiers/intern/MOD_copysplitnormal.c
M	source/blender/modifiers/intern/MOD_util.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index fabbc84..b1cedcf 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1022,8 +1022,6 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
 						UI_icon_draw(x, y, ICON_MOD_DATA_TRANSFER); break;
 					case eModifierType_SetSplitNormal:
 						UI_icon_draw(x, y, ICON_MOD_SETSPLITNORMAL); break;
-					case eModifierType_CopySplitNormal:
-						UI_icon_draw(x, y, ICON_MOD_SETSPLITNORMAL); break;  /* XXX, needs own icon */
 					/* Default */
 					case eModifierType_None:
 					case eModifierType_ShapeKey:
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 456553e..e8349ce 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -84,7 +84,6 @@ typedef enum ModifierType {
 	eModifierType_Wireframe         = 48,
 	eModifierType_DataTransfer      = 49,
 	eModifierType_SetSplitNormal    = 50,
-	eModifierType_CopySplitNormal    = 51,
 	NUM_MODIFIER_TYPES
 } ModifierType;
 
@@ -1436,27 +1435,4 @@ enum {
 	MOD_SETSPLITNORMAL_USE_PARALLEL_TRACKTO = (1 << 3),
 };
 
-/* Copy Split Normals modifier */
-typedef struct CopySplitNormalModifierData {
-	ModifierData modifier;
-	char defgrp_name[64];  /* MAX_VGROUP_NAME */
-	struct Object *target;  /* Source of normals, or center of ellipsoid. */
-	short flags;
-	short mode;
-	short pad[2];
-} CopySplitNormalModifierData;
-
-/* CopySplitNormalModifierData.mode */
-enum {
-	MOD_COPYSPLITNORMAL_MODE_GEOM_FACENOR = 1,
-	MOD_COPYSPLITNORMAL_MODE_GEOM_LOOPNOR = 2,
-};
-
-/* CopySplitNormalModifierData.flags */
-enum {
-	MOD_COPYSPLITNORMAL_INVERT_VGROUP = (1 << 0),
-	MOD_COPYSPLITNORMAL_USE_CURCLNORS = (1 << 1),
-};
-
-
 #endif  /* __DNA_MODIFIER_TYPES_H__ */
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index e1a5b18..3b71e58 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -191,7 +191,6 @@ extern StructRNA RNA_Controller;
 extern StructRNA RNA_CopyLocationConstraint;
 extern StructRNA RNA_CopyRotationConstraint;
 extern StructRNA RNA_CopyScaleConstraint;
-extern StructRNA RNA_CopySplitNormalModifier;
 extern StructRNA RNA_CopyTransformsConstraint;
 extern StructRNA RNA_Curve;
 extern StructRNA RNA_CurveMap;
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 2b3f89f..ef839bd 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -64,14 +64,13 @@ EnumPropertyItem modifier_type_items[] = {
 	{0, "", 0, N_("Modify"), ""},
     {eModifierType_DataTransfer, "DATA_TRANSFER", ICON_MOD_DATA_TRANSFER, "Data Transfer", ""},
 	{eModifierType_MeshCache, "MESH_CACHE", ICON_MOD_MESHDEFORM, "Mesh Cache", ""},
+    {eModifierType_SetSplitNormal, "SET_SPLIT_NORMAL", ICON_MOD_SETSPLITNORMAL, "Set Split Normals", ""},
 	{eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
 	{eModifierType_UVWarp, "UV_WARP", ICON_MOD_UVPROJECT, "UV Warp", ""},
 	{eModifierType_WeightVGEdit, "VERTEX_WEIGHT_EDIT", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Edit", ""},
 	{eModifierType_WeightVGMix, "VERTEX_WEIGHT_MIX", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Mix", ""},
 	{eModifierType_WeightVGProximity, "VERTEX_WEIGHT_PROXIMITY", ICON_MOD_VERTEX_WEIGHT,
 	                                  "Vertex Weight Proximity", ""},
-	{eModifierType_SetSplitNormal, "SET_SPLIT_NORMAL", ICON_MOD_SETSPLITNORMAL, "Set Split Normals", ""},
-	{eModifierType_CopySplitNormal, "COPY_SPLIT_NORMAL", ICON_MOD_SETSPLITNORMAL, "Copy Split Normals", ""},
 	{0, "", 0, N_("Generate"), ""},
 	{eModifierType_Array, "ARRAY", ICON_MOD_ARRAY, "Array", ""},
 	{eModifierType_Bevel, "BEVEL", ICON_MOD_BEVEL, "Bevel", ""},
@@ -361,8 +360,6 @@ static StructRNA *rna_Modifier_refine(struct PointerRNA *ptr)
 			return &RNA_DataTransferModifier;
 		case eModifierType_SetSplitNormal:
 			return &RNA_SetSplitNormalModifier;
-		case eModifierType_CopySplitNormal:
-			return &RNA_CopySplitNormalModifier;
 		/* Default */
 		case eModifierType_None:
 		case eModifierType_ShapeKey:
@@ -427,7 +424,6 @@ static void rna_##_type##Modifier_##_prop##_set(PointerRNA *ptr, const char *val
 RNA_MOD_VGROUP_NAME_SET(Armature, defgrp_name);
 RNA_MOD_VGROUP_NAME_SET(Bevel, defgrp_name);
 RNA_MOD_VGROUP_NAME_SET(Cast, defgrp_name);
-RNA_MOD_VGROUP_NAME_SET(CopySplitNormal, defgrp_name);
 RNA_MOD_VGROUP_NAME_SET(Curve, name);
 RNA_MOD_VGROUP_NAME_SET(DataTransfer, defgrp_name);
 RNA_MOD_VGROUP_NAME_SET(Decimate, defgrp_name);
@@ -520,7 +516,6 @@ RNA_MOD_OBJECT_SET(Array, end_cap, OB_MESH);
 RNA_MOD_OBJECT_SET(Array, curve_ob, OB_CURVE);
 RNA_MOD_OBJECT_SET(Boolean, object, OB_MESH);
 RNA_MOD_OBJECT_SET(Cast, object, OB_EMPTY);
-RNA_MOD_OBJECT_SET(CopySplitNormal, target, OB_MESH);
 RNA_MOD_OBJECT_SET(Curve, object, OB_CURVE);
 RNA_MOD_OBJECT_SET(DataTransfer, ob_source, OB_MESH);
 RNA_MOD_OBJECT_SET(Lattice, object, OB_LATTICE);
@@ -4390,52 +4385,6 @@ static void rna_def_modifier_setsplitnormal(BlenderRNA *brna)
 	RNA_def_property_update(prop, 0, "rna_Modifier_update");
 }
 
-static void rna_def_modifier_copysplitnormal(BlenderRNA *brna)
-{
-	StructRNA *srna;
-	PropertyRNA *prop;
-
-	static EnumPropertyItem prop_mode_items[] = {
-		{MOD_COPYSPLITNORMAL_MODE_GEOM_FACENOR, "FACE_NORMALS", 0, "Face Normals", "From a mesh's face normals"},
-		{MOD_COPYSPLITNORMAL_MODE_GEOM_LOOPNOR, "SPLIT_NORMALS", 0, "Split Normals", "From a mesh's split normals"},
-		{0, NULL, 0, NULL, NULL}
-	};
-
-	srna = RNA_def_struct(brna, "CopySplitNormalModifier", "Modifier");
-	RNA_def_struct_ui_text(srna, "Set Split Normal Modifier", "Modifier copying split normals from a target geometry");
-	RNA_def_struct_sdna(srna, "CopySplitNormalModifierData");
-	RNA_def_struct_ui_icon(srna, ICON_MOD_SETSPLITNORMAL);
-
-	prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
-	RNA_def_property_enum_items(prop, prop_mode_items);
-	RNA_def_property_ui_text(prop, "Mode", "How to copy normals");
-	RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
-	prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
-	RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
-	RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name for selecting/weighting the affected areas");
-	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_CopySplitNormalModifier_defgrp_name_set");
-	RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
-	prop = RNA_def_property(srna, "use_invert_vertex_group", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_COPYSPLITNORMAL_INVERT_VGROUP);
-	RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence");
-	RNA_def_property_update(prop, 0, "rna_Modifier_update");
-
-	prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
-	RNA_def_property_ui_text(prop, "Target", "Target object used to copy normals from");
-	RNA_def_property_pointer_funcs(prop, NULL, "rna_CopySplitNormalModifier_target_set", NULL, NULL);
-	RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
-	RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
-
-	prop = RNA_def_property(srna, "use_current_custom_split_normals", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_COPYSPLITNORMAL_USE_CURCLNORS);
-	RNA_def_property_boolean_default(prop, true);
-	RNA_def_property_ui_text(prop, "Use Custom Split Normals",
-	                         "Use current custom split normals as basis, instead of auto-computed ones, if available");
-	RNA_def_property_update(prop, 0, "rna_Modifier_update");
-}
-
 void RNA_def_modifier(BlenderRNA *brna)
 {
 	StructRNA *srna;
@@ -4551,7 +4500,6 @@ void RNA_def_modifier(BlenderRNA *brna)
 	rna_def_modifier_wireframe(brna);
 	rna_def_modifier_datatransfer(brna);
 	rna_def_modifier_setsplitnormal(brna);
-	rna_def_modifier_copysplitnormal(brna);
 }
 
 #endif
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index b9b93ed..ec40f4a 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -51,7 +51,6 @@ set(SRC
 	intern/MOD_cast.c
 	intern/MOD_cloth.c
 	intern/MOD_collision.c
-	intern/MOD_copysplitnormal.c
 	intern/MOD_curve.c
 	intern/MOD_datatransfer.c
 	intern/MOD_decimate.c
diff --git a/source/blender/modifiers/MOD_modifiertypes.h b/source/blender/modifiers/MOD_modifiertypes.h
index 8c7b4f6..54bec1f 100644
--- a/source/blender/modifiers/MOD_modifiertypes.h
+++ b/source/blender/modifiers/MOD_modifiertypes.h
@@ -83,7 +83,6 @@ extern ModifierTypeInfo modifierType_LaplacianDeform;
 extern ModifierTypeInfo modifierType_Wireframe;
 extern ModifierTypeInfo modifierType_DataTransfer;
 extern ModifierTypeInfo modifierType_SetSplitNormal;
-extern ModifierTypeInfo modifierType_CopySplitNormal;
 
 /* MOD_util.c */
 void modifier_type_init(ModifierTypeInfo *types[]);
diff --git a/source/blender/modifiers/intern/MOD_copysplitnormal.c b/source/blender/modifiers/intern/MOD_copysplitnormal.c
deleted file mode 100644
index 54b0d52..0000000
--- a/source/blender/modifiers/intern/MOD_copysplitnormal.c
+++ /dev/null
@@ -1,545 +0,0 @@
-/*
- * ***** 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
- * of the License, or (at your option) any later version.
- *
- * 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., 51 Franklin Street, Fifth Floor, Bo

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list