[Maya-Python] When to use Logical Indicies over Physical Indicies

2016-10-26 Thread Dylan Smith
Hey Everyone, I was hoping someone could clear up something for me. When would we want to use Logical indexes instead of Physical ones. I've been reading through some documentation and the MPlug Class Reference explains what they are, but not when we should use one or the other. >From my understa

[Maya-Python] Re: pymel.internal.startup : ERROR : maya.standalone was successfully initialized, but pymel failed to import maya.cmds (or it was not populated)

2016-10-26 Thread AJ
Hello everyone, I'm having the same issue and I was wondering if anyone found the solution for the import error? -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails f

Re: [Maya-Python] Re: pymel.internal.startup : ERROR : maya.standalone was successfully initialized, but pymel failed to import maya.cmds (or it was not populated)

2016-10-26 Thread Marcus Ottosson
To fully understand the problem, would it be possible to post a reproducible? For example. $ cd c:\program files\autodesk\maya2016\bin $ mayapy>>> from maya import standalone>>> standalone.initialize()>>> from pymel import core ... ​ On 26 October 2016 at 13:49, AJ wrote: > Hello everyone, >

Re: [Maya-Python] Re: pymel.internal.startup : ERROR : maya.standalone was successfully initialized, but pymel failed to import maya.cmds (or it was not populated)

2016-10-26 Thread AJ
Found this which solved it: http://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/PyMel/standalone.html thanks On Wednesday, October 26, 2016 at 9:23:44 AM UTC-4, Marcus Ottosson wrote: > > To fully understand the problem, would it be possible to post a > reproducible? > > For example. > >

[Maya-Python] Using strings as a check in __init__?

2016-10-26 Thread likage
I would like some opinions on the way I am using instance variables in my class as I am not so sure if I am doing it right.. To be honest, this is my first time using parameters in my class __init__.. class HierarchyDialog(QtGui.QDialog): def __init__(self, state, parent=None): QtGui

Re: [Maya-Python] Using strings as a check in __init__?

2016-10-26 Thread Marcus Ottosson
Looks perfectly reasonable to me! Things I *like*: 1. Your logic is kept separate from your GUI code; it makes me warm inside knowing that I could use the very same GUI, regardless of its complexity, for any number of my own logical needs, without having to think about the internal co

Re: [Maya-Python] Using strings as a check in __init__?

2016-10-26 Thread Justin Israel
On Thu, Oct 27, 2016 at 5:42 AM likage wrote: > I would like some opinions on the way I am using instance variables in my > class as I am not so sure if I am doing it right.. To be honest, this is my > first time using parameters in my class __init__.. > > class HierarchyDialog(QtGui.QDialog): >

[Maya-Python] Re: When to use Logical Indicies over Physical Indicies

2016-10-26 Thread Cedric Bazillou
Its a really robust and flexible mechanism which makes perfect sense in a nodal application... Array attribute ( vertical one like ouput[0], output[n] ) can potentially be sparse : it means no contiguous so inputGeometry[12], inputGeometry[13], inputGeometry[26] are perfectly valid let say you h

Re: [Maya-Python] Using strings as a check in __init__?

2016-10-26 Thread likage
@Marcus Glad to know that I am somewhat on the right track! To be honest, I could not find much info online, either that or I must have been typing it wrongly, unable to get a decent result @Justin Thanks for the code, decided to implement the way that you have mentioned. Another quick question

Re: [Maya-Python] Using strings as a check in __init__?

2016-10-26 Thread likage
Slight typo in the doc string, but STACK_SELECTION should be STATE_ROOT_SELS and USER_SELECTION should be STATE_USER_SELS On Wednesday, October 26, 2016 at 4:36:05 PM UTC-7, likage wrote: > > @Marcus > Glad to know that I am somewhat on the right track! To be honest, I could > not find much info

Re: [Maya-Python] Using strings as a check in __init__?

2016-10-26 Thread likage
I re-post my message... @Marcus Thanks for the information! Glad to know that I am on track, to be honest, I was not able to find much info online, perhaps my searching skill was not that great in this aspect :p @Justin Thanks for the code. I have decided to use your format for my code. Even s

Re: [Maya-Python] Re: When to use Logical Indicies over Physical Indicies

2016-10-26 Thread Dylan Smith
I've used Maya a fair bit, but I've only just started working with the API and the Node side of things. Before this I've mainly used it for modelling and UV'ing. Though I've also used Houdini a bunch so I am familiar with Node based workflows. With your example of the 'inputGeometry' attribute, fro

Re: [Maya-Python] Using strings as a check in __init__?

2016-10-26 Thread Justin Israel
On Thu, 27 Oct 2016, 1:29 PM likage wrote: > I re-post my message... > > @Marcus > Thanks for the information! Glad to know that I am on track, to be honest, > I was not able to find much info online, perhaps my searching skill was not > that great in this aspect :p > > @Justin > Thanks for the c

Re: [Maya-Python] Using strings as a check in __init__?

2016-10-26 Thread likage
> > >> 2. Is there any chance that I will need to add in an `else` statement >> should the self.state not conform to either `self.STATE_ROOT_SELS` or >> `self.STATE_USER_SELS`? Otherwise, I suppose I can stopped such from >> happening in the run_dialog function, right? > > Can you raise a Valu

Re: [Maya-Python] Using strings as a check in __init__?

2016-10-26 Thread Justin Israel
On Thu, Oct 27, 2016 at 2:16 PM likage wrote: > > 2. Is there any chance that I will need to add in an `else` statement > should the self.state not conform to either `self.STATE_ROOT_SELS` or > `self.STATE_USER_SELS`? Otherwise, I suppose I can stopped such from > happening in the run_dialog func

Re: [Maya-Python] Using strings as a check in __init__?

2016-10-26 Thread Alok Gandhi
Most of what I wanted to comment is already covered by Justin and Marcus. Here are my very very minor comments (consider them as extras): 1. self._state instead self.state (~ by convention, self.state should be used only if `state` is public. From your code, and I presume, `state` is not public. I