[Bf-blender-cvs] [6463c7b] experimental-build: Revert "Squashed commit of mesh-transfer-data branch."
Bastien Montagne
noreply at git.blender.org
Mon Dec 1 19:10:12 CET 2014
Commit: 6463c7ba4b651a3e9897c051f2a9d7a30e7a0524
Author: Bastien Montagne
Date: Mon Dec 1 19:09:54 2014 +0100
Branches: experimental-build
https://developer.blender.org/rB6463c7ba4b651a3e9897c051f2a9d7a30e7a0524
Revert "Squashed commit of mesh-transfer-data branch."
This reverts commit 4d6c801047e95b62b8c61fa71dbda4fa1f86b64c.
===================================================================
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
M source/blender/blenkernel/BKE_deform.h
M source/blender/blenkernel/BKE_mesh_mapping.h
D source/blender/blenkernel/BKE_mesh_remap.h
D source/blender/blenkernel/BKE_object_data_transfer.h
M source/blender/blenkernel/BKE_object_deform.h
M source/blender/blenkernel/CMakeLists.txt
M source/blender/blenkernel/intern/DerivedMesh.c
M source/blender/blenkernel/intern/bvhutils.c
M source/blender/blenkernel/intern/customdata.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
D source/blender/blenkernel/intern/mesh_remap.c
D source/blender/blenkernel/intern/object_data_transfer.c
D source/blender/blenlib/BLI_astar.h
M source/blender/blenlib/BLI_rand.h
M source/blender/blenlib/CMakeLists.txt
D source/blender/blenlib/intern/astar.c
M source/blender/blenlib/intern/rand.c
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_modifier.c
M source/blender/editors/object/object_ops.c
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/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 e13d007..7a96996 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1225,121 +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, "object")
- sub = row.row(align=True)
- sub.active = bool(md.object)
- sub.prop(md, "use_object_transform", text="", icon='GROUP')
-
- layout.separator()
-
- split = layout.split(0.333)
- split.prop(md, "use_vert_data")
- use_vert = md.use_vert_data
- row = split.row()
- row.active = use_vert
- row.prop(md, "vert_mapping", text="")
- if use_vert:
- 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, "layers_vgroup_select_src", text="")
- row.label(icon='RIGHTARROW_THIN')
- row.prop(md, "layers_vgroup_select_dst", text="")
- split = col.split(0.333, align=True)
- sub = split.column(align=True)
- sub.prop(md, "data_types_verts")
-
- layout.separator()
-
- split = layout.split(0.333)
- split.prop(md, "use_edge_data")
- use_edge = md.use_edge_data
- row = split.row()
- row.active = use_edge
- row.prop(md, "edge_mapping", text="")
- if use_edge:
- 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()
-
- split = layout.split(0.333)
- split.prop(md, "use_loop_data")
- use_loop = md.use_loop_data
- row = split.row()
- row.active = use_loop
- row.prop(md, "loop_mapping", text="")
- if use_loop:
- 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, "layers_vcol_select_src", text="")
- row.label(icon='RIGHTARROW')
- row.prop(md, "layers_vcol_select_dst", text="")
- split = col.split(0.333, align=True)
- sub = split.column(align=True)
- sub.prop(md, "data_types_loops_uv")
- row = split.row(align=True)
- row.prop(md, "layers_uv_select_src", text="")
- row.label(icon='RIGHTARROW')
- row.prop(md, "layers_uv_select_dst", text="")
- col.prop(md, "islands_precision")
-
- layout.separator()
-
- split = layout.split(0.333)
- split.prop(md, "use_poly_data")
- use_poly = md.use_poly_data
- row = split.row()
- row.active = use_poly
- row.prop(md, "poly_mapping", text="")
- if use_poly:
- col = layout.column(align=True)
- 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()
- row = col.row()
- row.active = bool(md.object)
- row.operator("object.datalayout_transfer", text="Generate Data Layers")
- 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 0ea68fa..7f2ec53 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1095,7 +1095,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 08edde1..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 val
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list