[Bf-blender-cvs] [22e330b4b07] soc-2019-npr: LANPR: Added a dedicated tab for feature line modifier options.

YimingWu noreply at git.blender.org
Wed Jul 24 10:59:47 CEST 2019


Commit: 22e330b4b072d80805bfea6b3a7eef93c45c4865
Author: YimingWu
Date:   Wed Jul 24 16:59:13 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rB22e330b4b072d80805bfea6b3a7eef93c45c4865

LANPR: Added a dedicated tab for feature line modifier options.

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

M	source/blender/editors/space_buttons/buttons_context.c
M	source/blender/editors/space_buttons/space_buttons.c
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/makesrna/intern/rna_lanpr.c
M	source/blender/makesrna/intern/rna_space.c

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

diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 39662152de9..aafcb266e40 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -603,6 +603,9 @@ static int buttons_context_path(const bContext *C, ButsContextPath *path, int ma
     case BCONTEXT_COLLECTION:
       found = buttons_context_path_collection(path, window);
       break;
+    case BCONTEXT_LANPR:
+      found = buttons_context_path_object(path);
+      break;
     case BCONTEXT_TOOL:
       found = true;
       break;
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index a487379ca7a..b3690bf2fe3 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -163,6 +163,9 @@ static void buttons_main_region_layout_properties(const bContext *C,
     case BCONTEXT_COLLECTION:
       contexts[0] = "collection";
       break;
+    case BCONTEXT_LANPR:
+      contexts[0] = "lanpr";
+      break;
     case BCONTEXT_OBJECT:
       contexts[0] = "object";
       break;
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 58b39b6e0c2..1478715411e 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -196,6 +196,7 @@ typedef enum eSpaceButtons_Context {
   BCONTEXT_SHADERFX = 15,
   BCONTEXT_OUTPUT = 16,
   BCONTEXT_COLLECTION = 17,
+  BCONTEXT_LANPR = 18,
 
   /* always as last... */
   BCONTEXT_TOT,
diff --git a/source/blender/makesrna/intern/rna_lanpr.c b/source/blender/makesrna/intern/rna_lanpr.c
index d26a1d4bcc5..3ba5e8cd5af 100644
--- a/source/blender/makesrna/intern/rna_lanpr.c
+++ b/source/blender/makesrna/intern/rna_lanpr.c
@@ -72,7 +72,8 @@ void RNA_def_lanpr(BlenderRNA *brna)
        0,
        "Directional",
        "Use directional vector to control line width"},
-      {LANPR_NORMAL_POINT, "POINT", 0, "Point", "Use Point Light Style"},
+      /* Currently inoperative */
+      /* {LANPR_NORMAL_POINT, "POINT", 0, "Point", "Use Point Light Style"}, */
       {0, NULL, 0, NULL, NULL}};
 
   srna = RNA_def_struct(brna, "LANPR_LineLayerComponent", NULL);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index fc7ba318d9f..7f4889c71e3 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -384,6 +384,7 @@ static const EnumPropertyItem buttons_context_items[] = {
     {BCONTEXT_VIEW_LAYER, "VIEW_LAYER", ICON_RENDER_RESULT, "View Layer", "View Layer"},
     {BCONTEXT_WORLD, "WORLD", ICON_WORLD, "World", "World"},
     {BCONTEXT_COLLECTION, "COLLECTION", ICON_GROUP, "Collection", "Collection"},
+    {BCONTEXT_LANPR, "LANPR", ICON_SHADING_RENDERED, "LANPR", "LANPR Data"},
     {BCONTEXT_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Object"},
     {BCONTEXT_CONSTRAINT, "CONSTRAINT", ICON_CONSTRAINT, "Constraints", "Object Constraints"},
     {BCONTEXT_MODIFIER, "MODIFIER", ICON_MODIFIER, "Modifiers", "Modifiers"},
@@ -1621,6 +1622,10 @@ static const EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSE
     RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_COLLECTION);
   }
 
+  if (sbuts->pathflag & (1 << BCONTEXT_LANPR)) {
+    RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_LANPR);
+  }
+
   if (totitem) {
     RNA_enum_item_add_separator(&item, &totitem);
   }



More information about the Bf-blender-cvs mailing list