Page 1 of 1
CELE2 pixel mode
Posted: Sat Apr 23, 2011 01:59
by Senzin
I know CELE2 isn't being developed, but I find it a bit easier to use then CELE1. The "snap" ability of CELE1 seems to apply only to scale settings, but I'm doing all my work at the pixel level. Also it doesn't work as you're moving objects, but instead requires you to press 'g' after moving. CELE2, however, snaps to the pixel level and does it as I move, which is much better.
Anyway, is it possible to make pixels be the default move/size mode so I don't have to hold shift all the time? Perhaps in one of the .py files where it checks if the shift key is pressed I could just edit it to always be true? (It wouldn't hurt to know if this is possible in CELE1 as well.)
Re: CELE2 pixel mode
Posted: Sat Apr 23, 2011 10:59
by Senzin
Figured it out for CELE2. In qtwidgets.py, there are two if statements at 175 and 181. For each if statement, swap the if and else bodies. This will make it so moving by pixels is the default and holding shift moves by scaling.
Original:Code: Select all
def __createUDimAdjusterFromModifierKeys(self, modifier_keys):
if modifier_keys & Qt.AltModifier:
if modifier_keys & Qt.ShiftModifier:
return SetOffsetUDimAdjuster()
else:
return SetScaleUDimAdjuster()
else:
if modifier_keys & Qt.ShiftModifier:
return UpdateOffsetUDimAdjuster()
else:
return UpdateScaleUDimAdjuster()
Edited:Code: Select all
def __createUDimAdjusterFromModifierKeys(self, modifier_keys):
if modifier_keys & Qt.AltModifier:
if modifier_keys & Qt.ShiftModifier:
return SetScaleUDimAdjuster()
else:
return SetOffsetUDimAdjuster()
else:
if modifier_keys & Qt.ShiftModifier:
return UpdateScaleUDimAdjuster()
else:
return UpdateOffsetUDimAdjuster()
Re: CELE2 pixel mode
Posted: Sat Apr 23, 2011 19:40
by Kulik
This is a behavior change so I don't think it will be committed. However it's useful for people wanting just absolute positions.
Re: CELE2 pixel mode
Posted: Sun Apr 24, 2011 06:06
by Senzin
Ah, I wasn't even thinking about my changes being committed. I posted them just so people could see. Though it would be nice if there was a checkbox or even a simple key-binding to enable the same swap. But CELE2 isn't being developed anymore and I've never done any GUI programming in Python, so I'm not even sure where to start.