Merged changes in the trunk up to revision 54171.
[blender-staging.git] / source / blender / editors / interface / interface_templates.c
index 26a8f703545968fed08ba43e5a5bd61365fa6450..58d593919396f5985aece88ff4727e4a71e5cf9a 100644 (file)
@@ -330,6 +330,9 @@ static const char *template_id_browse_tip(StructRNA *type)
                        case ID_MA:  return N_("Browse Material to be linked");
                        case ID_TE:  return N_("Browse Texture to be linked");
                        case ID_IM:  return N_("Browse Image to be linked");
                        case ID_MA:  return N_("Browse Material to be linked");
                        case ID_TE:  return N_("Browse Texture to be linked");
                        case ID_IM:  return N_("Browse Image to be linked");
+#ifdef WITH_FREESTYLE
+                       case ID_LS:  return N_("Browse Line Style Data to be linked");
+#endif
                        case ID_LT:  return N_("Browse Lattice Data to be linked");
                        case ID_LA:  return N_("Browse Lamp Data to be linked");
                        case ID_CA:  return N_("Browse Camera Data to be linked");
                        case ID_LT:  return N_("Browse Lattice Data to be linked");
                        case ID_LA:  return N_("Browse Lamp Data to be linked");
                        case ID_CA:  return N_("Browse Camera Data to be linked");
@@ -365,6 +368,9 @@ static const char *template_id_context(StructRNA *type)
                        case ID_MA:  return BLF_I18NCONTEXT_ID_MATERIAL;
                        case ID_TE:  return BLF_I18NCONTEXT_ID_TEXTURE;
                        case ID_IM:  return BLF_I18NCONTEXT_ID_IMAGE;
                        case ID_MA:  return BLF_I18NCONTEXT_ID_MATERIAL;
                        case ID_TE:  return BLF_I18NCONTEXT_ID_TEXTURE;
                        case ID_IM:  return BLF_I18NCONTEXT_ID_IMAGE;
+#ifdef WITH_FREESTYLE
+                       case ID_LS:  return BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE;
+#endif
                        case ID_LT:  return BLF_I18NCONTEXT_ID_LATTICE;
                        case ID_LA:  return BLF_I18NCONTEXT_ID_LAMP;
                        case ID_CA:  return BLF_I18NCONTEXT_ID_CAMERA;
                        case ID_LT:  return BLF_I18NCONTEXT_ID_LATTICE;
                        case ID_LA:  return BLF_I18NCONTEXT_ID_LAMP;
                        case ID_CA:  return BLF_I18NCONTEXT_ID_CAMERA;
@@ -520,7 +526,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
                                                 BLF_I18NCONTEXT_ID_NODETREE,
                                                 BLF_I18NCONTEXT_ID_BRUSH,
                                                 BLF_I18NCONTEXT_ID_PARTICLESETTINGS,
                                                 BLF_I18NCONTEXT_ID_NODETREE,
                                                 BLF_I18NCONTEXT_ID_BRUSH,
                                                 BLF_I18NCONTEXT_ID_PARTICLESETTINGS,
-                                                BLF_I18NCONTEXT_ID_GPENCIL);
+                                                BLF_I18NCONTEXT_ID_GPENCIL,
+#ifdef WITH_FREESTYLE
+                                                                                BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE
+#endif
+               );
                
                if (newop) {
                        but = uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN,
                
                if (newop) {
                        but = uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN,
@@ -2442,7 +2452,7 @@ static void uilist_draw_item_default(struct uiList *ui_list, struct bContext *UN
                uiItemL(layout, name, icon);
                break;
        }
                uiItemL(layout, name, icon);
                break;
        }
-
+               
        /* free name */
        if (namebuf) {
                MEM_freeN(namebuf);
        /* free name */
        if (namebuf) {
                MEM_freeN(namebuf);
@@ -2525,7 +2535,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
        if (ui_list_type == NULL) {
                RNA_warning("List type %s not found", listtype_name);
                return;
        if (ui_list_type == NULL) {
                RNA_warning("List type %s not found", listtype_name);
                return;
-       }
+                       }
 
        draw_item = ui_list_type->draw_item ? ui_list_type->draw_item : uilist_draw_item_default;
 
 
        draw_item = ui_list_type->draw_item ? ui_list_type->draw_item : uilist_draw_item_default;
 
@@ -2540,7 +2550,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
                ui_list = MEM_callocN(sizeof(uiList), __func__);
                BLI_strncpy(ui_list->list_id, ui_list_id, sizeof(ui_list->list_id));
                BLI_addtail(&ar->ui_lists, ui_list);
                ui_list = MEM_callocN(sizeof(uiList), __func__);
                BLI_strncpy(ui_list->list_id, ui_list_id, sizeof(ui_list->list_id));
                BLI_addtail(&ar->ui_lists, ui_list);
-       }
+                                       }
 
        /* Because we can't actually pass type across save&load... */
        ui_list->type = ui_list_type;
 
        /* Because we can't actually pass type across save&load... */
        ui_list->type = ui_list_type;
@@ -2634,10 +2644,10 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
                                        if (icon == ICON_DOT)
                                                icon = ICON_NONE;
                                        draw_item(ui_list, C, row, dataptr, &itemptr, icon, active_dataptr, active_propname, i);
                                        if (icon == ICON_DOT)
                                                icon = ICON_NONE;
                                        draw_item(ui_list, C, row, dataptr, &itemptr, icon, active_dataptr, active_propname, i);
-                               }
+       }
 
                                i++;
 
                                i++;
-                       }
+}
                        RNA_PROP_END;
                }
 
                        RNA_PROP_END;
                }