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>2014-12-07 16:42:10 +0300
committerJoshua Leung <aligorith@gmail.com>2014-12-07 16:42:45 +0300
commitfe4d0c234eddd984b653c6530f26426871380504 (patch)
tree52d7313e811c2947d7c54db9146394a781fca9b7 /release
parente67fd7a2cbf9723a0f800d9a14834ff6838f2b7f (diff)
Bugfix T42774: BSurface addon doesn't work on new builds
It turns out that several important modelling addons depend on the assumption that Grease Pencil data gets created on the active object instead of on scene level. This commit adds a toggle for setting whether new Grease Pencil data is created on scene or object level. These work as follows: * "Scene" = The behaviour originally introduced as part of the GPencil_EditStrokes changes. New strokes are added to the scene instead of the active object, making it easier to manage things when working with Grease Pencil in general. * "Object" = The previous behaviour (from 2.50 to 2.72), where new strokes are added to the active object. This is now being reintroduced to soften the transition for addons out there which have been doing this in a lazy/lax way so far. Now, what may be slightly confusing are the "fallback" measures in place: * "Scene" - To ensure that loading old files goes ok without needing a version patch, if the active object has GPencil data, that will be used in place of the scene's own GPencil data. * "Object" - If there was no active object at the time of creating strokes (for instance, if you delete the active object immediately before drawing), GPencil data gets attached to the current scene instead. Since some tweaks may still be needed here, I've decided to bump the subversion number so that we have a reference point when doing version patches.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 5975931b83f..fc94b40f45c 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -68,6 +68,17 @@ class GreasePencilDrawingToolsPanel():
row = col.row(align=True)
row.prop(context.tool_settings, "use_grease_pencil_sessions", text="Continuous Drawing")
+
+ if context.space_data.type in ('VIEW_3D', 'CLIP_EDITOR'):
+ col.separator()
+ col.label("Data Source:")
+ row = col.row(align=True)
+ if context.space_data.type == 'VIEW_3D':
+ row.prop(context.tool_settings, "grease_pencil_source", expand=True)
+ elif context.space_data.type == 'CLIP_EDITOR':
+ row.prop(context.space_data, "grease_pencil_source", expand=True)
+
+
gpd = context.gpencil_data
if gpd:
col.separator()
@@ -328,8 +339,9 @@ class GreasePencilDataPanel():
gpd = context.gpencil_data
# Owner Selector
- # XXX: add this for 3D view too
- if context.space_data.type == 'CLIP_EDITOR':
+ if context.space_data.type == 'VIEW_3D':
+ layout.prop(context.tool_settings, "grease_pencil_source", expand=True)
+ elif context.space_data.type == 'CLIP_EDITOR':
layout.prop(context.space_data, "grease_pencil_source", expand=True)
# Grease Pencil data selector