I had just received my brand new MacBook Pro a few days ago. Amazing machine. Probably the best laptop I have ever laid my hands upon. It was the early Feb 2011 model so I got a crazy good deal. But something caught my eye that I just had to investigate…

I’m a bit obsessive when it comes to small issues that I can’t resolve, and this is just still bothering me. I noticed that when I smooth scroll (trackpad or smooth wheel logitech mouse) on such content as webpages, or Mail, that there is a flicker in the display of text and context. It depends on the size and orientation of the content, whether it will flicker more or less. My eyes just couldn’t ignore it and I figured it couldn’t possibly be normal functionality. Thus, step one of my problem solving began: Google search.

My search turned up a number of similar complaints to both Macbook Pro and Air models, such as this discussion: https://discussions.apple.com/thread/2645516?start=0&tstart=0
It seemed the problem was not just limited to my specific early 2011 Macbook Pro. Suggestions ranged from resetting the PRAM (holding cmd+option+p+r for a couple of reboot cycles), to toggling the screen through display resolutions, to adjusting brightness of the display. Nothing seemed to make much of a difference to me.

Inversion (pixel-walk)

Googling also turned up a reference to this site, which offers various types of LCD tests: http://www.lagom.nl/lcd-test/inversion.php

According to this site, its normal to have a slight flicker in one box. And heavier flickering suggests voltage alignment issues in the LCD display. Using this test, I tried it on a number of Apple product configurations. Here is a collection of my findings:

DeviceDisplayScrollingNot Scrolling
Macbook Pro (early 2011)15" 1440×900Heavy multi-color flickering in all boxesAt least 2 boxes always lightly flickering
Mac Pro MacPro4,1 (2009)24" Cinema DisplayLight amount of flickering in all boxesNo flicker
Mac Pro MacPro5,1 (2010)27" LED Cinema DisplayNo flickerVery light flicker in box 7a
Inversion (pixel-walk) test results on LCD displays

Apple Support

After speaking to support over the phone, they suggested that I go into the store for more help. When I got to the store and started speaking with a tech at the Genius Bar, he had never heard of this issue before. But once I showed him an example on both news.google.com, and in my Apple Mail, he definitely acknowledged that its noticeable. He then went off into the back to research the issue a bit.
When the tech came back he said that he had found no outstanding information from Apple about this issue. A second tech even came and looked at the issue, and had no explanation for it.
I went around the store and checked web page scrolling on 13″ MacBook Airs, and 13″, 15″, and 17″ MacBook Pro models, with and without the higher resolution LCD display options. All models exhibited the same flicker during scrolling. My final recommendation from the stumped Apple tech was that it could be an issue with Lion and its rendering of fonts, or whatever, and that I could either return my laptop, or hold out for some kind of fix from Apple. Basically, no idea.

My question is… Am I being overly sensitive to this display flicker? I figure I can’t be the only one, as per the discussion lists of other users that notice the problem. Some of my friends with the same laptop said they have never really noticed until I pointed it out. I just wonder why such a fantastic laptop would exhibit this visual artifact, and whether it is something I should just accept as being normal?

Do you have this problem and is it noticeable? Post your feedback!

Are you affected at all by flicker when scrolling on a Macbook?

View Results

Loading ... Loading ...
 

This is a follow up post to my previous one on Installing PyQt4 for Maya 2011

Recently while putting together my next video tutorial for Python for Maya, I came to a section where I wanted to demo PyQt4 in Maya2012. But I was concerned that viewers would have to go through the complicated steps of building PyQt4. I noticed that other people have made available precompiled PyQt installers for windows (here) but I could not find any for OSX or linux. So I decided to put together a build.

I created a new project on github called MyQt4
https://github.com/justinfx/MyQt4

Its a Makefile for completely downloading and building PyQt4 for maya, and generating a .pkg installer. Hopefully someone can contribute improvements since I dont have a ton of experience writing makefiles, and also that someone might create a linux version.

Here is a link to the latest pkg build:

Snow Leopard:  MyQt4.8.6-maya2012-x64-osx-10.6.pkg

Lion:  MyQt4.8.6-maya2012-x64-osx-10.7.pkg   (Thanks Chris!)

Here are builds other people have made:

 

Update: Installing pyqt4 for maya2012

Personally, when trying to run PyQt from within Maya 2009/2010 using the pumpThread method, I never had much luck. The best I ever got was the ability to bring up a dialog but not without locking up the UI, even though the pumpThread tool is meant to address that.

Anyways, when I found out Maya 2011 was rewritten based on Qt for the UI, I was really stoked. I saw the example video of being able to design a ui file in Designer, and just directly open it in a maya script, and all I could think about was designing Qt GUIs so much more easily now. Turns out that Maya 2011 didn’t actually ship with PyQt included for licensing reasons I’m sure. But it included documentation on how one could go about building PyQt for maya. Unfortunately I had tons of issues that caused maya to just crash when importing PyQt.

What I finally figured out was a mish-mash of information from the maya documention, and different forums and user groups. So I decided to make this easier on anyone having the same problems as I did, and just collect that information into one place. This process is for OSX. I’m sure most of it is probably still relevant to linux or win, except for the last parts with ‘install_name_tool’. You would just need to make sure to find the right Qt/PyQt/SIP packages for your OS.

