Cleanup: rename variables for gizmo templates

The abbreviation was from 'manipulator',
which was changed to gizmo during development.

Also correct operator description.
This commit is contained in:
2021-01-29 11:33:54 +11:00
parent b0ab4b815a
commit f560dc6892
4 changed files with 56 additions and 56 deletions

View File

@@ -127,25 +127,25 @@ class MyCustomShapeWidgetGroup(GizmoGroup):
def setup(self, context):
# Assign the 'offset' target property to the light energy.
ob = context.object
mpr = self.gizmos.new(MyCustomShapeWidget.bl_idname)
mpr.target_set_prop("offset", ob.data, "energy")
gz = self.gizmos.new(MyCustomShapeWidget.bl_idname)
gz.target_set_prop("offset", ob.data, "energy")
mpr.color = 1.0, 0.5, 1.0
mpr.alpha = 0.5
gz.color = 1.0, 0.5, 1.0
gz.alpha = 0.5
mpr.color_highlight = 1.0, 1.0, 1.0
mpr.alpha_highlight = 0.5
gz.color_highlight = 1.0, 1.0, 1.0
gz.alpha_highlight = 0.5
# units are large, so shrink to something more reasonable.
mpr.scale_basis = 0.1
mpr.use_draw_modal = True
gz.scale_basis = 0.1
gz.use_draw_modal = True
self.energy_widget = mpr
self.energy_gizmo = gz
def refresh(self, context):
ob = context.object
mpr = self.energy_widget
mpr.matrix_basis = ob.matrix_world.normalized()
gz = self.energy_gizmo
gz.matrix_basis = ob.matrix_world.normalized()
classes = (