[Bf-blender-cvs] [d12e367] experimental-build: Revert "Squashed commit of mesh-transfer-data branch."

Bastien Montagne noreply at git.blender.org
Mon Nov 10 11:36:36 CET 2014


Commit: d12e3675b4594946a6290582f68fd4e104eb0f61
Author: Bastien Montagne
Date:   Mon Nov 10 11:36:12 2014 +0100
Branches: experimental-build
https://developer.blender.org/rBd12e3675b4594946a6290582f68fd4e104eb0f61

Revert "Squashed commit of mesh-transfer-data branch."

This reverts commit dc518499c3ef21bde8e8b5acfceba51cd038ecb8.

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

M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/blenkernel/BKE_bvhutils.h
M	source/blender/blenkernel/BKE_customdata.h
D	source/blender/blenkernel/BKE_data_transfer.h
M	source/blender/blenkernel/BKE_deform.h
M	source/blender/blenkernel/BKE_mesh_mapping.h
M	source/blender/blenkernel/BKE_object_deform.h
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/blenkernel/intern/bvhutils.c
M	source/blender/blenkernel/intern/customdata.c
D	source/blender/blenkernel/intern/data_transfer.c
D	source/blender/blenkernel/intern/data_transfer_intern.h
M	source/blender/blenkernel/intern/deform.c
M	source/blender/blenkernel/intern/mesh_mapping.c
M	source/blender/blenkernel/intern/object_deform.c
M	source/blender/editors/include/ED_object.h
M	source/blender/editors/object/CMakeLists.txt
D	source/blender/editors/object/object_data_transfer.c
M	source/blender/editors/object/object_intern.h
M	source/blender/editors/object/object_ops.c
M	source/blender/editors/object/object_vgroup.c
M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/editors/space_view3d/view3d_buttons.c
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesrna/RNA_enum_types.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_datatransfer.c
M	source/blender/modifiers/intern/MOD_util.c

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

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index e78b5e6..efc430d 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1225,94 +1225,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         col.prop(md, "material_offset", text="Material Offset")
 
-    def DATA_TRANSFER(self, layout, ob, md):
-        row = layout.row(align=True)
-        row.prop(md, "ob_source")
-        sub = row.row(align=True)
-        sub.active = bool(md.ob_source)
-        sub.prop(md, "use_object_transform", text="", icon='GROUP')
-
-        layout.separator()
-
-        layout.prop(md, "vert_mapping")
-        col = layout.column(align=True)
-        split = col.split(0.333, align=True)
-        sub = split.column(align=True)
-        sub.prop(md, "data_types_verts_vgroup")
-        row = split.row(align=True)
-        row.prop(md, "fromlayers_vgroup_select", text="")
-        row.label(icon='RIGHTARROW')
-        row.prop(md, "tolayers_vgroup_select", text="")
-        split = col.split(0.333, align=True)
-        sub = split.column(align=True)
-        sub.prop(md, "data_types_verts")
-
-        layout.separator()
-
-        layout.prop(md, "edge_mapping")
-        col = layout.column(align=True)
-        split = col.split(0.333, align=True)
-        sub = split.column(align=True)
-        sub.prop(md, "data_types_edges")
-
-        layout.separator()
-
-        layout.prop(md, "loop_mapping")
-        col = layout.column(align=True)
-        split = col.split(0.333, align=True)
-        sub = split.column(align=True)
-        sub.prop(md, "data_types_loops")
-        split = col.split(0.333, align=True)
-        sub = split.column(align=True)
-        sub.prop(md, "data_types_loops_vcol")
-        row = split.row(align=True)
-        row.prop(md, "fromlayers_vcol_select", text="")
-        row.label(icon='RIGHTARROW')
-        row.prop(md, "tolayers_vcol_select", text="")
-
-        layout.separator()
-
-        layout.prop(md, "poly_mapping")
-        col = layout.column(align=True)
-        split = col.split(0.333, align=True)
-        sub = split.column(align=True)
-        sub.prop(md, "data_types_polys_uv")
-        row = split.row(align=True)
-        row.prop(md, "fromlayers_uv_select", text="")
-        row.label(icon='RIGHTARROW')
-        row.prop(md, "tolayers_uv_select", text="")
-        split = col.split(0.333, align=True)
-        sub = split.column(align=True)
-        sub.prop(md, "data_types_polys")
-
-        layout.separator()
-
-        split = layout.split()
-        col = split.column()
-        row = col.row(align=True)
-        sub = row.row(align=True)
-        sub.active = md.use_max_distance
-        sub.prop(md, "max_distance")
-        row.prop(md, "use_max_distance", text="", icon='STYLUS_PRESSURE')
-
-        col = split.column()
-        col.prop(md, "ray_radius")
-
-        layout.separator()
-
-        split = layout.split()
-        col = split.column()
-        col.prop(md, "mix_mode")
-        col.prop(md, "mix_factor")
-
-        col = split.column()
-        col.prop(md, "use_create")
-        row = col.row(align=True)
-        row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
-        sub = row.row(align=True)
-        sub.active = bool(md.vertex_group)
-        sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
-
 
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 788698c..0ea552e 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1082,7 +1082,6 @@ class VIEW3D_MT_object(Menu):
         layout.separator()
 
         layout.operator("object.join")
-        layout.operator("object.data_transfer")
 
         layout.separator()
 
diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h
index 5a63b44..4bc8fc4 100644
--- a/source/blender/blenkernel/BKE_bvhutils.h
+++ b/source/blender/blenkernel/BKE_bvhutils.h
@@ -31,7 +31,6 @@
  *  \ingroup bke
  */
 
