Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2017-01-07 12:26:45 +0300
committerGaia Clary <gaia.clary@machinimatrix.org>2017-01-07 12:28:16 +0300
commit559d29dff9c59f7952179b07f4bce7401f68ef47 (patch)
tree44d273b1e18534880baf1878960a9bc75783048d /space_view3d_math_vis
parent56f9bbdb5e1fc988ea759bdd82f81b9b54cdf93f (diff)
add to T50357: moved console var panel from Tool shelf to scene properties
Diffstat (limited to 'space_view3d_math_vis')
-rw-r--r--space_view3d_math_vis/__init__.py17
-rw-r--r--space_view3d_math_vis/draw.py8
2 files changed, 13 insertions, 12 deletions
diff --git a/space_view3d_math_vis/__init__.py b/space_view3d_math_vis/__init__.py
index 6aa7d224..7fad3359 100644
--- a/space_view3d_math_vis/__init__.py
+++ b/space_view3d_math_vis/__init__.py
@@ -44,8 +44,9 @@ from bpy.props import StringProperty, BoolProperty, BoolVectorProperty, FloatPro
class PanelConsoleVars(bpy.types.Panel):
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'TOOLS'
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = 'scene'
bl_label = "Console Vars"
bl_idname = "mathvis.panel_console_vars"
bl_category = "Math Vis"
@@ -87,7 +88,7 @@ class DeleteVar(bpy.types.Operator):
locals = utils.console_namespace()
utils.VarStates.delete(self.key)
del locals[self.key]
- draw.tag_redraw_all_view3d_areas()
+ draw.tag_redraw_areas()
return {'FINISHED'}
@@ -101,7 +102,7 @@ class ToggleDisplay(bpy.types.Operator):
def execute(self, context):
utils.VarStates.toggle_display_state(self.key)
- draw.tag_redraw_all_view3d_areas()
+ draw.tag_redraw_areas()
return {'FINISHED'}
@@ -115,7 +116,7 @@ class ToggleLock(bpy.types.Operator):
def execute(self, context):
utils.VarStates.toggle_lock_state(self.key)
- draw.tag_redraw_all_view3d_areas()
+ draw.tag_redraw_areas()
return {'FINISHED'}
@@ -127,7 +128,7 @@ class ToggleMatrixBBoxDisplay(bpy.types.Operator):
def execute(self, context):
utils.VarStates.toggle_show_bbox()
- draw.tag_redraw_all_view3d_areas()
+ draw.tag_redraw_areas()
return {'FINISHED'}
@@ -139,7 +140,7 @@ class CleanupConsole(bpy.types.Operator):
def execute(self, context):
utils.cleanup_math_data()
- draw.tag_redraw_all_view3d_areas()
+ draw.tag_redraw_areas()
return {'FINISHED'}
@@ -149,7 +150,7 @@ def menu_func_cleanup(self, context):
def console_hook():
utils.VarStates.store_states()
- draw.tag_redraw_all_view3d_areas()
+ draw.tag_redraw_areas()
context = bpy.context
for window in context.window_manager.windows:
window.screen.areas.update()
diff --git a/space_view3d_math_vis/draw.py b/space_view3d_math_vis/draw.py
index fa185514..46b3d9ea 100644
--- a/space_view3d_math_vis/draw.py
+++ b/space_view3d_math_vis/draw.py
@@ -27,13 +27,13 @@ SpaceView3D = bpy.types.SpaceView3D
callback_handle = []
-def tag_redraw_all_view3d_areas():
+def tag_redraw_areas():
context = bpy.context
# Py cant access notifers
for window in context.window_manager.windows:
for area in window.screen.areas:
- if area.type == 'VIEW_3D':
+ if area.type in ['VIEW_3D', 'PROPERTIES']:
area.tag_redraw()
@@ -45,7 +45,7 @@ def callback_enable():
handle_view = SpaceView3D.draw_handler_add(draw_callback_view, (), 'WINDOW', 'POST_VIEW')
callback_handle[:] = handle_pixel, handle_view
- tag_redraw_all_view3d_areas()
+ tag_redraw_areas()
def callback_disable():
@@ -57,7 +57,7 @@ def callback_disable():
SpaceView3D.draw_handler_remove(handle_view, 'WINDOW')
callback_handle[:] = []
- tag_redraw_all_view3d_areas()
+ tag_redraw_areas()
def draw_callback_px():