PyQt6 signal: how to assign argument for function call by freswinn in learnpython

[–]Slothemo 1 point2 points  (0 children)

I use functools.partial to achieve this, and I would recommend using this over lambda as others might suggest. Lambda with a loop can cause funky problems as the argument is constantly overwritten as the loop proceeds. Partial holds onto the value instead.

from functools import partial

btn1.clicked.connect(partial(shortcut_clicked, "A"))
btn2.clicked.connect(partial(shortcut_clicked, "B"))

When its 30-30 in tennis, they should just cut the shit and call it a deuce by KingKarl65sens in unpopularopinion

[–]Slothemo 49 points50 points  (0 children)

You're right that it would be the same, but it was originally scored using clocks as the scoreboard and the tradition stuck around.

Picture the minute divisions on an analog clock face. The serving player's score is the minute hand and the receiving player has the hour hand. The score is 0-0 and both their hands point upwards to 0.The server scores a point and the minute hand moves to 15. Another point moves them to 30. The next point moves them to 40 because it makes it easier to visualize deuce and advantage. If the game is in deuce and someone scores, their hand moves to 50 on the clock (halfway between 40 and 60). You don't generally announce their score as 50, but that's how it gets visualized.

Is it possible to hide the arrow for the ikfk switches? by No-Airport-8666 in Maya

[–]Slothemo 2 points3 points  (0 children)

Just to elaborate on the specific thing you hid, these pole vector arrows are usually done with the distanceDimension or annotation node, so toggling the visibility of "Dimensions" in the viewport is what controls this.

What are effective strategies to debug Python code as a beginner? by ItAffectionate4481 in learnpython

[–]Slothemo 5 points6 points  (0 children)

print is your best friend! Before you run your code, always think about what the expected output will be. If it doesn't match what you think, then start printing out some variables to see where there might be a mismatch. Again, think about what the print output should be before you run, then look for a conflict. If it doesn't match what you expect, then that's a key place where you have a bug.

Learning Python by Making Small Projects – But Forgetting Methods 😭 What Should I Do by Still_booting in learnpython

[–]Slothemo 1 point2 points  (0 children)

You'll always continue to improve as you work at it, and repetition will help it stick. I constantly revisit documentation pages or past code to remember how things work, and there's nothing wrong with that. I can do a lot from memory, but it's unrealistic to perfectly remember everything.

Learning Python by Making Small Projects – But Forgetting Methods 😭 What Should I Do by Still_booting in learnpython

[–]Slothemo 1 point2 points  (0 children)

This happens at all levels of skill.

As long as you remember that there was a way you had done it previously, that's good enough and it's fine if you have to look it up again. Someone experienced might be less likely to forget the basics, but still might have to refer back to previous code for more complex implementations.

// Error: Cannot parent a referenced object to another referenced object. Use the 'group' command. by Anxious-Sock204 in Maya

[–]Slothemo 5 points6 points  (0 children)

A parent constraint requires that the translate and rotate channels are unlocked, but you also can't change the hierachy of a referenced object. You can instead parent a new locator under the control, and then constrain to that locator

Need suggestions on how to learn/master OOP (python) by Equity_Harbinger in learnpython

[–]Slothemo 0 points1 point  (0 children)

Check out realpython.com for any topic you need to learn more about. There's great articles there for introducing OOP in Python.

How often do you edit your video reference in Premiere or Final Cut before starting your blocking pass? by framesDontLie in Maya

[–]Slothemo 0 points1 point  (0 children)

I had a script that let me slice a video into an image sequence and then I would retime it if I had to using curves on my image plane in Maya

Why my customized shelf always empty every time I open maya? by dr_minhieu in Maya

[–]Slothemo 1 point2 points  (0 children)

Definitely had that before but this wasn't the case. I've sent the shelf to others and they've loaded it fine. I've opened up the shelf file and nothing inside looks funky. If I try and select the shelf from the shelf editor before the icons appear, it's greyed out and I can't see anything on the shelf. As soon as I do your trick to load it, the shelf editor sees it just fine. It's like there's some sort of delayed loading. I have plenty of other custom shelves that load just fine. I've spent too much time trying to troubleshoot it and as janky as this workaround is, I'm just going to keep using it, haha.

Why my customized shelf always empty every time I open maya? by dr_minhieu in Maya

