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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weighted_normal.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weighted_normal.c42
1 files changed, 41 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.c b/source/blender/modifiers/intern/MOD_weighted_normal.c
index 3baf7c878dc..dc1b7ba8a75 100644
--- a/source/blender/modifiers/intern/MOD_weighted_normal.c
+++ b/source/blender/modifiers/intern/MOD_weighted_normal.c
@@ -24,16 +24,27 @@
#include "BLI_linklist.h"
#include "BLI_math.h"
+#include "BLT_translation.h"
+
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "DNA_screen_types.h"
+#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_lib_id.h"
#include "BKE_mesh.h"
+#include "BKE_screen.h"
+
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "RNA_access.h"
#include "MOD_modifiertypes.h"
+#include "MOD_ui_common.h"
#include "MOD_util.h"
#include "bmesh.h"
@@ -700,8 +711,36 @@ static bool dependsOnNormals(ModifierData *UNUSED(md))
return true;
}
+static void panel_draw(const bContext *C, Panel *panel)
+{
+ uiLayout *layout = panel->layout;
+
+ PointerRNA ptr;
+ PointerRNA ob_ptr;
+ modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr);
+
+ uiLayoutSetPropSep(layout, true);
+
+ uiItemR(layout, &ptr, "mode", 0, NULL, ICON_NONE);
+
+ uiItemR(layout, &ptr, "weight", 0, IFACE_("Weight"), ICON_NONE);
+ uiItemR(layout, &ptr, "thresh", 0, IFACE_("Threshold"), ICON_NONE);
+
+ uiItemR(layout, &ptr, "keep_sharp", 0, NULL, ICON_NONE);
+ uiItemR(layout, &ptr, "face_influence", 0, NULL, ICON_NONE);
+
+ modifier_vgroup_ui(layout, &ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL);
+
+ modifier_panel_end(layout, &ptr);
+}
+
+static void panelRegister(ARegionType *region_type)
+{
+ modifier_panel_register(region_type, eModifierType_WeightedNormal, panel_draw);
+}
+
ModifierTypeInfo modifierType_WeightedNormal = {
- /* name */ "Weighted Normal",
+ /* name */ "WeightedNormal",
/* structName */ "WeightedNormalModifierData",
/* structSize */ sizeof(WeightedNormalModifierData),
/* type */ eModifierTypeType_Constructive,
@@ -730,4 +769,5 @@ ModifierTypeInfo modifierType_WeightedNormal = {
/* foreachIDLink */ NULL,
/* foreachTexLink */ NULL,
/* freeRuntimeData */ NULL,
+ /* panelRegister */ panelRegister,
};