Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-21 15:19:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-21 15:19:16 +0400
commitf9467d28b99a620631ed1c2d249532b2dba46f67 (patch)
treed6b16f77679766ee8fe69094c88f9234fe6dad2a /source/blender/editors/mesh/mesh_data.c
parentfd44038ed754f58ddfe48228bfb5fa41ea367e65 (diff)
remove sticky coordinates from blender, this was missing from the UI since 2.49.
TODO - drop support from the renderer still.
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r--source/blender/editors/mesh/mesh_data.c184
1 files changed, 0 insertions, 184 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 1417641e803..c6bff317584 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -747,118 +747,6 @@ void MESH_OT_vertex_color_remove(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-/*********************** sticky operators ************************/
-
-static Object *mesh_customdata_get_camera_for_sticky(wmOperator *op, Scene *scene, View3D *v3d)
-{
- /* report an error if we can't find the camera */
-
- Object *camera = NULL;
- if (scene->obedit) {
- BKE_report(op->reports, RPT_ERROR, "Unable to make sticky in Edit Mode");
- }
- else {
- if (v3d) camera = V3D_CAMERA_LOCAL(v3d);
- if (camera == NULL) camera = scene->camera;
-
- if (camera == NULL) {
- BKE_report(op->reports, RPT_ERROR, "Need camera to make sticky");
- }
- }
-
- return camera;
-}
-
-static int mesh_customdata_add_sticky_selected_exec(bContext *C, wmOperator *op)
-{
- Scene *scene = CTX_data_scene(C);
- View3D *v3d = CTX_wm_view3d(C);
- Object *camera = mesh_customdata_get_camera_for_sticky(op, scene, v3d);
- LinkNode *objects = NULL;
- LinkNode *ob_iter;
-
- if (camera == NULL) {
- return OPERATOR_CANCELLED;
- }
-
- CTX_DATA_BEGIN(C, Object *, ob, selected_editable_objects)
- {
- if (ob->type == OB_MESH) {
- BLI_linklist_prepend(&objects, ob);
- }
- }
- CTX_DATA_END;
-
- if (objects == NULL) {
- return OPERATOR_CANCELLED;
- }
-
- RE_make_sticky(scene, camera, objects);
-
- for (ob_iter = objects; ob_iter; ob_iter = ob_iter->next) {
- Object *ob = ob_iter->link;
- DAG_id_tag_update(ob->data, 0);
- WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data);
- }
-
- BLI_linklist_free(objects, NULL);
-
- return OPERATOR_FINISHED;
-}
-
-void MESH_OT_customdata_create_sticky_selected(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Calculate Sticky for Selection";
- ot->description = "Calculate sticky UV texture layer from the camera on selected objects";
- ot->idname = "MESH_OT_customdata_create_sticky_selected";
-
- /* api callbacks */
- ot->poll = layers_poll;
- ot->exec = mesh_customdata_add_sticky_selected_exec;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-}
-
-static int mesh_customdata_add_sticky_exec(bContext *C, wmOperator *op)
-{
- Object *obedit = ED_object_context(C);
- Scene *scene = CTX_data_scene(C);
- View3D *v3d = CTX_wm_view3d(C);
- Object *camera = mesh_customdata_get_camera_for_sticky(op, scene, v3d);
- LinkNode objects = {NULL};
-
- if (camera == NULL) {
- return OPERATOR_CANCELLED; /* error is set */
- }
-
- objects.link = obedit;
- objects.next = NULL;
-
- RE_make_sticky(scene, camera, &objects);
-
- DAG_id_tag_update(obedit->data, 0);
- WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
-
- return OPERATOR_FINISHED;
-}
-
-void MESH_OT_customdata_create_sticky(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Calculate Sticky";
- ot->description = "Calculate sticky UV texture layer from the camera";
- ot->idname = "MESH_OT_customdata_create_sticky";
-
- /* api callbacks */
- ot->poll = layers_poll;
- ot->exec = mesh_customdata_add_sticky_exec;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-}
-
/* *** CustomData clear functions, we need an operator for each *** */
static int mesh_customdata_clear_exec__internal(bContext *C,
@@ -925,78 +813,6 @@ void MESH_OT_customdata_clear_mask(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-/* Clear Sticky */
-static int mesh_customdata_clear_sticky_poll(bContext *C)
-{
- Object *ob = ED_object_context(C);
-
- if (ob && ob->type == OB_MESH) {
- Mesh *me = ob->data;
- if (me->id.lib == NULL) {
- CustomData *data = GET_CD_DATA(me, vdata);
- if (CustomData_has_layer(data, CD_MSTICKY)) {
- return TRUE;
- }
- }
- }
- return FALSE;
-}
-static int mesh_customdata_clear_sticky_exec(bContext *C, wmOperator *UNUSED(op))
-{
- return mesh_customdata_clear_exec__internal(C, BM_VERT, CD_MSTICKY);
-}
-
-void MESH_OT_customdata_clear_sticky(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Clear Sticky Data";
- ot->idname = "MESH_OT_customdata_clear_sticky";
- ot->description = "Clear vertex sticky UV texture layer";
-
- /* api callbacks */
- ot->exec = mesh_customdata_clear_sticky_exec;
- ot->poll = mesh_customdata_clear_sticky_poll;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-}
-
-/* Clear Skin */
-static int mesh_customdata_clear_skin_poll(bContext *C)
-{
- Object *ob = ED_object_context(C);
-
- if (ob && ob->type == OB_MESH) {
- Mesh *me = ob->data;
- if (me->id.lib == NULL) {
- CustomData *data = GET_CD_DATA(me, vdata);
- if (CustomData_has_layer(data, CD_MVERT_SKIN)) {
- return TRUE;
- }
- }
- }
- return FALSE;
-}
-static int mesh_customdata_clear_skin_exec(bContext *C, wmOperator *UNUSED(op))
-{
- return mesh_customdata_clear_exec__internal(C, BM_VERT, CD_MVERT_SKIN);
-}
-
-void MESH_OT_customdata_clear_skin(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name = "Clear Skin Data";
- ot->idname = "MESH_OT_customdata_clear_skin";
- ot->description = "Clear vertex skin layer";
-
- /* api callbacks */
- ot->exec = mesh_customdata_clear_skin_exec;
- ot->poll = mesh_customdata_clear_skin_poll;
-
- /* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-}
-
/************************** Add Geometry Layers *************************/
void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface)