Re: [Maya-Python] Capture inputs from PyQt dialog

2018-08-23 Thread kiteh
Got it, thanks! Had thought that there may not be a need to perform another `setText() I have got another question.. sorry for the mass spam. I tried following what you have mentioned and do the same for my other widgets - checkbox and radiobuttons.. eg.

[Maya-Python] Capture inputs from PyQt dialog

2018-08-23 Thread kiteh
I have created my tool using PyQt. Things are working correctly and I am encountering 2 issues. 1. This is more of an implementation - I am trying to capture the input state of the widgets that User has made within the tool. Eg. User has written something in one of the many QLineEdits, checked

Re: [Maya-Python] Capture inputs from PyQt dialog

2018-08-23 Thread kiteh
Hi Justin, glad to know that using QSettings is the way to go... As I am not getting the expected output, I must have done something wrong.. I was able to save the data, but when it comes to the loading part, no values are loaded despite it being present in the file contents if I am running the

[Maya-Python] Get the current Maya session

2018-08-24 Thread kiteh
Is there a way to check if the current maya session is 'new'? I have a tool created using PyQt, in which it stores the widgets inputs using QSettings (asked this question previously). The settings and all works out great, however I realized that if I launched a new maya session, followed by

Re: [Maya-Python] Capture inputs from PyQt dialog

2018-08-24 Thread kiteh
Noted with thanks! -- 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 python_inside_maya+unsubscr...@googlegroups.com. To view this

[Maya-Python] Can you split Maya gui into another file, the same as you do for PyQt?

2018-08-17 Thread kiteh
Hi all, I am trying to split maya gui commands into another file, from the main code, like what you may do when dealing with PyQt.. Main code in a file while the UI code in another, for the sake of better maintaining the code. Here is my code: myUI.py from maya import cmds import myCode as my

[Maya-Python] Re: Get the current Maya session

2018-08-27 Thread kiteh
Hi all, many thanks for getting back. It is upon the use of QSettings that I started to notice and wanted to implement checking conditions, as what Michael has mentioned, especially so, if there are 2 Maya sessions opened.. Will look into implementing callbacks then. Thanks again! -- You

[Maya-Python] Pyside in Sublime Text 3

2018-09-07 Thread kiteh
Hello, I am currently using Sublime Text 3. Managed to get the 'python' module working by installing in the latest 3.7.0 but I have issues getting PySide module to work. I chanced upon 'Pyside' under the Package Control, installed it with no issues. However as soon as I tried to import in as

[Maya-Python] Wildcard to filter out some controllers from current selections

2018-10-05 Thread kiteh
Hi all, I am trying to filter some controllers from current selections. Currently this is the code I had: exclude_list = [ "main_global_ctrl", "main_globalOffset_ctrl", "main_path_ctrl", "main_start_ctrl" ] exclude_ctrls = [] all_ctrls = cmds.ls(selection=True, long=True) for

[Maya-Python] Re: MayaQWidgetDockableMixin dockCloseEventTriggered not called

2018-11-05 Thread kiteh
I managed to have find a resolution. Instead of using `dockCloseEventTriggered`, using of `closeEvent` seems to have resolve it. I have to write my UI create code to include something as follows: self.ui.closeEvent = self.closeEvent And this seems to be picking up in both Maya 2017 and 2018. Or

[Maya-Python] MayaQWidgetDockableMixin dockCloseEventTriggered not called

2018-11-05 Thread kiteh
Hi all, I am having some issues with MayaQWidgetDockableMixin, in which it is a QWidget. When I am testing it out in Maya 2017, I used the signal `dockCloseEventTriggered` where a function will be called to save the relevant options I have made within my GUI by using QSettings. The settings

Re: [Maya-Python] Re: Widgets not updating when docked using workspaceControl PySide2/Maya2017

2018-11-08 Thread kiteh
Hi all, sorry that I am jumping towards this old thread. I did get this weird issue in Maya 2018, where the `dockCloseEventTriggered` is not called unless it is docked. Tried using the 'dummy' method in the above post, but still, that signal is not being called when undocked. Wondering if

[Maya-Python] Re: MayaQWidgetDockableMixin dockCloseEventTriggered not called

2018-11-05 Thread kiteh
Actually I was wrong - I had thought that using `self.closeEvent` may works in Maya 2018, but turns out it is not. Need any insights on this. Much appreciated in advance! -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.

Re: [Maya-Python] Checking order of list items in 2 lists

2018-10-10 Thread kiteh
Hi Justin, sorry that I may have made my question confusing/ I was babbling, typing away of the way I am trying to phrase my question. Let me try again :) 1. Deriving the hierarchy from Outliner Eg. This is the hierarchical level as seen in my Outliner |-- base |--|-- names |--|--|-- cleve

[Maya-Python] Text Color in QTabBar is not working

2019-01-02 Thread kiteh
Hi all, I am trying to set text color to Red in a specified tab of QTabBar. Tried using the command `setTabTextColor`, there is something happening but the text color is not changing, it is still remaining as white even when I put it at the __init__ stage. This is my code :

Re: [Maya-Python] Text Color in QTabBar is not working

2019-01-16 Thread kiteh
Currently I have tried using the following: def tabs_color(self): ... ... for index in range(self.tab_bar.count()): text = self.tab_bar.tabText(index) color = QtCore.Qt.transparent.name if text in qmenu_items else QtCore.Qt.red.name #

[Maya-Python] QPushButton toggled connection does not seems to be trigger at the start

2018-12-12 Thread kiteh
Hi everyone, I have an issue with the use of the `toggled` signal. I loaded and created the GUI using .ui or uic module. Example of my tool's code: class MyWindow(QtGui.QWidget): def __init__(self): ... # self.informationVisBtn, `setChecked` and `setCheckable` field is

[Maya-Python] Creating rounded QPushButton

2018-12-17 Thread kiteh
I am trying to create a rounded QPushButton in pythonic format. Read some solutions which are in C++ and while trying to convert them in Python terms, it does not seems to be working. btn = QtGui.QPushButton() btn.setAttribute(QtCore.Qt.WA_TranslucentBackground) btn.setStyleSheet(

Re: [Maya-Python] cmds.select question

2018-12-20 Thread kiteh
Got it, thanks. I had thought that Maya iterates it by string and hence if I queried via the use of some strings of the namespace and it will works... -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from

[Maya-Python] GUI issue with QTabBar

2018-12-20 Thread kiteh
Hi all, Sorry again, that I am asking a GUI question here. I have created a subclass of QTabBar in which I am trying to populate the tabs via selection from a QMenu (that queries for anything that are of "*_grp") However I got an issue where the first added item is seemingly behind the

Re: [Maya-Python] GUI issue with QTabBar

2018-12-21 Thread kiteh
Hi Justin, Just tried it, in which the first item that was populated is behind the 'add' button. Which is why I am adding in a hboxlayout... in hope that the tabs will appear right by the `add` button -- You received this message because you are subscribed to the Google Groups "Python

Re: [Maya-Python] GUI issue with QTabBar

2018-12-21 Thread kiteh
Instead of `class MyTabBar(QtGui.QTabBar)`, I created it as `class MyTabBar(QtGui.QMainWindow)` and a new variable solely for `QTabBar` and it works... Even so, (as I am not sure) , generally, to use `QTabBar`, does it always go along with the use of `QTabWidget`? -- You received this

Re: [Maya-Python] GUI issue with QTabBar

2018-12-21 Thread kiteh
Hi Marcus, my bad on this. `hlay` actually refers to the `HBoxLayout()` I have updated the snippet - https://pastebin.com/raw/EYcMh5hq When trying out your method where: class MyTabBar(QtGui.QTabBar): def __init__(self, parent=None): super(MyTabBar, self).__init__(parent)

Re: [Maya-Python] GUI issue with QTabBar

2018-12-21 Thread kiteh
lustration, but something of the following: (Say I selected the option - 'food' from the + icon, and within 'food', there are another 3 tabs) | + | food | | burgers | bread | rice | On Friday, December 21, 2018 at 4:58:28 PM UTC-8, kiteh wrote: > > Instead of `class MyTabBar(QtGui.QTabBar)`, I crea

Re: [Maya-Python] Can you reorder a .ui file in a function?

2018-11-29 Thread kiteh
After tinkering some more with my code, using your example as a basis, I sort of get it to work... My bad on this :) I do have a question though.. My company is using qt designer version 4.8.5 which is pretty old, I guess? Even so, when I was trying to get the list of widgets and its position

[Maya-Python] Re: Can you reorder a .ui file in a function?

2018-11-29 Thread kiteh
It seems that these layouts and the spacerItem are returning me as None when I tried using `.widget()` -- 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,

[Maya-Python] Can you reorder a .ui file in a function?

2018-11-28 Thread kiteh
Hi all, I have a .ui file in which I have created some widgets using qt-designer in a specific order. Eg. QFrame |- horLayout_01 |-|- buttonA |- horLayout_02 |-|- LabelB |-|- buttonB |- horLayout_03 |-|- buttonC |-|- buttonC And later on, this particular UI is being called and use together with

Re: [Maya-Python] Can you reorder a .ui file in a function?

2018-11-29 Thread kiteh
Hi Justin, thank you for the example. Perhaps I have not phrase my question properly (was being bad at putting in words) Using the example you have given, the reordering only happens if you click on either buttons.. But I am trying to achieve the ui setup as the code/tool is being called, and

Re: [Maya-Python] Text Color in QTabBar is not working

2019-01-03 Thread kiteh
Hi Jakob, I am trying to target it to one or more tabs found within the QTabBar. I asked about `setTabTextColor` as it was mentioned in http://pyqt.sourceforge.net/Docs/PyQt4/qtabbar.html#setTabTextColor Even so, how should I incorporate the `setStylesheet` for the tabs? I have only used it

[Maya-Python] Issues with treeview and selections

2018-09-12 Thread kiteh
Hi all, I am having some issues with QTreeView where I populates the information from another model. While trying to perform the selection within the tree view, it is suppose to be returning me the full path of the selection. However for some reasons, there is always a 'NoneType' object/

[Maya-Python] Re: How to set/ highlight QTreeView selection based on a given string

2018-09-14 Thread kiteh
This is my piece of actual code - https://pastebin.com/pfqDgVtX As soon as I tried adding the following after Line 292 (after `.setModel`) for row in range(self.tree_view.rowCount()): data.append([]) for column in range(self.tree_view.columnCount()): index = self.tree_view.index(row,

Re: [Maya-Python] Re: How to set/ highlight QTreeView selection based on a given string

2018-09-14 Thread kiteh
While I am not very adept in using PyQt yet, and this script that I have currently have on hand, is taken from a tool (with edited functions here and there). I am wondering if you could advise, if it will be better for me to re-write the whole thing? Truth be told, as mentioned, that I took

Re: [Maya-Python] Issues with treeview and selections

2018-09-13 Thread kiteh
Thanks, I will take a look! -- 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 python_inside_maya+unsubscr...@googlegroups.com. To view

Re: [Maya-Python] Re: How to set/ highlight QTreeView selection based on a given string

2018-09-18 Thread kiteh
Hi Justin, Many thanks for getting back to me on this. I do have some questions (kindly pardon my questions). 1. Why is there a need to use `enumerate`? It seems that the variable - `i` is not being used anywhere.. If so, wouldn't it be better to use/ write it as for part in (parts): ...

[Maya-Python] cmds.select question

2018-12-19 Thread kiteh
In my scene, there are the following joints: - testing:joint1_ent - testing:joint2 - testing:joint3_ent - testing:joint4 - testing:joint5 So I am trying to grab the 2 joints that ends with `_ent` and I used the following code: If I wrote my `cmds.select` as: cmds.select('*_ent')

Re: [Maya-Python] Creating rounded QPushButton

2018-12-18 Thread kiteh
Got it, thanks! -- 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 python_inside_maya+unsubscr...@googlegroups.com. To view this discussion

[Maya-Python] Convert animated cycle into a treadmill

2019-02-26 Thread kiteh
Hi all, I need some advice in getting an animated walk cycle to be converted into a treadmill-alike state such that the animation stays in one spot. While I am able to to get it done in the other way round - animation cycle in one spot and have it animated in worldspace/ across a specified

Re: [Maya-Python] Re: String formatting error for arg in dictionary for use in mel.eval

2019-03-08 Thread kiteh
Got it, thank you so much all! I wasn't aware of the double curly brackets for such scenarios. Thanks again! -- 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

[Maya-Python] String formatting error for arg in dictionary for use in mel.eval

2019-03-08 Thread kiteh
Hi all, I am trying to do a string formatting in which it is in a dictionary format that is to be used in mel command. This is my mel command - `mel.eval('animLayerMerge{"BaseAnimation", "my_layer"}')` In my python format, I rewrote as this: my_naming = 'my_layer' command = '"{"BaseAnimation",

[Maya-Python] Re: String formatting error for arg in dictionary for use in mel.eval

2019-03-08 Thread kiteh
Adding on, if I tried using `mel.eval('animLayerMerge{"BaseAnimation", "%s"}' % my_naming)`, while it seems to work, but it mutes out my_layer and instead creates another animation layer called `Merged_Layer` On Friday, March 8, 2019 at 11:41:29 AM UTC-8, kiteh wrote: >

[Maya-Python] Need help with QMenu subclass

2019-03-19 Thread kiteh
Hi all, (once again, I am very sorry that I am posting a PyQt question instead of purely Maya ones...) I have a ‘nested’, a 2-tiered qmenus in which I have created a context menu for renaming and deleting. I created a subclass for the QMenus in hopes of making my code cleaner as I am unable

[Maya-Python] Ways to check if a signal or event is blocked by another widget/ class etc

2019-04-15 Thread kiteh
I apologize in advance for the vague title but I would like to know if there are any ways that I can try using to check if the signals/ events in the parent is blocking the signals/events in the child widget, or vice verse? class QSubAction(QtGui.QAction): def __init__(self, text="",

Re: [Maya-Python] Ways to check if a signal or event is blocked by another widget/ class etc

2019-04-16 Thread kiteh
Hi Justin, thanks for replying back. You are right about the tear off in which currently not only are my options being checkable, even when I tried to add new item within, it is not showing the new item unless I perform a new Having said that, I am wondering if you could share insights with me

[Maya-Python] Best way to check if current panel is viewport

2019-06-04 Thread kiteh
What is the best way to check if the current panel is a viewport type? i am trying to set the 'Image Plane' option (under Show > Image Planes) and currently I am doing it as follows: panel = cmds.getPanel(withFocus=True) cmds.modelEditor(panel, edit=True, imagePlane=True) with the assumption

Re: [Maya-Python] Best way to check if current panel is viewport

2019-06-05 Thread kiteh
tomas > > st 5. 6. 2019 o 1:06 kiteh > napísal(a): > >> What is the best way to check if the current panel is a viewport type? >> i am trying to set the 'Image Plane' option (under Show > Image Planes) >> and currently I am doing it as follows: >> >> pan

Re: [Maya-Python] Best way to check if current panel is viewport

2019-06-05 Thread kiteh
Hey Tomas, thanks for getting back. I actually managed to get it working by using the following (too much?): model_panels = [] focus_panel = cmds.getPanel(withFocus=True) # Check if current panel is a modelPanel if cmds.objectTypeUI(focus_panel) == "modelEditor":

Re: [Maya-Python] Getting RuntimeError when trying to use confirmDialog

2019-06-14 Thread kiteh
Tried with the use of QMessageBox, and it is working fine. Initially I had thought this would work as I am calling the confirmDialog in frameEditied() (being first) and importRef() would be called on later.. Adding on, I tried to create the same prompt_dialog() in script editor, wrote 2 lines

[Maya-Python] Getting RuntimeError when trying to use confirmDialog

2019-06-13 Thread kiteh
I have 2 files - main.py and utils.py. In my utils.py, I have created a method: def prompt_dialog(title, msg): res = cmds.confirmDialog( title=title, message=msg, button=['Yes','No'], defaultButton='Yes', cancelButton='No', dismissString='No' )

[Maya-Python] Check and return dictionary items based on given key-value pairs

2019-04-30 Thread kiteh
Hi all, I am trying to do a 'skimming' or reduction method in dictionaries in which it will returns me a set of results from a given set of condition. However my current method is more of an additive where it will simply lists me any items that fulfills any one of the condition. Currently

Re: [Maya-Python] Check and return dictionary items based on given key-value pairs

2019-05-02 Thread kiteh
Hi Justin, sorry for the delay in response. It appears that I have gotten myself in this requirement that I am trying to achieve and in the end I manage to get it with the following code: result = [] for item in my_items: k, v = list(item.items())[0] if all(any(x in v.get(kc, []) for x

[Maya-Python] Maya and PyQt - Checkboxes are not displaying correctly for QMenus/QActions..

2019-05-03 Thread kiteh
Hi all, I am trying to implement a right-arrow in my QMenus and as soon as I did that, it seems to have screw up my checkboxes? https://media.giphy.com/media/W0cTSdMJ0f0xDq7Xx9/giphy.gif The checkboxes you are seeing in the gif are actually QAction objects. Wondering if anyone has experience

[Maya-Python] How to check if there are callbacks on nodes

2019-08-19 Thread kiteh
I have created some callbacks (using MNodeMessage) towards a node eg. locator1. >From this object, is it possible to check what callbacks (the ones I made) are 'linked' to this locator? Trying to ensure that some of the callbacks that I have created are indeed deleted before creating new ones

[Maya-Python] Maya shelf - Icon tool tips

2019-09-11 Thread kiteh
Hi everyone, I chanced across animBot, a maya plugin/ tooling where it contains several nice features for animation related workflows. Not here to promote the tool but there is a feature that I am interested but could not find much information. Hoping someone here could shed some light. In

Re: [Maya-Python] How to run a certain function at every n seconds until tool is close

2019-07-29 Thread kiteh
Hi Justin, I was looking at the use of `threading` while waiting for replies. I tried the following: import threading from maya import cmds t = None def run_check(): global t t = threading.Timer(5.0, run_check) t.start() get_panels() def get_panels(): for pane in

Re: [Maya-Python] How to run a certain function at every n seconds until tool is close

2019-08-01 Thread kiteh
Cool, noted on that, thank you all. Will try it out. -- 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

[Maya-Python] How to run a certain function at every n seconds until tool is close

2019-07-29 Thread kiteh
Does Maya have some sort of callbacks or script jobs that will allows me to run a function every 30 seconds (eg. for updating the contents in the tool) and this callback.scriptjob will be removed upon tool closure? -- You received this message because you are subscribed to the Google Groups

[Maya-Python] Using delegate with QListWidgetItem

2019-07-15 Thread kiteh
Hi all, I have some issues with the use of delegate model... Here is my code: https://pastebin.com/yN2t20jW In my QListWidget, I am trying to categorize stuff. In the give example, there are 2 catergories - "All Nums" and "All Letters". If I tried to check/ uncheck on either of the above

Re: [Maya-Python] scriptJob for change in optionVar values

2019-10-30 Thread kiteh
Hi Tim, Thanks for the info, nonetheless! Glad to know that the scriptJob command gets updated with new args in Maya 2019. I have this tool written in PyQt Gui (accessed by clicking on the shelf button icon), in which it has a checkbox within that allows/ tells user whether the "Auto" mode

[Maya-Python] Re: Getting values from channels on Anim Layers using OpenMaya

2019-12-03 Thread kiteh
any insights on this, anyone? > > -- 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 python_inside_maya+unsubscr...@googlegroups.com. To

[Maya-Python] Need help with iterating rotational (animated) values

2019-12-16 Thread kiteh
Hi all, I am trying to write a script that checks for flipped curves within a rig. Initially I had one written up, though the script execution is very fast, it is unable to process for any controllers that are either constrained or if it is on animation layers. However, I have re-written my

[Maya-Python] OpenMaya command that checks if attribute has animation?

2019-12-03 Thread kiteh
Hi all, I need some help with getting animation curves using OpenMaya. I have 3 cases in which nodes in scene will be generated: - Manual keyed - By constrains - Use of anim layers In my code, I was able to get the first scenario working. And so I thought it will work for the other 2

Re: [Maya-Python] Re: Getting values from channels on Anim Layers using OpenMaya

2019-12-09 Thread kiteh
Hey Ian, sorry for the late response and thanks for getting back despite I have removed the contents in the post. In that script link you have provided, it is evaluating at every frame. Is it possible to not do that? -- You received this message because you are subscribed to the Google Groups

Re: [Maya-Python] Re: Getting values from channels on Anim Layers using OpenMaya

2019-12-10 Thread kiteh
I think I may have made a miscommunication. Should have added in more information. Given in a typical scene in which I have a locator with its rotational channels being animated in Frame 1-10. If using the code that you have given, it does derives me the list of rotational values in these 10

[Maya-Python] Question on bakeResults

2019-10-16 Thread kiteh
I have a locator constrained to a controller in which the constrained channels are mainly the translate and rotate. Initially, I tried to bake out these channels over a frame range as follows: frames = range(1,10) for frame in sorted(frames): # this loops through frame range and sets

[Maya-Python] scriptJob for change in optionVar values

2019-10-29 Thread kiteh
Hi all, I am trying to write a custom scriptJob that will activates when it detects a change in an `optionVar` value. Initially, I was using `RecentCommandChanged` as the event name, which seemingly have work, but however, it calls everything I navigate to another (new) tool command. Is there

Re: [Maya-Python] scriptJob for change in optionVar values

2019-10-29 Thread kiteh
Okay, my bad, it seems that this command is only available in Maya 2019. Unfortunately I am using an earlier version, Maya 2018 though. any other alternatives? -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To

Re: [Maya-Python] scriptJob for change in optionVar values

2019-10-29 Thread kiteh
Hey Tim, thanks for getting back. I am not seeing -optionVarChange within the docs of `scriptJob` command though (I'm looking at the 2018 documentation). -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe

[Maya-Python] Having trouble with progressBar increments

2019-10-18 Thread kiteh
Is it possible to have all the maya commands within a method to be integrated into cmds.progressBar? I am trying to denote the process rather than just using the waitCursor icon (as it may be deem as the application hanging) However I am having issues in incrementing the process. import

[Maya-Python] Re: Having trouble with progressBar increments

2019-10-18 Thread kiteh
By the way, I always tried with "text" only where I am doing something as follows: import maya.mel def progress_bar_text(text): gMainProgressBar = maya.mel.eval('$tmp = $gMainProgressBar') cmds.progressBar(gMainProgressBar, edit=True, status=text) if gMainProgressBar:

Re: [Maya-Python] Having trouble with progressBar increments

2019-10-18 Thread kiteh
Hi Justin, Many thanks for the input. I have one more problem, trying to change the text in the progress bar. And so, I did something like this: def get_progress_bar(status_text, max_value): try: progress_bar = mel.eval("$tmp = $gMainProgressBar") except RuntimeError:

Re: [Maya-Python] menuItem checking based on optionVars

2019-10-25 Thread kiteh
But even so, is menuItem -checkBox (`optionVar -q "myToolState"`) -stp "python" -l "myTool Mode" -c "import myTool; amyTool.toggle_mode()"; a good way for the menuItem checking to work properly? -- You received this message because you are subscribed to the Google Groups "Python Programming

Re: [Maya-Python] menuItem checking based on optionVars

2019-10-25 Thread kiteh
Hi Justin, the python command actually sets the optionVar in the tool itself. def toggle_mode(): state = cmds.optionVar(q = 'myToolState') # In the method of these two, it will set the optionVar value again # cmds.optionVar(intValue = ('myToolState', state)) if state == 1:

[Maya-Python] menuItem checking based on optionVars

2019-10-25 Thread kiteh
Hi everyone, I have a shelf button that has a popup menu when performing a right mouse click. These shelf button and menu are created using mel. In the menu item of the popup menu, the menuItem within is actually a checkbox option where it co-relates to a pyqt checkbox within a tool that was

[Maya-Python] Getting values from channels on Anim Layers using OpenMaya

2019-12-02 Thread kiteh
Hi all, I need some help with Animation-related + OpenMaya API help. I am using OpenMaya to iterate rig controllers I have in my scene, in which I am mainly targeting at the rotational attributes. However I got a snag if the animation data of the controller(s) comes from an animation layer.

[Maya-Python] Re: Getting values from channels on Anim Layers using OpenMaya

2019-12-02 Thread kiteh
Just realized that I have omitted a portion of the code, but have linked it here for better clarity - https://pastebin.com/raw/mpxQsbVT -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and

[Maya-Python] Animation Layer naming got stripped

2020-03-05 Thread kiteh
2 Animation Layers in my scene - "BaseAnimation" and "testing:AnimLayer1" While trying to query all the existing animation layers in the scene: for layer in cmds.ls(type="animLayer"): print layer # BaseAnimation # AnimLayer1 I was expecting "testing:AnimLayer1" as part of the result but

Re: [Maya-Python] Animation Layer naming got stripped

2020-03-05 Thread kiteh
the results are only returning me "AnimLayer1", "BaseAnimation" or ":" On Thursday, March 5, 2020 at 11:20:02 AM UTC-8, Justin Israel wrote: > > > > On Fri, Mar 6, 2020, 8:14 AM kiteh > > wrote: > >> 2 Animation Layers in my scene

[Maya-Python] Getting viewport dimension and laying image planes within

2020-01-23 Thread kiteh
I have a number of image planes (created using Free Image Plane), of varying sizes. By varying sizes, I mean to say that the image sources are of different dimensions. (No changes are made towards the scale attributes) Even so, I am trying to create a script in which it will allows me to

[Maya-Python] Re: Getting viewport dimension and laying image planes within

2020-01-24 Thread kiteh
# Use render's > resolution. > > > Im not sure to understand what you are trying to do. Are you trying to do > something like this : https://github.com/imageworks/spReticle > > > On Thursday, January 23, 2020 at 8:30:23 PM UTC-5, kiteh wrote: >> >> I have a number

[Maya-Python] Attribute value returned from timeChanged event is incorrect

2020-01-07 Thread kiteh
Hi everyone, I had this weird issue with the use of MEventMessage for `timeChanged` What I am trying to achieve is - When User scrubs the time slider, eg. from F1 to F10, the `timeChanged` event that I have created, will be picked up and returning me the current attribute of that frame. Eg. I