[Bf-blender-cvs] [3b505a8] temp-modifier-deltamush-experimental: Rename DeltaMush -> CorrectiveSmooth
Campbell Barton
noreply at git.blender.org
Mon Mar 30 16:42:32 CEST 2015
Commit: 3b505a880bb56dba5f53b9bc638020ffa30f7073
Author: Campbell Barton
Date: Tue Mar 31 01:41:33 2015 +1100
Branches: temp-modifier-deltamush-experimental
https://developer.blender.org/rB3b505a880bb56dba5f53b9bc638020ffa30f7073
Rename DeltaMush -> CorrectiveSmooth
===================================================================
M release/scripts/startup/bl_ui/properties_data_modifier.py
M source/blender/blenloader/intern/readfile.c
M source/blender/blenloader/intern/writefile.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/intern/rna_modifier.c
M source/blender/modifiers/CMakeLists.txt
M source/blender/modifiers/MOD_modifiertypes.h
A source/blender/modifiers/intern/MOD_correctivesmooth.c
D source/blender/modifiers/intern/MOD_deltamush.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 4ef54d7..9dc006a 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1386,7 +1386,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
sub.active = has_vgroup
sub.prop(md, "use_invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
- def DELTAMUSH(self, layout, ob, md):
+ def CORRECTIVE_SMOOTH(self, layout, ob, md):
is_bind = md.is_bind
layout.prop(md, "iterations")
@@ -1405,7 +1405,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
sub.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
- layout.operator("object.deltamush_bind", text="Unbind" if is_bind else "Bind")
+ layout.operator("object.correctivesmooth_bind", text="Unbind" if is_bind else "Bind")
if __name__ == "__main__": # only for live edit.
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b7479ea..52b2c5f 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -4949,17 +4949,17 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
}
lmd->cache_system = NULL;
}
- else if (md->type == eModifierType_DeltaMush) {
- DeltaMushModifierData *dmmd = (DeltaMushModifierData*)md;
+ else if (md->type == eModifierType_CorrectiveSmooth) {
+ CorrectiveSmoothModifierData *csmd = (CorrectiveSmoothModifierData*)md;
- if (dmmd->positions) {
- dmmd->positions = newdataadr(fd, dmmd->positions);
+ if (csmd->positions) {
+ csmd->positions = newdataadr(fd, csmd->positions);
if (fd->flags & FD_FLAGS_SWITCH_ENDIAN) {
- BLI_endian_switch_float_array((float *)dmmd->positions, dmmd->positions_num * 3);
+ BLI_endian_switch_float_array((float *)csmd->positions, csmd->positions_num * 3);
}
}
- dmmd->positions_delta_cache = NULL;
+ csmd->positions_delta_cache = NULL;
}
}
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index e9509ec..298e5bd 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1620,11 +1620,11 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
writedata(wd, DATA, sizeof(float)*lmd->total_verts * 3, lmd->vertexco);
}
- else if (md->type == eModifierType_DeltaMush) {
- DeltaMushModifierData *dmmd = (DeltaMushModifierData*)md;
+ else if (md->type == eModifierType_CorrectiveSmooth) {
+ CorrectiveSmoothModifierData *csmd = (CorrectiveSmoothModifierData *)md;
- if (dmmd->positions) {
- writedata(wd, DATA, sizeof(float[3]) * dmmd->positions_num, dmmd->positions);
+ if (csmd->positions) {
+ writedata(wd, DATA, sizeof(float[3]) * csmd->positions_num, csmd->positions);
}
}
}
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index ab581fc..d535457 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -174,7 +174,7 @@ void OBJECT_OT_multires_higher_levels_delete(struct wmOperatorType *ot);
void OBJECT_OT_multires_base_apply(struct wmOperatorType *ot);
void OBJECT_OT_multires_external_save(struct wmOperatorType *ot);
void OBJECT_OT_multires_external_pack(struct wmOperatorType *ot);
-void OBJECT_OT_deltamush_bind(struct wmOperatorType *ot);
+void OBJECT_OT_correctivesmooth_bind(struct wmOperatorType *ot);
void OBJECT_OT_meshdeform_bind(struct wmOperatorType *ot);
void OBJECT_OT_explode_refresh(struct wmOperatorType *ot);
void OBJECT_OT_ocean_bake(struct wmOperatorType *ot);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 3e6084a..aee2aac 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -1817,46 +1817,46 @@ void OBJECT_OT_skin_armature_create(wmOperatorType *ot)
}
/************************ delta mush bind operator *********************/
-static int deltamush_poll(bContext *C)
+static int correctivesmooth_poll(bContext *C)
{
- return edit_modifier_poll_generic(C, &RNA_DeltaMushModifier, 0);
+ return edit_modifier_poll_generic(C, &RNA_CorrectiveSmoothModifier, 0);
}
-static int deltamush_bind_exec(bContext *C, wmOperator *op)
+static int correctivesmooth_bind_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_active_context(C);
- DeltaMushModifierData *mmd = (DeltaMushModifierData *)edit_modifier_property_get(op, ob, eModifierType_DeltaMush);
+ CorrectiveSmoothModifierData *mmd = (CorrectiveSmoothModifierData *)edit_modifier_property_get(op, ob, eModifierType_CorrectiveSmooth);
if (!mmd) {
return OPERATOR_CANCELLED;
}
- mmd->flag ^= MOD_DELTAMUSH_BIND;
+ mmd->flag ^= MOD_CORRECTIVESMOOTH_BIND;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}
-static int deltamush_bind_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int correctivesmooth_bind_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
if (edit_modifier_invoke_properties(C, op))
- return deltamush_bind_exec(C, op);
+ return correctivesmooth_bind_exec(C, op);
else
return OPERATOR_CANCELLED;
}
-void OBJECT_OT_deltamush_bind(wmOperatorType *ot)
+void OBJECT_OT_correctivesmooth_bind(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Delta Mush Bind";
+ ot->name = "Corrective Smooth Bind";
ot->description = "Bind base pose in delta mush modifier";
- ot->idname = "OBJECT_OT_deltamush_bind";
+ ot->idname = "OBJECT_OT_correctivesmooth_bind";
/* api callbacks */
- ot->poll = deltamush_poll;
- ot->invoke = deltamush_bind_invoke;
- ot->exec = deltamush_bind_exec;
+ ot->poll = correctivesmooth_poll;
+ ot->invoke = correctivesmooth_bind_invoke;
+ ot->exec = correctivesmooth_bind_exec;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index d8d0bfa..422f0c1 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -144,7 +144,7 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_skin_radii_equalize);
WM_operatortype_append(OBJECT_OT_skin_armature_create);
- WM_operatortype_append(OBJECT_OT_deltamush_bind);
+ WM_operatortype_append(OBJECT_OT_correctivesmooth_bind);
WM_operatortype_append(OBJECT_OT_meshdeform_bind);
WM_operatortype_append(OBJECT_OT_explode_refresh);
WM_operatortype_append(OBJECT_OT_ocean_bake);
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 6f025d4..4ec619d 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1170,7 +1170,7 @@ 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_NormalEdit:
UI_icon_draw(x, y, ICON_MOD_NORMALEDIT); break;
- case eModifierType_DeltaMush:
+ case eModifierType_CorrectiveSmooth:
UI_icon_draw(x, y, ICON_DOT); break;
/* Default */
case eModifierType_None:
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 1abe691..4992805 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -84,7 +84,7 @@ typedef enum ModifierType {
eModifierType_Wireframe = 48,
eModifierType_DataTransfer = 49,
eModifierType_NormalEdit = 50,
- eModifierType_DeltaMush = 51,
+ eModifierType_CorrectiveSmooth = 51,
NUM_MODIFIER_TYPES
} ModifierType;
@@ -1290,7 +1290,7 @@ enum {
};
-typedef struct DeltaMushModifierData {
+typedef struct CorrectiveSmoothModifierData {
ModifierData modifier;
/* positions set during 'bind' operator */
@@ -1306,19 +1306,19 @@ typedef struct DeltaMushModifierData {
/* runtime-only cache (delta's between),
* delta's between the original positions and the smoothed positions */
float (*positions_delta_cache)[3];
-} DeltaMushModifierData;
+} CorrectiveSmoothModifierData;
enum {
- MOD_DELTAMUSH_SMOOTH_SIMPLE = 0,
- MOD_DELTAMUSH_SMOOTH_EDGE_WEIGHT = 1,
+ MOD_CORRECTIVESMOOTH_SMOOTH_SIMPLE = 0,
+ MOD_CORRECTIVESMOOTH_SMOOTH_EDGE_WEIGHT = 1,
};
-/* Delta Mush modifier flags */
+/* Corrective Smooth modifier flags */
enum {
- MOD_DELTAMUSH_INVERT_VGROUP = (1 << 0),
- MOD_DELTAMUSH_BIND = (1 << 1),
- MOD_DELTAMUSH_ONLY_SMOOTH = (1 << 2),
- MOD_DELTAMUSH_PIN_BOUNDARY = (1 << 3),
+ MOD_CORRECTIVESMOOTH_INVERT_VGROUP = (1 << 0),
+ MOD_CORRECTIVESMOOTH_BIND = (1 << 1),
+ MOD_CORRECTIVESMOOTH_ONLY_SMOOTH = (1 << 2),
+ MOD_CORRECTIVESMOOTH_PIN_BOUNDARY = (1 << 3),
};
typedef struct UVWarpModifierData {
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index c6c4f5d..8aa1bc5 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -202,7 +202,7 @@ extern StructRNA RNA_DampedTrackConstraint;
extern StructRNA RNA_DataTransferModifier;
extern StructRNA RNA_DecimateModifier;
extern StructRNA RNA_DelaySensor;
-extern StructRNA RNA_DeltaMushModifier;
+extern StructRNA RNA_CorrectiveSmoothModifier;
extern StructRNA RNA_DisplaceModifier;
extern StructRNA RNA_DisplaySafeAreas;
extern StructRNA RNA_DistortedNoiseTexture;
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 0245697..c753d0b 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list