[Bf-blender-cvs] [4f4f08cee4b] modifier-panels-ui: Add commented out C drawing code for modifiers.

Hans Goudey noreply at git.blender.org
Sat Mar 28 05:38:12 CET 2020


Commit: 4f4f08cee4bc57a11922e63f7f28ad8f5c44709e
Author: Hans Goudey
Date:   Fri Mar 27 23:29:54 2020 -0500
Branches: modifier-panels-ui
https://developer.blender.org/rB4f4f08cee4bc57a11922e63f7f28ad8f5c44709e

Add commented out C drawing code for modifiers.

Left over from an earlier patch, this layout drawing code still
needs to be converted to be panels.

===================================================================

M	source/blender/modifiers/intern/MOD_armature.c
M	source/blender/modifiers/intern/MOD_build.c
M	source/blender/modifiers/intern/MOD_cast.c
M	source/blender/modifiers/intern/MOD_cloth.c
M	source/blender/modifiers/intern/MOD_collision.c
M	source/blender/modifiers/intern/MOD_correctivesmooth.c
M	source/blender/modifiers/intern/MOD_curve.c
M	source/blender/modifiers/intern/MOD_decimate.c
M	source/blender/modifiers/intern/MOD_displace.c
M	source/blender/modifiers/intern/MOD_dynamicpaint.c
M	source/blender/modifiers/intern/MOD_edgesplit.c
M	source/blender/modifiers/intern/MOD_explode.c
M	source/blender/modifiers/intern/MOD_fluid.c
M	source/blender/modifiers/intern/MOD_hook.c
M	source/blender/modifiers/intern/MOD_laplaciandeform.c
M	source/blender/modifiers/intern/MOD_laplaciansmooth.c
M	source/blender/modifiers/intern/MOD_lattice.c
M	source/blender/modifiers/intern/MOD_mask.cc
M	source/blender/modifiers/intern/MOD_meshcache.c
M	source/blender/modifiers/intern/MOD_meshdeform.c
M	source/blender/modifiers/intern/MOD_meshsequencecache.c
M	source/blender/modifiers/intern/MOD_mirror.c
M	source/blender/modifiers/intern/MOD_multires.c
M	source/blender/modifiers/intern/MOD_normal_edit.c
M	source/blender/modifiers/intern/MOD_ocean.c
M	source/blender/modifiers/intern/MOD_particleinstance.c
M	source/blender/modifiers/intern/MOD_particlesystem.c
M	source/blender/modifiers/intern/MOD_remesh.c
M	source/blender/modifiers/intern/MOD_screw.c
M	source/blender/modifiers/intern/MOD_shapekey.c
M	source/blender/modifiers/intern/MOD_shrinkwrap.c
M	source/blender/modifiers/intern/MOD_simpledeform.c
M	source/blender/modifiers/intern/MOD_skin.c
M	source/blender/modifiers/intern/MOD_smooth.c
M	source/blender/modifiers/intern/MOD_softbody.c
M	source/blender/modifiers/intern/MOD_solidify.c
M	source/blender/modifiers/intern/MOD_subsurf.c
M	source/blender/modifiers/intern/MOD_surface.c
M	source/blender/modifiers/intern/MOD_surfacedeform.c
M	source/blender/modifiers/intern/MOD_triangulate.c
M	source/blender/modifiers/intern/MOD_uvproject.c
M	source/blender/modifiers/intern/MOD_uvwarp.c
M	source/blender/modifiers/intern/MOD_warp.c
M	source/blender/modifiers/intern/MOD_wave.c
M	source/blender/modifiers/intern/MOD_weighted_normal.c
M	source/blender/modifiers/intern/MOD_weightvg_util.c
M	source/blender/modifiers/intern/MOD_weightvg_util.h
M	source/blender/modifiers/intern/MOD_weightvgedit.c
M	source/blender/modifiers/intern/MOD_weightvgmix.c
M	source/blender/modifiers/intern/MOD_weightvgproximity.c
M	source/blender/modifiers/intern/MOD_weld.c
M	source/blender/modifiers/intern/MOD_wireframe.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index 3e78662da6c..0406d983acb 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -26,11 +26,14 @@
 #include "BLI_listbase.h"
 #include "BLI_utildefines.h"
 
