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:
authorMiika Hamalainen <blender@miikah.org>2011-08-03 22:31:48 +0400
committerMiika Hamalainen <blender@miikah.org>2011-08-03 22:31:48 +0400
commit8394f65d4a6019ae623fe32268a769463a189b9e (patch)
tree4338758f689e63d7fdd4752685e16eae42d1401e /source/blender/editors
parent35720a4c075c2a0782af173519097a094b5c0165 (diff)
Dynamic Paint:
* Object velocity can now be used to determine brush influence and color. * Brushes can now be set to "smudge" existing paint. * Added new operators to easily add and remove surface output mesh data layers from Dynamic Paint ui. * Fixed drip effect algorithm to work properly on forces pointing towards surface. * Adjusted drip effect speed. * Drip effect can now use canvas velocity and acceleration to influence drip direction. * Fixed texture mapping for material enabled brushes. * "Object Center" type brushes can now use "material color" as well. * Improved surface partitioning grid generation algorithm. * Fixed possible invalid brush collision detection when OpenMP enabled. * Fixed incorrect random sized particle displace/wave influence. * Fixed "Object Center" brush color ramp falloff. * Fixed invalid zero alpha sampling when rendering vertex colors. * Lots of smaller tweaking.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/ED_mesh.h1
-rw-r--r--source/blender/editors/mesh/mesh_data.c19
-rw-r--r--source/blender/editors/physics/physics_intern.h1
-rw-r--r--source/blender/editors/physics/physics_ops.c1
4 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 8bb77ad43a0..cb730c7ad4b 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -240,6 +240,7 @@ int ED_mesh_uv_texture_add(struct bContext *C, struct Mesh *me, const char *name
int ED_mesh_uv_texture_remove(struct bContext *C, struct Object *ob, struct Mesh *me);
int ED_mesh_color_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me, const char *name, int active_set);
int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me);
+int ED_mesh_color_remove_named(struct bContext *C, struct Object *ob, struct Mesh *me, const char *name);
#ifdef __cplusplus
}
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index c4a302d4d18..c9e580fbe4b 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -299,6 +299,25 @@ int ED_mesh_color_remove(bContext *C, Object *ob, Mesh *me)
return 1;
}
+int ED_mesh_color_remove_named(bContext *C, Object *ob, Mesh *me, const char *name)
+{
+ CustomData *data= (me->edit_mesh)? &me->edit_mesh->fdata: &me->fdata;
+ CustomDataLayer *cdl;
+ int index;
+
+ index= CustomData_get_named_layer_index(data, CD_MCOL, name);
+ cdl= (index == -1)? NULL: &data->layers[index];
+
+ if(!cdl)
+ return 0;
+
+ delete_customdata_layer(C, ob, cdl);
+ DAG_id_tag_update(&me->id, 0);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
+
+ return 1;
+}
+
/*********************** UV texture operators ************************/
static int layers_poll(bContext *C)
diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h
index a0b9dde99c3..f5ddbd65a3c 100644
--- a/source/blender/editors/physics/physics_intern.h
+++ b/source/blender/editors/physics/physics_intern.h
@@ -100,6 +100,7 @@ void DPAINT_OT_bake(struct wmOperatorType *ot);
void DPAINT_OT_surface_slot_add(struct wmOperatorType *ot);
void DPAINT_OT_surface_slot_remove(struct wmOperatorType *ot);
void DPAINT_OT_type_toggle(struct wmOperatorType *ot);
+void DPAINT_OT_output_toggle(struct wmOperatorType *ot);
/* physics_pointcache.c */
void PTCACHE_OT_bake_all(struct wmOperatorType *ot);
diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c
index da64775b83b..0235ccd5c89 100644
--- a/source/blender/editors/physics/physics_ops.c
+++ b/source/blender/editors/physics/physics_ops.c
@@ -174,6 +174,7 @@ static void operatortypes_dynamicpaint(void)
WM_operatortype_append(DPAINT_OT_surface_slot_add);
WM_operatortype_append(DPAINT_OT_surface_slot_remove);
WM_operatortype_append(DPAINT_OT_type_toggle);
+ WM_operatortype_append(DPAINT_OT_output_toggle);
}
//static void keymap_pointcache(wmWindowManager *wm)