Re: [Maya-Python] [PySide2] - QTreeWidget > QStackedWidget

2017-04-27 Thread Padraig Ó Cuínn
Here it is what I have so far sorry for the delay. My main goal is to hook the Trees up for inheritance by classes. If you move one from the other it loses inheritance and gains from the attached one. I don't want the topItem to be able to be dropped or dragged on certain items (i.e build) but o

Re: [Maya-Python] [PySide2] - QTreeWidget > QStackedWidget

2017-04-27 Thread Justin Israel
On Thu, Apr 27, 2017, 8:31 PM Padraig Ó Cuínn wrote: > Here it is what I have so far sorry for the delay. > Thank you for providing the start of the example code. My main goal is to hook the Trees up for inheritance by classes. > If you move one from the other it loses inheritance and gains fro

[Maya-Python] how many lines per function

2017-04-27 Thread Rudi Hammad
Hello again, I am trying to improve my coding, to make clean and easy for others to read as I posted in other threads. This time I wonder about how many lines per function/method I shoud do. I read that recently on stack overflow *It's not about lines of code. As Steve Mcconnel and Bob Martin sa

Re: [Maya-Python] [PySide2] - QTreeWidget > QStackedWidget

2017-04-27 Thread Padraig Ó Cuínn
HI Justin, I total get why you are up in the air with this haha, It is because I am just prototyping with ideas in my head with what I want it to do. My experience in QT is not basic but then again it is not as strong as I want it to be either.I will try to explain my main goal more explicitly

[Maya-Python] Re: [MAYA MEL PYTHON] simple variable question

2017-04-27 Thread gnn
thanks a lot for the advice ! Le dimanche 23 avril 2017 21:27:19 UTC+2, Andres Weber a écrit : > > Is PL_ also supposed to be a string? Seems like you just missed your > quotation marks at the beginning and post string that surround the > arguments. Also...I'd recommend not hard baking these s

Re: [Maya-Python] Re: [MAYA MEL PYTHON] simple variable question

2017-04-27 Thread gnn
yes, this is for a python script, so thanks for your precious advive too Le dimanche 23 avril 2017 22:10:27 UTC+2, Justin Israel a écrit : > > > > On Mon, Apr 24, 2017, 7:27 AM Andres Weber > wrote: > >> Is PL_ also supposed to be a string? Seems like you just missed your >> quotation marks at

Re: [Maya-Python] how many lines per function

2017-04-27 Thread Marcus Ottosson
Putting a number on something as abstract as this is hard. How about we make it into a fun little exercise, why don't you post a long function or method, and we'll see whether it can be shortened and if doing so makes any sense. Odds are you'll find that the number of lines you chose is what's ri

Re: [Maya-Python] how many lines per function

2017-04-27 Thread Rudi Hammad
Ok, I´ll try to find some function that is relatively long and post it to see how different people deal with it. El jueves, 27 de abril de 2017, 19:15:00 (UTC+1), Marcus Ottosson escribió: > > Putting a number on something as abstract as this is hard. > > How about we make it into a fun little ex

[Maya-Python] Re: how many lines per function

2017-04-27 Thread zeth willie
I actually made a video about refactoring python for maya basics a little while ago where I talk about some of that exact stuff! Never got around to uploading it, I'll do that soon, maybe there will be something helpful in it (depending on your coding prowess). To echo Marcus, it's hard to be

[Maya-Python] Re: how many lines per function

2017-04-27 Thread Rudi Hammad
Hi Zeth, I am trying to look for a long function I wrote to post it, but I am realizing that I only get this long functions when it comes to UI programming. And I can´t find an example to post that is not work confidential. It is like the example you said.So I guess that with more experience you

[Maya-Python] Re: how many lines per function

2017-04-27 Thread Andres Weber
Just to add onto this topic: you'll find that many ways that you're thinking about doing things have been codified already into design patterns that might be more effective or efficient at getting the job done while maximizing reusable code that isn't brittle or hard to recycle/monolithic. It m

[Maya-Python] Re: how many lines per function

2017-04-27 Thread Michael Boon
I think it's important to note that Python is a scripting language. A lot of the time when you're "scripting", you're writing a function that does a series of different, one-off things. If you try to break it up into reusable components you might make everything far more complicated. Creating a

[Maya-Python] Re: how many lines per function

2017-04-27 Thread Michael Boon
Sorry Andres, I basically just repeated what you said :) On Friday, 28 April 2017 12:20:49 UTC+10, Michael Boon wrote: > > I think it's important to note that Python is a scripting language. A lot > of the time when you're "scripting", you're writing a function that does a > series of different,