Coder Social home page Coder Social logo

Comments (8)

Enrique-Caballero avatar Enrique-Caballero commented on August 11, 2024

It works if you select the column first, but you didnt need to do that in the past, simply mouse hovering the column and pressing space would let you lock that column. That was a much more intuitive workflow

from weights_editor.

theRussetPotato avatar theRussetPotato commented on August 11, 2024

I can't seem to replicate the window minimizing when space is pressed. I tried this on Windows and Linux for 2018, 2022, and PR130. This makes me think it might be your environment, whether that's the OS or Maya itself I can't tell.

I broke it down to a simple test. Can you see if hitting space still minimizes when the view or button has focus?

import sys
import shiboken2

from maya import cmds
from maya import OpenMayaUI

from PySide2 import QtCore
from PySide2 import QtGui
from PySide2 import QtWidgets


if sys.version_info > (3, 0):
    def long(value):
        return int(value)


class TestView(QtWidgets.QTableView):

    def __init__(self, parent=None):
        super(TestView, self).__init__(parent)
        
    def keyPressEvent(self, event):
        if event.key() == QtCore.Qt.Key_Space:
            print("space pressed")
        else:
            QtWidgets.QWidget.keyPressEvent(self, event)


class TestWindow(QtWidgets.QMainWindow):
    
    def __init__(self, parent=None):        
        QtWidgets.QMainWindow.__init__(self, parent=parent)
        
        ptr = OpenMayaUI.MQtUtil.mainWindow()
        self.maya_main_window = shiboken2.wrapInstance(long(ptr), QtWidgets.QWidget)
        self.setParent(self.maya_main_window)
        
        self.setWindowFlags(QtCore.Qt.Window)
        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        
        self.button = QtWidgets.QPushButton("Dummy button", parent=self)
        
        self.view = TestView(parent=self)
        
        self.central_layout = QtWidgets.QVBoxLayout()
        self.central_layout.addWidget(self.button)
        self.central_layout.addWidget(self.view)
        
        self.central_widget = QtWidgets.QWidget(parent=self)
        self.central_widget.setLayout(self.central_layout)
        self.setCentralWidget(self.central_widget)
        
        self.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.resize(500, 500)
    
    @classmethod
    def run(cls):
        inst = cls()
        inst.show()
        return inst


inst = TestWindow.run()

If this leads to a dead end, I could always expose the hotkey so you can switch space to another key combination. Would that be an acceptable alternative?

For being able to toggle locks by mouse hovering, I don't think that was ever implemented because it's all based on the current selection. I tried on much earlier versions of the tool but it always worked on whatever columns were selected.

from weights_editor.

Enrique-Caballero avatar Enrique-Caballero commented on August 11, 2024

Theres a chance it was just like that in my memory. Selecting the column is fine.

I think that for some reason Teradici can't tell where your mouse is hovering and it sends the spacebar to both the Weight editor and the Maya window, so when I press space to lock a column, the column locks, but also the Maya viewport under it maximizes and minimizes as well. This will make people who are working remotely on Teradicid not interested in using this tool. As the quick locking of weights is where the strength of the tool lies.

I think we can work around this by having 2 simple fixes

  1. also having the L button bound to lock column, so its both spacebar and L.
  2. having the right click menu on a column have a toggle lock option

I think giving the user the chance to change their hotkeys is a nice, but i think if the native ones work out of the box on teradici you will increase your chances of this getting traction.

From my perspective, I'm going to try to convince 40 riggers to use a tool that they think that they don't need and I wont be off to a good start if I jump in and tell them to start changing their hotkeys around

from weights_editor.

theRussetPotato avatar theRussetPotato commented on August 11, 2024

Sure I can add those 2. It won't touch the user's native hotkeys, just hotkeys specific for the tool. This already exists, except lock influences wasn't exposed in the hotkey editor. Let me know if there's a better option for space. This could also include combos with ctrl, alt, and shift.

from weights_editor.

Enrique-Caballero avatar Enrique-Caballero commented on August 11, 2024

I think space is perfect when outside of Teradici, L seems to be a good alternative if in Teradici as there doesn't seem to be an L already configured natively in Maya

from weights_editor.

theRussetPotato avatar theRussetPotato commented on August 11, 2024

space and L can now toggle locks. These can be remapped to different hotkeys just in case. Let me know if the team prefers different defaults as I find L a bit of a reach.
Also added lock/unlock to the header's right-click menu.
I'll merge these to the master branch soon then close this.

from weights_editor.

Enrique-Caballero avatar Enrique-Caballero commented on August 11, 2024

thanks bud! great work

from weights_editor.

theRussetPotato avatar theRussetPotato commented on August 11, 2024

This has been addressed in release v2.3.0

from weights_editor.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.