@Justin
Truth be told, initially I wrote it as:
if self.state == self.STATE_ROOT_SELS:
# Run function_A()
if self.state == self.STATE_USER_SELS:
# Run function_B()
There was no `else` and then before posting my thread, I rewrote it to
using `if...elif...` but am unsure whether if I should add in `else` as
while reading online, I was given the impression it should be
`if...elif...else` and hence else is needed?
Additionally, seeing that I have pretty much put the 'checks' handling in
the `run_dialog`, assuming that it fulfills the following...
1. if the root node is selected
2. the child selection are all of nodeType 'mesh' only
3. returns an error/warning if all other node types
@Alok
Any comments are welcome! I am still learning :D
I am not very familiar with using the underscores, in this case, public and
private variables, as a matter of fact. If you read my code, pretty much
everything is not of private variables..
Was not aware that I can add a number of states but in your code, can I
suppose that both ALLOWED_STATES and SELECTION_STATES are considered as
global variables then?
@Marcus
To your questions, yes, there are some conventions that I will need to
follow but they are somewhat similar to the google docstring but I can
hardly find much information for my case in my company's code. Been
following the Google docstring conventions for my use, it has been useful :)
--
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 from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/ba9fb2bd-c5c3-4770-9269-f4c9d8b34a78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.