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:
authorCampbell Barton <ideasman42@gmail.com>2017-07-17 08:06:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-07-17 08:06:18 +0300
commitab5be294cec70d48ca73405f6c1641d0007035df (patch)
tree3597a2779c24ca24b32252c6b1c7dbdb7e01f491 /release/scripts/templates_py
parent02257ace225fc7cb4673639bd807360fb9e12592 (diff)
Manipulator: split alpha out of color property
Gives more convenient access from Python: `mathutils.Color` Also correct some copy-paste error w/ property subtypes.
Diffstat (limited to 'release/scripts/templates_py')
-rw-r--r--release/scripts/templates_py/manipulator_operator.py13
-rw-r--r--release/scripts/templates_py/manipulator_operator_target.py7
-rw-r--r--release/scripts/templates_py/manipulator_simple.py7
3 files changed, 20 insertions, 7 deletions
diff --git a/release/scripts/templates_py/manipulator_operator.py b/release/scripts/templates_py/manipulator_operator.py
index 0ba871bea84..00b24736b8e 100644
--- a/release/scripts/templates_py/manipulator_operator.py
+++ b/release/scripts/templates_py/manipulator_operator.py
@@ -130,8 +130,12 @@ class SelectSideOfPlaneManipulatorGroup(ManipulatorGroup):
mpr.use_draw_value = True
- mpr.color = 0.8, 0.8, 0.8, 0.5
- mpr.color_highlight = 1.0, 1.0, 1.0, 1.0
+ mpr.color = 0.8, 0.8, 0.8
+ mpr.alpha = 0.5
+
+ mpr.color_highlight = 1.0, 1.0, 1.0
+ mpr.alpha_highlight = 1.0
+
mpr.scale_basis = 0.2
self.widget_grab = mpr
@@ -162,8 +166,11 @@ class SelectSideOfPlaneManipulatorGroup(ManipulatorGroup):
mpr.use_draw_value = True
- mpr.color = 0.8, 0.8, 0.8, 0.5
+ mpr.color = 0.8, 0.8, 0.8
+ mpr.alpha = 0.5
+
mpr.color_highlight = 1.0, 1.0, 1.0, 1.0
+ mpr.alpha_highlight = 1.0
self.widget_dial = mpr
diff --git a/release/scripts/templates_py/manipulator_operator_target.py b/release/scripts/templates_py/manipulator_operator_target.py
index eafe8b1a863..0abf6f2f654 100644
--- a/release/scripts/templates_py/manipulator_operator_target.py
+++ b/release/scripts/templates_py/manipulator_operator_target.py
@@ -32,8 +32,11 @@ class MyCameraWidgetGroup(ManipulatorGroup):
mpr.matrix_basis = ob.matrix_world.normalized()
mpr.line_width = 3
- mpr.color = 0.8, 0.8, 0.8, 0.5
- mpr.color_highlight = 1.0, 1.0, 1.0, 1.0
+ mpr.color = 0.8, 0.8, 0.8
+ mpr.alpha = 0.5
+
+ mpr.color_highlight = 1.0, 1.0, 1.0
+ mpr.alpha_highlight = 1.0
self.roll_widget = mpr
diff --git a/release/scripts/templates_py/manipulator_simple.py b/release/scripts/templates_py/manipulator_simple.py
index 6cb232312e8..7e02940d527 100644
--- a/release/scripts/templates_py/manipulator_simple.py
+++ b/release/scripts/templates_py/manipulator_simple.py
@@ -29,8 +29,11 @@ class MyLampWidgetGroup(ManipulatorGroup):
mpr.matrix_basis = ob.matrix_world.normalized()
mpr.draw_style = 'BOX'
- mpr.color = 1, 0.5, 0, 0.5
- mpr.color_highlight = 1, 0.5, 1, 0.5
+ mpr.color = 1.0, 0.5, 0.0
+ mpr.alpha = 0.5
+
+ mpr.color_highlight = 1.0, 0.5, 1.0
+ mpr.alpha_highlight = 0.5
self.energy_widget = mpr