-#include "BLI_bitmap.h"
 #include "BLI_kdopbvh.h"
 
 /*
@@ -57,8 +56,8 @@ typedef struct BVHTreeFromMesh {
 	struct MEdge *edge;     /* only used for BVHTreeFromMeshEdges */
 	struct MFace *face;
 	bool vert_allocated;
-	bool edge_allocated;
 	bool face_allocated;
+	bool edge_allocated;
 
 	/* radius for raycast */
 	float sphere_radius;
@@ -70,27 +69,35 @@ typedef struct BVHTreeFromMesh {
 } BVHTreeFromMesh;
 
 /*
- * Builds a bvh tree where nodes are the relevant elements of the given mesh.
+ * Builds a bvh tree where nodes are the vertexs of the given mesh.
  * Configures BVHTreeFromMesh.
  *
  * The tree is build in mesh space coordinates, this means special care must be made on queries
  * so that the coordinates and rays are first translated on the mesh local coordinates.
- * Reason for this is that bvh_from_mesh_* can use a cache in some cases and so it becomes possible to reuse a BVHTree.
+ * Reason for this is that later bvh_from_mesh_* might use a cache system and so it becomes possible to reuse
+ * a BVHTree.
  * 
  * free_bvhtree_from_mesh should be called when the tree is no longer needed.
  */
 BVHTree *bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
-BVHTree *bvhtree_from_mesh_verts_ex(struct BVHTreeFromMesh *data, struct MVert *vert, const int numVerts,
-                                    const bool vert_allocated, BLI_bitmap *mask, int numVerts_active,
-                                    float epsilon, int tree_type, int axis);
-
-BVHTree *bvhtree_from_mesh_edges(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
 
+/*
+ * Builds a bvh tree where nodes are the faces of the given mesh.
+ * Configures BVHTreeFromMesh.
+ *
+ * The tree is build in mesh space coordinates, this means special care must be made on queries
+ * so that the coordinates and rays are first translated on the mesh local coordinates.
+ * Reason for this is that later bvh_from_mesh_* might use a cache system and so it becomes possible to reuse
+ * a BVHTree.
+ *
+ * The returned value is the same as in data->tree, its only returned to make it easier to test
+ * the success 
+ * 
+ * free_bvhtree_from_mesh should be called when the tree is no longer needed.
+ */
 BVHTree *bvhtree_from_mesh_faces(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
-BVHTree *bvhtree_from_mesh_faces_ex(struct BVHTreeFromMesh *data, struct MVert *vert, const bool vert_allocated,
-                                    struct MFace *face, const int numFaces, const bool face_allocated,
-                                    BLI_bitmap *mask, int numFaces_active,
-                                    float epsilon, int tree_type, int axis);
+
+BVHTree *bvhtree_from_mesh_edges(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
 
 /*
  * Frees data allocated by a call to bvhtree_from_mesh_*.
@@ -108,12 +115,11 @@ float nearest_point_in_tri_surface_squared(const float v0[3], const float v1[3],
  */
 
 //Using local coordinates
-enum {
-	BVHTREE_FROM_VERTS           = 0,
-	BVHTREE_FROM_EDGES           = 1,
-	BVHTREE_FROM_FACES           = 2,
-	BVHTREE_FROM_FACES_EDITMESH  = 3,
-};
+#define BVHTREE_FROM_FACES      0
+#define BVHTREE_FROM_VERTICES   1
+#define BVHTREE_FROM_EDGES      2
+
+#define BVHTREE_FROM_FACES_EDITMESH  3
 
 typedef struct LinkNode *BVHCache;
 
diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h
index 726414d..30a5889 100644
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@ -41,8 +41,6 @@ extern "C" {
 #include "BLI_sys_types.h"
 #include "BLI_utildefines.h"
 
-#include "DNA_customdata_types.h"
-
 struct BMesh;
 struct ID;
 struct CustomData;
@@ -79,9 +77,6 @@ extern const CustomDataMask CD_MASK_EVERYTHING;
 
 void customData_mask_layers__print(CustomDataMask mask);
 
-typedef void (*cd_interp)(void **sources, const float *weights, const float *sub_weights, int count, void *dest);
-typedef void (*cd_copy)(const void *source, void *dest, int count);
-
 /**
  * Checks if the layer at physical offset \a layer_n (in data->layers) support math
  * the below operations.
@@ -101,9 +96,6 @@ bool CustomData_bmesh_has_free(const struct CustomData *data);
  * implemented for mloopuv/mloopcol, for now.*/
 void CustomData_data_copy_value(int type, const void *source, void *dest);
 
-/* Same as above, but doing advanced mixing. Only available for a few types of data (like colors...). */
-void CustomData_data_mix_value(int type, const void *source, void *dest, const int mixmode, const float mixfactor);
-
 /* compares if data1 is equal to data2.  type is a valid CustomData type
  * enum (e.g. CD_MLOOPUV). the layer type's equal function is used to compare
  * the data, if it exists, otherwise memcmp is used.*/
@@ -254,14 +246,14 @@ void *CustomData_bmesh_get_n(const struct CustomData *data, void *block, int typ
 void *CustomData_bmesh_get_layer_n(const struct CustomData *data, void *block, int n);
 
 bool CustomData_set_layer_name(const struct CustomData *data, int type, int n, const char *name);
-const char *CustomData_get_layer_name(const struct CustomData *data, int type, int n);
 
 /* gets a pointer to the active or first layer of type
  * returns NULL if there is no layer of type
  */
 void *CustomData_get_layer(const struct CustomData *data, int type);
 void *CustomData_get_layer_n(const struct CustomData *data, int type, int n);
-void *CustomData_get_layer_named(const struct CustomData *data, int type, const char *name);
+void *CustomData_get_layer_named(const struct CustomData *data, int type,
+                                 const char *name);
 int CustomData_get_offset(const struct CustomData *data, int type);
 int CustomData_get_n_offset(c

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list