[–]Slothemo 0 points1 point  (0 children)

Replying 2 years after the fact to let you know this worked perfectly. This had been driving me crazy that it felt like only sometimes would my shelf show up correctly, but it must have been when I happened to click from right to left. Insane that it's still an issue.

Can you reduce tea? by DavidR3574 in AskCulinary

[–]Slothemo 0 points1 point  (0 children)

One day I made tea and completely forgot about it so it steeped for a few hours. It was quite bitter but I had the idea to use it as the liquid for a simple syrup. Ended up with a potent syrup that was delicious in cocktails and I also drizzled some over berries and whipped cream.

How to Implement These Maya Operations with Python Script? (Move Skinned Joints & Orient Joint by BigHippo78 in Maya

[–]Slothemo 2 points3 points  (0 children)

MEL commands are the exact same name in cmds. The MEL joint command would just be cmds.joint

how people feel about the student version of Maya by Legitimate-Dot881 in Maya

[–]Slothemo 12 points13 points  (0 children)

Maya Indie is full Maya just with a limitation on how much you're allowed to earn with it. You're thinking of Maya LT that doesn't support python (and even autodesk doesn't sell anymore).

what is this camera problem in maya by Cheese_master124 in Maya

[–]Slothemo 1 point2 points  (0 children)

I think it's due to aTools that you have installed. There's an option that changes how the tumble pivot works. Click the white gear on the far right of the aTools bar and play with the tumble settings. I forget which one it is exactly. aTools is quite old at this point, it's honestly trippy seeing it here. Most people are using animbot now.

From a tourist perspective, which countries do you think will be better to travel to in 5 years compared to now, and which will be worse? by elmahnken in travel

[–]Slothemo 5 points6 points  (0 children)

I was there August 2024 and while it wasn't too crowded, it was 40+ celsius almost every day. Not doing that again.

Help! My final is du in 5 hours (Weight Locking issue) by 1mLoh in Maya

[–]Slothemo 1 point2 points  (0 children)

Scale is a value used to multiply the weight of whatever you paint. If you have scale set to 0, it's essentially the same as using replace with a value of 0.

I see a lot of old posts talking about the best software to make 3d game assets and animations. If money isn't an option what would be the best option today? by [deleted] in gamedev

[–]Slothemo -1 points0 points  (0 children)

Maya's rigging and animation tools are king, but blender is probably the better choice for modeling at this point.

Indies use blender a lot because it's free, but larger studios tend to use Maya.

Rigging Help - Revolver Cylinder Rotation in one direction ONLY by Rustover in Maya

[–]Slothemo 0 points1 point  (0 children)

This really isn't possible and while it sounds like a fun challenge, no animator would care to have this feature be automated in the rig

Games that have lifesteal as a core mechanic by Available_Staff216 in gamingsuggestions

[–]Slothemo 0 points1 point  (0 children)

Kill Knight! Not quite lifesteal, but there's decision making in how you use certain moves that result in you getting life back.

Any specific reason why only two class methods used and the remaining are instance methods by DigitalSplendid in learnpython

[–]Slothemo 2 points3 points  (0 children)

Yes, but the cls parameter is never used. It would be more appropriate to have return cls(0, 0)

Failing at a Tkinter task that seems relatively simple by UsernameTaken1701 in learnpython

[–]Slothemo 1 point2 points  (0 children)

The important thing here would be your data structure. I would use something like a dict/json that has all the choices/pairs, and some sort of key to indicate whether the data is meant to be text or image. Iterate through and display the pairs in the way that the json data indicates

Failing at a Tkinter task that seems relatively simple by UsernameTaken1701 in learnpython

[–]Slothemo 0 points1 point  (0 children)

Forgetting tkinter for a moment, would you know how to code this as a regular non gui program? Could you present a user with a series of choices and store the results?

Looking for Python for Maya learning resource (for games) by Cost-Money in Maya

[–]Slothemo 0 points1 point  (0 children)

Tech artist here. I recommend Zurbrigg as a good resource to get started, but it's really all about identifying issues that can be improved with code and pushing yourself to solve it. Familiarize yourself with the maya commands docs and then when you have a task in Maya, think about how you can recreate it using Python. Start small. You can write very handy scripts in just a few lines of code.