Building PyQt4 for Maya 2011 on OSX

Update for Maya 2012

While Maya uses newer versions, it seems the versions from the 2011 install still work. But here they are anyways incase you want the newer version for 2012:

Make sure you have downloaded and installed the latest XCode from Apple. Its also included on your OSX installation disc.

Qt: Maya has a specific version of Qt built into it. This is Qt 4.5.3.
  1. Download:  qt-mac-opensource-src-4.5.3.tar.gz
  2. Extract:
    tar zxvf qt-mac-opensource-src-4.5.3.tar.gz
    cd qt-mac-opensource-src-4.5.3
  3. Build and install:
    ./configure -cocoa -arch x86_64 -debug-and-release -no-phonon -no-phonon-backend -no-qt3support -no-webkit -nomake docs -nomake examples -nomake demos -nomake translations -no-rpath -no-framework
    make -j 8
    sudo make install
SIP: The maya docs recommend sip version 4.10
  1. Download this specific SIP:   sip-4.10.tar.gz
  2. Extract:
    tar zxvf sip-4.10.tar.gz
    cd sip-4.10
  3. Build and install:
    /Applications/Autodesk/maya2011/Maya.app/Contents/bin/mayapy configure.py –arch=x86_64
    make -j 8
    sudo make install
PyQt4: The maya docs suggest PyQt 4.7
  1. Download this specific PyQt: PyQt-mac-gpl-4.7.3.tar.gz
  2. Extract:
    tar zxvf PyQt-mac-gpl-4.7.3.tar.gz
    cd PyQt-mac-gpl-4.7.3
  3. Set up some environment variables before building:
    export QTDIR=/usr/local/Trolltech/Qt-4.5.3
    export PATH=/usr/local/Trolltech/Qt-4.5.3/bin:$PATH
    export QMAKESPEC=/usr/local/Trolltech/Qt-4.5.3/mkspecs/macx-g++
    export DYLD_LIBRARY_PATH=/usr/local/Trolltech/Qt-4.5.3/lib
  4. Build and install:
    /Applications/Autodesk/maya2011/Maya.app/Contents/bin/mayapy configure.py LIBDIR_QT=/usr/local/Trolltech/Qt‐4.5.3/lib INCDIR_QT=/usr/local/Trolltech/Qt‐4.5.3/include MOC=/usr/local/Trolltech/Qt‐4.5.3/bin/moc -w –no-designer-plugin
    make -j 8
    sudo make install
  5. PyQt4 will now be installed into Maya’s python site-packages, BUT will be linked against the wrong Qt binaries. The maya docs have an annoying multi step set of commands but they don’t copy/paste nicely, so here is a for-loop you can use:
    for mod in Core Gui Svg OpenGL Xml; do sudo find /Applications/Autodesk/maya2011/Maya.app/Contents/Frameworks/
    Python.framework/Versions/Current/lib/python2.6/site-packages/PyQt4 -name "*so" -exec install_name_tool -change libQt${mod}.4.dylib @executable_path/Qt${mod} {} ;; done

At this point you should be able to start up Maya and import and run PyQt from the script editor. You no longer need the pumpThread. Here is a test code snippet that I borrowed from here (the original had typos in it that I corrected)

import sip
import maya.OpenMayaUI as mui
from PyQt4.QtCore import *
from PyQt4.QtGui import *

def getMayaWindow():
ptr = mui.MQtUtil.mainWindow()
return sip.wrapinstance(long(ptr), QObject)

class Form(QDialog):
def __init__(self, parent=None):
super(Form, self).__init__(parent)
self.setWindowTitle(‘Test Dialog’)
self.setObjectName(‘mainUI’)
self.mainLayout = QVBoxLayout(self)
self.myButton = QPushButton(‘myButton’)
self.mainLayout.addWidget(self.myButton)

global app
global form
app = qApp
form = Form(getMayaWindow())
form.show()

It doesn’t seem like you even need the install of Qt 4.5.3 that we did at this point since we changed the links, unless you use another Qt module besides QtCore, QtGui, QtSvg, QtXml, QtOpenGL (such as QtNetwork), but this could be solved by copying over the missing libs to where Maya is expecting them. Example for copying over QtNetwork:

sudo cp /usr/local/Trolltech/Qt-4.5.3/lib/libQtNetwork.* /Applications/Autodesk/maya2011/Maya.app/Contents/MacOS
sudo install_name_tool -change libQtCore.4.dylib @executable_path/QtCore /Applications/Autodesk/maya2011/Maya.app/Contents/MacOS/libQtNetwork.4.dylib

If you happen to have a mixed library environment like me, with more than one python lib location for code, and you see any funny errors while importing a module, just make sure that mayas python site-package is always in the front of the sys.path:

sys.path.insert(0,‘/Applications/Autodesk/maya2011/Maya.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages’)

And there you have it. PyQt4 now installed in Maya 2011 under OSX.


References:

© 2011 Justin Israel | justinfx.comSuffusion theme by Sayontan Sinha