+#include "BLT_translation.h"
+
 #include "DNA_armature_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_object_types.h"
 
 #include "BKE_action.h"
+#include "BKE_context.h"
 #include "BKE_editmesh.h"
 #include "BKE_lattice.h"
 #include "BKE_lib_id.h"
@@ -38,6 +41,11 @@
 #include "BKE_mesh.h"
 #include "BKE_modifier.h"
 
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "RNA_access.h"
+
 #include "DEG_depsgraph_query.h"
 
 #include "bmesh.h"
@@ -239,6 +247,34 @@ static void deformMatrices(ModifierData *md,
   }
 }
 
+//   uiLayout *sub, *row, *col, *split;
+
+//   bool has_vertex_group = RNA_string_length(ptr, "vertex_group") != 0;
+
+//   split = uiLayoutSplit(layout, 0.5f, false);
+
+//   col = uiLayoutColumn(split, false);
+//   uiItemL(col, IFACE_("Object:"), ICON_NONE);
+//   uiItemR(col, ptr, "object", 0, "", ICON_NONE);
+//   uiItemR(col, ptr, "use_deform_preserve_volume", 0, NULL, ICON_NONE);
+
+//   col = uiLayoutColumn(split, false);
+//   uiItemL(col, IFACE_("Bind to:"), ICON_NONE);
+//   uiItemR(col, ptr, "use_vertex_groups", 0, IFACE_("Vertex Groups"), ICON_NONE);
+//   uiItemR(col, ptr, "use_bone_envelopes", 0, IFACE_("Bone Envelopes"), ICON_NONE);
+
+//   uiItemS(layout);
+
+//   split = uiLayoutSplit(layout, 0.5f, false);
+
+//   row = uiLayoutRow(split, true);
+//   uiItemPointerR(row, ptr, "vertex_group", ob_ptr, "vertex_groups", "", ICON_NONE);
+//   sub = uiLayoutRow(row, true);
+//   uiLayoutSetActive(sub, has_vertex_group);
+//   uiItemR(sub, ptr, "invert_vertex_group", 0, "", ICON_ARROW_LEFTRIGHT);
+
+//   uiItemR(split, ptr, "use_multi_modifier", 0, NULL, ICON_NONE);
+
 ModifierTypeInfo modifierType_Armature = {
     /* name */ "Armature",
     /* structName */ "ArmatureModifierData",
diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c
index 3c1a5744b33..c475d4c5338 100644
--- a/source/blender/modifiers/intern/MOD_build.c
+++ b/source/blender/modifiers/intern/MOD_build.c
@@ -35,11 +35,17 @@
 
 #include "DEG_depsgraph_query.h"
 
+#include "BKE_context.h"
 #include "BKE_mesh.h"
 #include "BKE_modifier.h"
 #include "BKE_particle.h"
 #include "BKE_scene.h"
 
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "RNA_access.h"
+
 #include "MOD_modifiertypes.h"
 
 static void initData(ModifierData *md)
@@ -275,6 +281,21 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, str
   return result;
 }
 
