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:
authorJoshua Leung <aligorith@gmail.com>2009-08-29 10:50:32 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-29 10:50:32 +0400
commit8930a4fd332e69442b4de2efe42019bf5a41c946 (patch)
tree6a276c12cb665324543e67f484a84e6657a32411 /source/blender/editors/space_view3d
parentf46f6dc7ba32411a8031a243bba635c8cc3ade29 (diff)
Grease Pencil: UI (i.e. Panel) for Settings
Restored the UI for access to the GP layers. There are still a few minor bugs here: * Wrong icons on the toggles - even when they're enabled, they only show a single state * The ID-template doesn't seem to be showing up. Dunno what's going wrong there...
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 9b05f5b25b2..2fbe7e5db79 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -36,6 +36,7 @@
#include "DNA_armature_types.h"
#include "DNA_curve_types.h"
#include "DNA_camera_types.h"
+#include "DNA_gpencil_types.h"
#include "DNA_lamp_types.h"
#include "DNA_lattice_types.h"
#include "DNA_meta_types.h"
@@ -81,6 +82,7 @@
#include "ED_armature.h"
#include "ED_curve.h"
#include "ED_image.h"
+#include "ED_gpencil.h"
#include "ED_keyframing.h"
#include "ED_mesh.h"
#include "ED_object.h"
@@ -1199,33 +1201,6 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl) // VIEW3
}
#endif
-#if 0
-static void view3d_panel_gpencil(const bContext *C, Panel *pa)
-{
- View3D *v3d= CTX_wm_view3d(C);
- uiBlock *block;
-
- block= uiLayoutFreeBlock(pa->layout);
-
- /* allocate memory for gpd if drawing enabled (this must be done first or else we crash) */
- if (v3d->flag2 & V3D_DISPGP) {
-// if (v3d->gpd == NULL)
-// XXX gpencil_data_setactive(ar, gpencil_data_addnew());
- }
-
- if (v3d->flag2 & V3D_DISPGP) {
-// XXX bGPdata *gpd= v3d->gpd;
-
- /* draw button for showing gpencil settings and drawings */
- uiDefButBitS(block, TOG, V3D_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &v3d->flag2, 0, 0, 0, 0, "Display freehand annotations overlay over this 3D View (draw using Shift-LMB)");
- }
- else {
- uiDefButBitS(block, TOG, V3D_DISPGP, B_REDR, "Use Grease Pencil", 10, 225, 150, 20, &v3d->flag2, 0, 0, 0, 0, "Display freehand annotations overlay over this 3D View");
- uiDefBut(block, LABEL, 1, " ", 160, 180, 150, 20, NULL, 0.0, 0.0, 0, 0, "");
- }
-}
-#endif
-
static void delete_sketch_armature(bContext *C, void *arg1, void *arg2)
{
BIF_deleteSketch(C);
@@ -1416,6 +1391,12 @@ void view3d_buttons_register(ARegionType *art)
strcpy(pt->label, "Transform");
pt->draw= view3d_panel_object;
BLI_addtail(&art->paneltypes, pt);
+
+ pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel gpencil");
+ strcpy(pt->idname, "VIEW3D_PT_gpencil");
+ strcpy(pt->label, "Grease Pencil");
+ pt->draw= gpencil_panel_standard;
+ BLI_addtail(&art->paneltypes, pt);
/*
pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel properties");
strcpy(pt->idname, "VIEW3D_PT_properties");