+// uiLayout *col, *split, *sub;
+
+// split = uiLayoutSplit(layout, 0.5f, false);
+
+// col = uiLayoutColumn(split, false);
+// uiItemR(col, ptr, "frame_start", 0, NULL, ICON_NONE);
+// uiItemR(col, ptr, "frame_duration", 0, NULL, ICON_NONE);
+// uiItemR(col, ptr, "use_reverse", 0, NULL, ICON_NONE);
+
+// col = uiLayoutColumn(split, false);
+// uiItemR(col, ptr, "use_random_order", 0, NULL, ICON_NONE);
+// sub = uiLayoutColumn(col, true);
+// uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_random_order"));
+// uiItemR(sub, ptr, "seed", 0, "", ICON_ARROW_LEFTRIGHT);
+
 ModifierTypeInfo modifierType_Build = {
     /* name */ "Build",
     /* structName */ "BuildModifierData",
@@ -301,4 +322,5 @@ ModifierTypeInfo modifierType_Build = {
     /* foreachIDLink */ NULL,
     /* foreachTexLink */ NULL,
     /* freeRuntimeData */ NULL,
+    /* panel */ NULL,
 };
diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c
index ed4a53ba2f3..da2f5e76263 100644
--- a/source/blender/modifiers/intern/MOD_cast.c
+++ b/source/blender/modifiers/intern/MOD_cast.c
@@ -25,10 +25,13 @@
 
 #include "BLI_math.h"
 
+#include "BLT_translation.h"
+
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_object_types.h"
 
+#include "BKE_context.h"
 #include "BKE_deform.h"
 #include "BKE_editmesh.h"
 #include "BKE_lib_id.h"
@@ -36,6 +39,11 @@
 #include "BKE_mesh.h"
 #include "BKE_modifier.h"
 
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "RNA_access.h"
+
 #include "DEG_depsgraph_query.h"
 
 #include "MOD_util.h"
@@ -518,6 +526,44 @@ static void deformVertsEM(ModifierData *md,
   }
 }
 
+// uiLayout *sub, *row, *col, *split;
+
+// bool has_vertex_group = RNA_string_length(ptr, "vertex_group") != 0;
+// PointerRNA cast_object_ptr = RNA_pointer_get(ptr, "object");
+
+// split = uiLayoutSplit(layout, 0.25f, false);
+// uiItemL(split, IFACE_("Cast Type:"), ICON_NONE);
+// uiItemR(split, ptr, "cast_type", 0, "", ICON_NONE);
+
+// split = uiLayoutSplit(layout, 0.25f, false);
+
+// col = uiLayoutColumn(split, false);
+// uiItemR(col, ptr, "use_x", 0, NULL, ICON_NONE);
+// uiItemR(col, ptr, "use_y", 0, NULL, ICON_NONE);
+// uiItemR(col, ptr, "use_z", 0, NULL, ICON_NONE);
+
+// col = uiLayoutColumn(split, false);
+// uiItemR(col, ptr, "factor", 0, NULL, ICON_NONE);
+// uiItemR(col, ptr, "radius", 0, NULL, ICON_NONE);
+// uiItemR(col, ptr, "size", 0, NULL, ICON_NONE);
+// uiItemR(col, ptr, "use_radius_as_size", 0, NULL, ICON_NONE);
+
+// split = uiLayoutSplit(layout, 0.5f, false);
+// col = uiLayoutColumn(split, false);
+// uiItemL(col, IFACE_("Vertex Group:"), ICON_NONE);
+// row = uiLayoutRow(col, true);
+// uiItemPointerR(row, ptr, "vertex_group", ob_ptr, "vertex_groups", "", ICON_NONE);
+// sub = uiLayoutRow(row, true);
+// uiLayoutSetActive(sub, has_vertex_group);
+// uiItemR(sub, ptr, "invert_vertex_group", 0, "", ICON_ARROW_LEFTRIGHT);
+
+// col = uiLayoutColumn(split, false);
+// uiItemL(col, IFACE_("Control Object:"), ICON_NONE);
+// uiItemR(col, ptr, "object", 0, "", ICON_NONE);
+// if (!RNA_pointer_is_null(&cast_object_ptr)) {
+//   uiItemR(col, ptr, "use_radius_as_size", 0, NULL, ICON_NONE);
+// }
+
 ModifierTypeInfo modifierType_Cast = {
     /* name */ "Cast",
     /* structName */ "CastModifierData",
@@ -545,4 +591,5 @@ ModifierTypeInfo modifierType_Cast = {
     /* foreachIDLink */ NULL,
     /* foreachTexLink */ NULL,
     /* freeRuntimeData */ NULL,
+    /* panel */ NULL,
 };
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c
index 0cab6144de8..99be032653f 100644
--- a/source/blender/modifiers/intern/MOD_cloth.c
+++ b/source/blender/modifiers/intern/MOD_cloth.c
@@ -27,6 +27,8 @@
 
 #include "BLI_listbase.h"
 
+#include "BLT_translation.h"
+
 #include "DNA_cloth_types.h"
 #include "DNA_key_types.h"
 #include "DNA_mesh_types.h"
@@ -36,6 +38,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BKE_cloth.h"
+#include "BKE_context.h"
 #include "BKE_effect.h"
 #include "BKE_global.h"
 #include "BKE_key.h"
@@ -45,6 +48,11 @@
 #include "BKE_modifier.h"
 #include "BKE_pointcache.h"
 
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "RNA_access.h"
+
 #include "DEG_depsgraph_physics.h"
 #include "DEG_depsgraph_query.h"
 
@@ -253,6 +261,8 @@ static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *u
   }
 }
 
+// uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
+
 ModifierTypeInfo modifierType_Cloth = {
     /* name */ "Cloth",
     /* structName */ "ClothModifierData",
@@ -280,4 +290,5 @@ ModifierTypeInfo modifierType_Cloth = {
     /* foreachIDLink */ foreachIDLink,
     /* foreachTexLink */ NULL,
     /* freeRuntimeData */ NULL,
+    /* panel */ NULL,
 };
diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c
index af468cb2d27..efca09790ac 100644
--- a/source/blender/modifiers/intern/MOD_collision.c
+++ b/source/blender/modifiers/intern/MOD_collision.c
@@ -25,6 +25,8 @@
 
 #include "BLI_math.h"
 
+#include "BLT_translation.h"
+
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_object_types.h"
@@ -32,6 +34,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "BKE_collision.h"
+#include "BKE_context.h"
 #include "BKE_global.h"
 #include "BKE_lib_id.h"
 #include "BKE_mesh.h"
@@ -40,6 +43,11 @@
 #include "BKE_pointcache.h"
 #include "BKE_scene.h"
 
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "RNA_access.h"
+
 #include "MOD_modifiertypes.h"
 #include "MOD_util.h"
 
@@ -241,6 +249,8 @@ static void updateDepsgraph(ModifierData *UNUSED(md), const ModifierUpdateDepsgr
   DEG_add_modifier_to_transform_relation(ctx->node, "Collision Modifier");
 }
 
+// uiItemL(layout, IFACE_("Settings are inside the Physics tab"), ICON_NONE);
+
 ModifierTypeInfo modifierType_Collision = {
     /* name */ "Collision",
     /* structName */ "CollisionModifierData",
@@ -267,4 +277,5 @@ ModifierTypeInfo modifierType_Collision = {
     /* foreachIDLink */ NULL,
     /* foreachTexLink */ NULL,
     /* freeRuntimeData */ NULL,
+    /* panel */ NULL,
 };
diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c
index 4eea9092e10..b176d46920e 100644
--- a/source/blender/modifiers/intern/MOD_correctivesmooth.c
+++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c
@@ -27,6 +27,8 @@
 
 #include "BLI_math.h"
 
+#include "BLT_translation.h"
+
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_object_types.h"
@@ -34,11 +36,17 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BKE_context.h"
 #include "BKE_deform.h"
 #include "BKE_editmesh.h"
 #include "BKE_lib_id.h"
 #include "BKE_mesh.h"
 
+#include "UI_interface.h"
+#include "UI_resources.h"
+
+#include "RNA_access.h"
+
 #include "MOD_modifiertypes.h"
 #include "MOD_util.h"
 
@@ -763,6 +771,38 @@ static void deformVertsEM(ModifierData *md,
   }
 }
 
+// uiLayout *sub, *row, *col, *split;
+
+// bool has_vertex_group = RNA_string_length(ptr, "vertex_group") != 0;
+
+// uiItemR(layout, ptr, "factor", 0, IFACE_("Factor"), ICON_NONE);
+// uiItemR(layout, ptr, "iterations", 0, NULL, ICON_NONE);
+// uiItemR(layout, ptr, "scale", 0, NULL, ICON_NONE);
+// uiItemR(layout, ptr, "smooth_type", 0, NULL, ICON_NONE);
+
+// split = uiLayoutSplit

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list