Re: [Maya-Python] PySide6 Transition Guide

2024-05-09 Thread Justin Israel
On Thu, May 9, 2024, 6:31 PM Marcus Ottosson wrote: > Hi all, > > With Maya 2025 released, we're now in the domain of PySide6 and Qt 6. > > We've updated Qt.py to account for this, keeping code written with > PySide2, PySide, PyQt4 and PyQt5 running in Maya 2025. > > -

Re: [Maya-Python] Re: C++ already deleted

2024-03-25 Thread Justin Israel
age collector from >>properly releasing memory. >> >> pythonCopy code >> # Example of reference cycle >> widget1 = QtWidgets.QWidget() >> widget2 = QtWidgets.QWidget() >> widget1.child = widget2 >> widget2.parent = widget1 >> >> By follow

Re: [Maya-Python] Re: C++ already deleted

2024-03-24 Thread Justin Israel
;> PySide class. Let’s say class A gets instanced twice. If instance X is >> garbage collected for whatever reason, when instance Y tries to use Y.b >> it’ll complain about the C++ ref to 123 being lost. >> >> class A: >> def __init__(self, a=123): >>

Re: [Maya-Python] Re: C++ already deleted

2024-03-23 Thread Justin Israel
Qt (C++) usually honors the parent-child relationship, so it won't automatically delete a widget unless its parent is being deleted. And if it doesn't have a parent, it shouldn't be automatically deleted by reference count unless it is wrapped in a smart pointer. Or maybe you have looked up a

Re: [Maya-Python] How to analyze other people's codes?

2024-02-28 Thread Justin Israel
It's a tough question to answer with absolute certainty, as it can really depend on a lot of factors. It can depend on the quality of the code. * does it contain helpful comments to explain the intent of sections of code * is it written with other developers in mind, or is the original developer

Re: [Maya-Python] Re: Python Maya add new attribute

2023-07-27 Thread Justin Israel
No worries. Happy to help. On Thu, 27 Jul 2023, 11:47 pm SquashnStretch net, wrote: > I guess I forgot to reply to this Justin, sorry and thank you very much > for taking the time to explain perfectly ;) > > Thanks > F > > Il giorno gio 13 lug 2023 alle ore 10:48 Justin

Re: [Maya-Python] Re: Python Maya add new attribute

2023-07-13 Thread Justin Israel
e your functions more "pure" and pass in the required inputs to perform the work, and return outputs. > Thanks > F > > Il giorno lun 26 giu 2023 alle ore 05:49 Justin Israel < > justinisr...@gmail.com> ha scritto: > >> From what I can see in your last code

Re: [Maya-Python] What exactly is the "filenames" attribute in a reference node

2023-06-27 Thread Justin Israel
On Wed, Jun 28, 2023 at 11:22 AM Javier wrote: > Hello all, > > Maybe this is a niche question but I have recently noticed that there is a > "filenames" -"fn" for short name- array attribute in reference nodes, and > it can be set as in "myReferencenodeRN.fn[0]", "myReferencenodeRN.fn[1]", >

Re: [Maya-Python] Re: Python Maya add new attribute

2023-06-25 Thread Justin Israel
ue) > print("ParentConstraint creato tra", selected_object, "e", > groups[0]) > > > # Creazione della finestra > window = mc.window(title="Add Attribute") > mc.columnLayout(adjustableColumn=True) > attribute_field = mc.textFiel

Re: [Maya-Python] Re: Python Maya add new attribute

2023-06-23 Thread Justin Israel
On Sat, 24 Jun 2023, 5:13 am SquashnStretch net, wrote: > actually that was the version with globals, I tried many ways but I get > the same results. > thanks > Can you share your attempt without globals? > Il giorno venerdì 23 giugno 2023 alle 17:41:28 UTC+1 SquashnStretch net ha >

Re: [Maya-Python] Missing attribute error after duplicating

2023-06-22 Thread Justin Israel
On Thu, 22 Jun 2023, 10:19 pm Herbert Agudera, wrote: > Hello everyone. > > I am fairly new at scripting in maya/python. A few days ago i watched some > youtube videos about python scripting for maya artists. watched arvids > video about making a script to convert maya shaders to arnold shaders.

Re: [Maya-Python] API error

2023-05-20 Thread Justin Israel
Do you need to rename use_NewAPI -> maya_useNewAPI ? https://help.autodesk.com/view/MAYAUL/2022/ENU/?guid=Maya_SDK_A_First_Plugin_Python_HelloWorldAPI2_html Also for future code, it would be better to use a pastebin or gist to retain the formatting, so that when your error contains line

Re: [Maya-Python] Pymel Menu won't autoload Maya 2024

2023-05-18 Thread Justin Israel
On Thu, May 18, 2023 at 5:46 AM A wrote: > Hey Folks, > > I have pymel, installed via pip on Maya 2024, > > Pymel itself is working. But im having a really strange issue. > > My studio menu is built with pymel... > > I have a maya module.. > ib.mod - this then loads the plugin >

Re: [Maya-Python] Adding RIG space

2023-05-10 Thread Justin Israel
; F > > Il giorno mercoledì 10 maggio 2023 alle 10:36:29 UTC+1 Justin Israel ha > scritto: > >> >> >> On Wed, 10 May 2023, 8:40 pm SquashnStretch net, >> wrote: >> >>> great, let me know if you can take a look at it. >> >> >> >

Re: [Maya-Python] Adding RIG space

2023-05-10 Thread Justin Israel
0 maggio 2023 alle 08:22:57 UTC+1 Justin Israel ha > scritto: > >> >> >> On Tue, 9 May 2023, 9:45 am SquashnStretch net, >> wrote: >> >>> oh damn, sorry >>> can you retry please ? >>> >> >> Oops forgot to reply. Yes it

Re: [Maya-Python] Adding RIG space

2023-05-10 Thread Justin Israel
On Tue, 9 May 2023, 9:45 am SquashnStretch net, wrote: > oh damn, sorry > can you retry please ? > Oops forgot to reply. Yes it's accessible now. > thanks > F > > Il giorno lun 8 mag 2023 alle ore 22:35 Justin Israel < > justinisr...@gmail.com> ha scritto:

Re: [Maya-Python] Adding RIG space

2023-05-08 Thread Justin Israel
On Tue, May 9, 2023 at 8:56 AM SquashnStretch net wrote: > In my previous post, I asked for help understanding how to connect > different nodes from different elements all at once. I managed to work > around the problem by connecting the attributes one by one, which seemed to > work. > > Now, I

Re: [Maya-Python] Compiling plugins in Visual Studio for multiple maya versions and platforms

2023-05-05 Thread Justin Israel
E_FIND_DEBUG_MODE TRUE) > find_path(cache "FindMaya.cmake" ${CMAKE_MODULE_PATH}) > set(CMAKE_FIND_DEBUG_MODE FALSE) > > The output is https://pastebin.com/nxHyd8dr > El viernes, 5 de mayo de 2023 a las 9:08:09 UTC+2, Justin Israel escribió: > >> >> >>

Re: [Maya-Python] Compiling plugins in Visual Studio for multiple maya versions and platforms

2023-05-05 Thread Justin Israel
g but I thought the latter was for finding the full path to an executable? > > > El viernes, 5 de mayo de 2023 a las 8:02:25 UTC+2, Justin Israel escribió: > >> >> >> On Fri, 5 May 2023, 5:05 pm Rudi Hammad, wrote: >> >>> Not sure If I am using find_p

Re: [Maya-Python] Compiling plugins in Visual Studio for multiple maya versions and platforms

2023-05-05 Thread Justin Israel
y stuck because all looks okey >>> doesn't it? >>> >> >> Could you try this, to debug the module search path? >> https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_DEBUG_MODE.html >> >> >> [image: Capture.JPG] >>> El sábado, 1 de enero

Re: [Maya-Python] how to get the return value with MGlobal::executePythonCommandStringResult

2023-04-30 Thread Justin Israel
set up the python env first, with the context code. > > El domingo, 30 de abril de 2023 a las 23:14:38 UTC+2, Justin Israel > escribió: > >> "Executes a Python command that returns a string result from the command >> engine" >> >> Given th

Re: [Maya-Python] how to get the return value with MGlobal::executePythonCommandStringResult

2023-04-30 Thread Justin Israel
"Executes a Python command that returns a string result from the command engine" Given the documentation, executePythonCommandStringResult wants to parse the python statement through its own command engine. It kind of assumes that the statement sent to this particular function is a single command

Re: [Maya-Python] Connect rename command in QListWidget item edit

2023-04-21 Thread Justin Israel
Here is an example with a few of the many ways this could be solved: https://gist.github.com/justinfx/134992bd323c76d55af2c1b2750ebd84 In the MyListWidget example, it is implementing the edit() hook to capture when an item edit operation is starting, so that we can remember the current value

Re: [Maya-Python] PyMEL 1.3.0 Released

2023-04-17 Thread Justin Israel
On Mon, 17 Apr 2023, 8:11 pm Marcus Ottosson, wrote: > I know that pip installing is a bit less convenient > > Just adding my two cents to this on how it is not just a bit less > convenient, but a complete killer in some cases; the cases that are most > important from my perspective. Namely,

Re: [Maya-Python] submit vray scene export job to deadline

2023-04-10 Thread Justin Israel
I haven't used Deadline before, so maybe someone with more experience will spot something. But just looking at your script, I was wondering if that was a copy-paste error in the way you build the project_path with the other parts of the path. 'example' + 'images/' ? I'm not sure what Deadline

Re: [Maya-Python] Maya 2024 pyMel ;(

2023-04-02 Thread Justin Israel
missed a conversation somewhere. But it > appears to have happened out of the blue over at Autodesk headquarters? :O > Maybe @Chad Dombrova knows more? > > On Sun, 2 Apr 2023 at 00:28, Justin Israel wrote: > >> >> >> On Sun, 2 Apr 2023, 11:23 am Abdelhalim abulmagd, &l

Re: [Maya-Python] Maya 2024 pyMel ;(

2023-04-01 Thread Justin Israel
On Sun, 2 Apr 2023, 11:23 am Abdelhalim abulmagd, < abdelhalim.abulm...@gmail.com> wrote: > Why pymel not available? > Seems like they might have stopped shipping with PyMel as of 2023 and you need to manually install it?

Re: [Maya-Python] Maya 2024 pyMel ;(

2023-04-01 Thread Justin Israel
Almost all of those calls have an equivalent maya cmds function, with the difference that you pass the string name of the ui object returned from previous ui calls. So just look at the Maya cmds python api. Getting the main window name can be done with a call into mel: gMainWindow =

Re: [Maya-Python] check channels before constraints

2023-03-27 Thread Justin Israel
d to >> practice that, seems the right way... >> >> I'll try to work that way and im pretty sure I'll annoying you again ;) >> >> thanks! >> F >> >> Il giorno domenica 26 marzo 2023 alle 20:35:30 UTC+1 Justin Israel ha >> scritto: >> &g

Re: [Maya-Python] check channels before constraints

2023-03-26 Thread Justin Israel
> > ctl = item > > makeParentCons = mc.parentConstraint(ctl, userSel[0][idx], mo=True, > w=1, sr=['x', 'y', 'z']) > > elif _has_rot ==1 and _has_trans ==0: > > for idx, item in enumerate(LocList): > > ctl = item > > makeParentCons = mc

Re: [Maya-Python] check channels before constraints

2023-03-25 Thread Justin Israel
The getAttr function can tell you if an attribute is locked, or even "settable": https://help.autodesk.com/cloudhelp/2022/ENU/Maya-Tech-Docs/CommandsPython/getAttr.html On Sun, Mar 26, 2023 at 9:05 AM SquashnStretch net < squashnstret...@gmail.com> wrote: > Hello everyone, > I wrote (with a lot

Re: [Maya-Python] Maya linux Crashing on py3 not with py2

2023-01-01 Thread Justin Israel
Is it an upgrade from a previous major version of Maya that may be picking up python2 plugins or startup code? On Sun, 1 Jan 2023, 7:57 pm Maize S, wrote: > Hey all, > > I have a stack trace here. I cant seem to launch maya 2022, if i add the > args -pythonver 2 to my command maya launches with

Re: [Maya-Python] Maya Python API 1.0 output value to an Array

2022-12-27 Thread Justin Israel
On Wed, 28 Dec 2022, 2:42 am hwee li, wrote: > hi, Justin > thanks for your reply and your code , after I got someone's help , it is > about the parameter pointer issues between C++ and Python, which needs > MscriptUtil() to solve , the blow code works finally . > All good. I was avoiding

Re: [Maya-Python] Maya Python API 1.0 output value to an Array

2022-12-26 Thread Justin Israel
Working with Maya arrays and wrappers between Python and C++ is not always intuitive. Would it be easier to just grab the value as needed? import maya.OpenMaya as omi col = omi.MColor(1.0, 0.5, 0.25) # tuple rgb = col.r, col.g, col.b # If you need MFloatArray arr = omi.MFloatArray(3) arr[0],

Re: [Maya-Python] Re: (Maya Python) Is there a way to run a command from a menuItem inside a objectMenu

2022-12-20 Thread Justin Israel
On Wed, 21 Dec 2022, 2:24 pm Kat Patterson, wrote: > This helped greatly! Thank you so very much!! > > I do have one last question, do you know of a way to make the the changes > of the dropdown menus only run off of a press of a button? (as in i have a > 'create' button next to each dropdown

Re: [Maya-Python] Re: (Maya Python) Is there a way to run a command from a menuItem inside a objectMenu

2022-12-20 Thread Justin Israel
On Wed, Dec 21, 2022 at 1:42 PM Kat Patterson wrote: > Okay so that did help, but now I am back to how do I add it to each > individual command (i posted my code, it is a menu that creates an object, > and another option to duplicate that object said amount of times) and how > do I add the

Re: [Maya-Python] Re: (Maya Python) Is there a way to run a command from a menuItem inside a objectMenu

2022-12-20 Thread Justin Israel
On Wed, Dec 21, 2022 at 1:19 PM Kat Patterson wrote: > def printNewMenuItem( item ): > print item > > This code alone ALWAYS produces a invalid syntax on my end, so I am unable > to check if that even works, or how it even works. I have looked at the > documentation and am unable to find a

Re: [Maya-Python] Re: (Maya Python) Is there a way to run a command from a menuItem inside a objectMenu

2022-12-20 Thread Justin Israel
Hi Kat, Have a look here: https://help.autodesk.com/cloudhelp/2022/ENU/Maya-Tech-Docs/CommandsPython/optionMenu.html "Note that commands attached to menu items will not get called. Attach any commands via the -cc/changedCommand flag." And specifically the changeCommand:

Re: [Maya-Python] enable preference option via command

2022-12-16 Thread Justin Israel
On Sat, 17 Dec 2022, 2:03 am Pacifique Nzitonda, < nzitondapacifi...@gmail.com> wrote: > Indeed I'm using the inViewmessage from cmds but I noticed sometime in > Maya that option in disabled in preferences. > Now I'm looking how to enable it. I also discovered that I can check if it > is checked

Re: [Maya-Python] Distribute spheres on ellipse pattern with python

2022-10-10 Thread Justin Israel
be the most useful of all the links I had found: >>>> https://stackoverflow.com/a/17762156/496445 >>>> >>>> What do you think of this solution I came up with based on that? >>>> https://gist.github.com/justinfx/b257dc162680978786ed4fd45409c997 >>>> >>>&

Re: [Maya-Python] Distribute spheres on ellipse pattern with python

2022-10-10 Thread Justin Israel
What do you think of this solution I came up with based on that? https://gist.github.com/justinfx/b257dc162680978786ed4fd45409c997 On Mon, Oct 10, 2022 at 9:52 AM joão chaves wrote: > Hey all. > > I have a simple script that distributes spheres in a circular pattern > (fixed by J

Re: [Maya-Python] Duplicate spheres in half circle

2022-10-07 Thread Justin Israel
the end of the else line. (at least was giving me a > syntax error) > Oops :-) > Awesome, have a great weekend! > You're welcome. Enjoy! > Justin Israel escreveu no dia sábado, 8/10/2022 > à(s) 00:17: > >> >> >> On Sat, Oct 8, 2022 at 7:14 AM johancc wr

Re: [Maya-Python] Duplicate spheres in half circle

2022-10-07 Thread Justin Israel
On Sat, Oct 8, 2022 at 7:14 AM johancc wrote: > Hey, trying to create a radial pattern with a sphere in Python, but > somehow I am missing the last sphere. > > [image: sphere.png] > > As you can see by the image and code below, I am trying to distribute 7 > spheres in 180 degrees. If I set it to

Re: [Maya-Python] Python Loop Speed Performance Question & C++ MPxCommand Question

2022-09-23 Thread Justin Israel
I just want to point out that it's not clear that the python GIL is going to be an issue here unless you are trying to multithread this operation (which your code doesn't show). The GIL prevents python code from running in parallel. It can run concurrently by context switching back and forth

Re: [Maya-Python] PySide2 undo/redo inside Maya

2022-09-23 Thread Justin Israel
On Sat, 24 Sept 2022, 3:29 am Pacifique Nzitonda, < nzitondapacifi...@gmail.com> wrote: > Thanks Marcus, > After reading your answer, I'll stick to what I have now: for every > method I open and close an undoInfo chunk. > > I'm writing a renamer tool: > [image: RENAMER.JPG] > > My hope was to

Re: [Maya-Python] Custom Python Menu loading from yaml

2022-08-28 Thread Justin Israel
On Sun, Aug 28, 2022 at 8:28 PM DGFA DAG's GRAPHIC & FOTO ART < gerome@gmail.com> wrote: > Hi, > > I got my custom menu in pyton as well in mel but I want to load the menu > structure from a yaml file e.g. like this > > - command: SetProject > icon: fileOpen.png > label: Set Project >

Re: [Maya-Python] Mel commands under Python or vice versa

2022-08-27 Thread Justin Israel
> > DGFA DAG's GRAPHIC & FOTO ART schrieb am Samstag, 27. August 2022 um >> 08:15:14 UTC+2: >> >>> When I do this I get an error "Error line 1.35 Syntax error" >>> When I run his line as standalone python("import mat"; mat.run()" >>> this is working but I need a command for the menuItem that runs

Re: [Maya-Python] dagMenuProc

2022-07-26 Thread Justin Israel
e someone with Maya 2023 can comment. > On Tue, Jul 26, 2022 at 3:10 AM Justin Israel > wrote: > >> >> >> On Mon, Jul 25, 2022 at 10:56 PM Sridhar M >> wrote: >> >>> Hello Guys, Please help me with the problem >>> // Error: line 1: Cannot

Re: [Maya-Python] dagMenuProc

2022-07-25 Thread Justin Israel
On Mon, Jul 25, 2022 at 10:56 PM Sridhar M wrote: > Hello Guys, Please help me with the problem > // Error: line 1: Cannot find procedure "dagMenuProc". > > // Error: file: C:/Program > Files/Autodesk/Maya2023/scripts/others/buildObjectMenuItemsNow.mel line > 140: Cannot find procedure

Re: [Maya-Python] maya MQUtil Issue

2022-06-25 Thread Justin Israel
On Sun, 26 Jun 2022, 4:30 pm TTw TTa, wrote: > I want wo modify Maya UI with PySide2 > > [image: uTools_1656217414133.png] > so I write those code > > > In line 58,I got child widget But it was QList object whitch was > wrapped

Re: [Maya-Python] Pyside2/Qt : Image as button with hover state

2022-06-25 Thread Justin Israel
at 7:19 AM Justin Israel wrote: > > > On Sat, 25 Jun 2022, 5:07 pm johancc, wrote: > >> I was able to darken the image within the paint event, but can't get it >> to work inside the enterEvent. > > > In your init for the custom button, you can generate the darkened

Re: [Maya-Python] Pyside2/Qt : Image as button with hover state

2022-06-25 Thread Justin Israel
On Sat, 25 Jun 2022, 5:07 pm johancc, wrote: > I was able to darken the image within the paint event, but can't get it to > work inside the enterEvent. In your init for the custom button, you can generate the darkened pixmap once and then use it over and over in the enterEvent to set the icon.

Re: [Maya-Python] Pyside2/Qt : Image as button with hover state

2022-06-24 Thread Justin Israel
On Sat, 25 Jun 2022, 4:51 pm johancc, wrote: > Hi, thanks for the reply. Honestly I didn't want to have another image on > the hover effect, I just wanted to darken it or light it somehow with code. > Just not sure how. > If the hover state doesn't need to be recalculated all the time, you

Re: [Maya-Python] Pyside2/Qt : Image as button with hover state

2022-06-24 Thread Justin Israel
On Sat, Jun 25, 2022 at 4:12 PM johancc wrote: > Q: How to add the hover state to this button I have (as an image)? I need > it to have the "hand icon" when hovering and also some sort of overlay like > a darkening/lighting effect. Is it possible with my current code? I am > using pyside/qt

Re: [Maya-Python] Help with Translate into Maya Tool

2022-06-02 Thread Justin Israel
Hi Daniel, Thanks for providing the example code. Maybe it would help to also explain what the outcome was in your current implementation, and what you expected? Justin On Thu, Jun 2, 2022 at 7:54 AM Daniel LeBreton wrote: > Hi everyone! I'm trying to make a general layout tool for maya

Re: [Maya-Python] QTreeView & Model help. Drag & Drop inside both view and model

2022-05-26 Thread Justin Israel
On Fri, May 27, 2022 at 8:36 AM Benjam901 wrote: > Ok, after you pointed me towards super I looked into it and stumbled > across all the right solutions to do this. > > Inside my treemodel I am adding an additional custom mime data type and > checking for that inside the view. If its custom I

Re: [Maya-Python] QTreeView & Model help. Drag & Drop inside both view and model

2022-05-26 Thread Justin Israel
On Fri, 27 May 2022, 3:54 am Benjam901, wrote: > > > When I reimplement the dragEnterEvent and dropEvent in the view itself, > the drag and drop functionality within the model no longer works... files > are not moved, nothing happens other than the print statements I have > inside the dropEvent

Re: [Maya-Python] casting MPlugArray into a list don't hold the MPlugs in memory?

2022-01-19 Thread Justin Israel
On Thu, 20 Jan 2022, 6:35 am Rudi Hammad, wrote: > hello, > > I though about sharing someting strange that occured to me. I had a method > that contained > MPlug.destinations() which as an art requieres an MPlugArray(). For some > reason, probably because I was in a hurry and I didn't thought

Re: [Maya-Python] Compiling plugins in Visual Studio for multiple maya versions and platforms

2022-01-01 Thread Justin Israel
On Sun, Jan 2, 2022 at 7:10 AM Rudi Hammad wrote: > So I followed Chad Vernom's cmake tutorials on youtube. First I wrote a > everything as he did, and when it came do the build from the command promp > I got an error related to maya path or something, so I thought > F###k that, I'll just copy

Re: [Maya-Python] Creating an .exe installer.

2021-12-24 Thread Justin Israel
On Sat, 25 Dec 2021, 2:48 pm Rudi Hammad, wrote: > Fantastic, thanks. I thought something must already exist. It seems that > is for windows only. What about mac or linux. Any cross platform installer? > Maybe search for a dmg installer for macos and do some snaps/deb/rpm approach for Linux?

Re: [Maya-Python] Creating an .exe installer.

2021-12-24 Thread Justin Israel
On Sat, 25 Dec 2021, 1:12 pm Rudi Hammad, wrote: > Hi, > > I was wondering how to do a .exe installer that display a window as we see > usually in > any software, meaning, you get a UI displaying a first window with a > greeting or whatever, > then you have a button with next that brings you to

Re: [Maya-Python] Cloud Native Studios discord invite

2021-12-09 Thread Justin Israel
days. Maybe I was being overly cautious. > On Wednesday, 8 December 2021 at 21:18:37 UTC Justin Israel wrote: > >> >> >> On Thu, Dec 9, 2021 at 10:16 AM Marty wrote: >> >>> Cheers, mate. Is there any Maya groups I can join? >>> >> >>

Re: [Maya-Python] Cloud Native Studios discord invite

2021-12-08 Thread Justin Israel
ri, Nov 5, 2021 at 12:03 PM Colas Fiszman >>>> wrote: >>>> >>>>> Hey Justin, >>>>> Could you post a new invitation for that discord that one is not >>>>> anymore valid? >>>>> Cheers, >>>>> Colas >&

Re: [Maya-Python] Cloud Native Studios discord invite

2021-12-07 Thread Justin Israel
>> Sure. Here is a new 7 day invite: https://discord.gg/q8Be7geF >> >> >>> >>> Le sam. 16 oct. 2021 à 22:38, Justin Israel a >>> écrit : >>> >>>> Hi Everyone, >>>> >>>> If you didn't manage to make it to S

Re: [Maya-Python] System running scripts from two different Maya and Houdini interpreters

2021-11-19 Thread Justin Israel
On Sat, 20 Nov 2021, 8:33 am Totally Zen, wrote: > Sorry for the delay, I've been very busy !!! > > I need to work externally with Maya and Houdini at the same time. > Then you will have to arrange to start a python interpreter with a compatible version of python to both Maya and houdini, and

Re: [Maya-Python] Pyside dynamically creating widgets and attaching signal isse

2021-11-14 Thread Justin Israel
On Mon, Nov 15, 2021 at 8:44 AM Rudi Hammad wrote: > Amazing, thanks for the explanation. > I've used wrappers before in other contexts but not partial. Didn't found > that issue until now. > Nothing much to add! that solved it. Thank you > Welcome! Also, I should point out that I have seen

Re: [Maya-Python] Pyside dynamically creating widgets and attaching signal isse

2021-11-14 Thread Justin Israel
On Mon, Nov 15, 2021 at 7:15 AM Rudi Hammad wrote: > Hello, > > I wrote this simple ui to ilustrate the issue. As the title says I am > creating dynamically > some widgets and attaching a signal. In this case 4 buttons that when > clicked, print their name. > The problem if you run the code is

Re: [Maya-Python] System running scripts from two different Maya and Houdini interpreters

2021-11-10 Thread Justin Israel
On Thu, 11 Nov 2021, 8:53 am Kenneth Ibrahim, wrote: > Justin, > > You're now a Unity employee? ;-) > > Big news!! > This very second, not yet. But effectively yes, within the next month or so ;-) > On Wed, Nov 10, 2021 at 11:50 AM Justin Israel > wrote: > >>

Re: [Maya-Python] System running scripts from two different Maya and Houdini interpreters

2021-11-10 Thread Justin Israel
On Thu, Nov 11, 2021 at 7:25 AM Totally Zen wrote: > Okay, but I'm still aimless, lol > what I have and I don't know if something answers what it says would be > the poath configured for Maya and the other for Houdini. > I'm not sure how to provide more help without better understanding your

Re: [Maya-Python] System running scripts from two different Maya and Houdini interpreters

2021-11-10 Thread Justin Israel
I've never tried it, but given the right settings I am guessing it should be possible. The key would be to have a compatible python major/minor version for both the Maya and Houdini versions in the same env. Usually you would bootstrap a Maya process with mayapy, or a houdini process with hython.

Re: [Maya-Python] accessing maya's interpreter globals from another scripts

2021-11-10 Thread Justin Israel
On Thu, 11 Nov 2021, 12:55 am Rudi Hammad, wrote: > in other words, get the result in foo.py that you get when you run > globals() in maya's script editor. > You can reference what I am going in the MayaSublime project. I import __main__ and access __main__.__dict__ for the globals as you would

Re: [Maya-Python] Cloud Native Studios discord invite

2021-11-04 Thread Justin Israel
On Fri, Nov 5, 2021 at 12:03 PM Colas Fiszman wrote: > Hey Justin, > Could you post a new invitation for that discord that one is not > anymore valid? > Cheers, > Colas > Sure. Here is a new 7 day invite: https://discord.gg/q8Be7geF > > Le sam. 16 oct. 2021 à 22:38,

[Maya-Python] Cloud Native Studios discord invite

2021-10-16 Thread Justin Israel
Hi Everyone, If you didn't manage to make it to Siggraph this year, or you did but didn't make it to the Birds of a Feather cloud/pipeline chats, you might have missed that a new discord server was created. Cloud Native Studios Focuses on topics related to studio pipelines and moving towards

Re: [Maya-Python] Subprocess & PyInstaller

2021-09-29 Thread Justin Israel
On Thu, Sep 30, 2021 at 9:13 AM Benjam901 wrote: > - I am unsure of the major differences but yes I need it compiled to a > .app instead of a .exe > - The crash itself I suspect to be a segfault, previously for unknown > reasons my IDE was crashing with a SIGABRT error. I've seen this kind of

Re: [Maya-Python] Subprocess & PyInstaller

2021-09-29 Thread Justin Israel
On Thu, Sep 30, 2021 at 4:34 AM Benjam901 wrote: > Hello all, > > It is time to finally get a project out as open source but I am having a > serious roadblock issue with subprocess. > > - In the code I create a new QThread for the subprocess function to run on. > - Once the QThread is running I

Re: [Maya-Python] V Crypt System

2021-09-14 Thread Justin Israel
On Wed, Sep 15, 2021 at 11:36 AM Rudi Hammad wrote: > So I cam up with a evil idea that seems to work. > . I create a script node that travels with the scene that will check your > mac address out from a list of valid addresses (that would be the ones > corresponding to the people working

Re: [Maya-Python] V Crypt System

2021-09-13 Thread Justin Israel
On Tue, Sep 14, 2021 at 7:52 AM Rudi Hammad wrote: > About V crypt, I got in thouch with them and they sent me the system to > test it in demo mode. It work pretty well, but as Justin anticipated and as > the video showed, all clients are requiered to have the app. > So maya is should be

Re: [Maya-Python] V Crypt System

2021-09-13 Thread Justin Israel
Please make sure to start a new thread if you want to engage in new topics. It seems two completely new questions have been asked since the original thread was started about V Crypt, and are entirely unrelated. Thanks! On Tue, 14 Sep 2021, 4:25 am Rudi Hammad, wrote: > That's it! thanks Juan >

Re: [Maya-Python] V Crypt System

2021-09-04 Thread Justin Israel
On Sun, Sep 5, 2021 at 8:38 AM Marcus Ottosson wrote: > That is true, that does sound like a good idea. Assuming the software > actually does what it says on the tin, it would at least protect against > theft and accidental sharing. > > It wouldn’t protect against sending files though, because

Re: [Maya-Python] Texture path

2021-07-26 Thread Justin Israel
On Mon, Jul 26, 2021 at 4:19 AM DGFA DAG's GRAPHIC & FOTO ART < gerome@gmail.com> wrote: > Hi, > when I want to change the texture path I struggle on one point. > Let say the path is now > project/create/Maya/sourceimages/room/texture.exr > There could be a deeper sub folder structure like >

Re: [Maya-Python] Open Scene and get references

2021-07-20 Thread Justin Israel
This would tell you the reference nodes: refnodes = pmc.selLoadSettings(ids, referenceNode=True, q=True) On Wed, Jul 21, 2021 at 12:17 PM Totally Zen wrote: > hey, a million excuses, I was wrong, I didn't pay attention that I was > with the scene open while I was testing, so I still haven't

Re: [Maya-Python] Open Scene and get references

2021-07-20 Thread Justin Israel
I see what you mean now. Yes the API docs say that it is meant to return a unicode string for the fileName parameter. I haven't played with this API before so I can only guess as to what is going on and had a quick play to try and get your expected results. When you do buildLoadSettings=True, and

Re: [Maya-Python] Open Scene and get references

2021-07-20 Thread Justin Israel
On Tue, 20 Jul 2021, 1:32 pm Totally Zen, wrote: > this command: > pmc.system.openFile(sceneNameToOpen, force=True, loadReferenceDepth = > 'none', buildLoadSettings=True) > result: > # C:/my_scene/animal_RIG_A001.v002.mb > # C:/my_scene/animal_RIG_A001.v002.mb > #

Re: [Maya-Python] Open Scene and get references

2021-07-19 Thread Justin Israel
Did you give it a try with mayapy.exe? https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/Maya/files/GUID-83799297-C629-48A8-BCE4-061D3F275215-htm.html On Tue, 20 Jul 2021, 11:36 am Totally Zen, wrote: > I need to open a scene without loading in maya

Re: [Maya-Python] Query Layout Panels?

2021-07-11 Thread Justin Israel
On Sat, Jul 10, 2021 at 1:07 AM João Victor wrote: > Hi everyone, > > Maybe somebody know how I could query the active layout panels? > If its a "single" or "four" or "vertical2" and so on.. > You can query the global main pane layout, and then query its configuration: import maya.cmds as

Re: [Maya-Python] printing with python3+

2021-07-11 Thread Justin Israel
On Sat, Jul 10, 2021 at 12:54 AM vince touache wrote: > brilliant, I didn't know that. However, for some reason, it still doesn't > show up in the main gui one-liner widget. > Any other suggestions? > I don't really know why that behaviour is different. But could you just not rely on the python

Re: [Maya-Python] printing with python3+

2021-07-08 Thread Justin Israel
On Fri, 9 Jul 2021, 5:05 am vince touache, wrote: > hi all, > > With previous versions of maya, I was using a lot > print 'foo', > with the coma in the end, which was forcing my print to show up in the > 1-line listener embedded to the maya main window (just like a > mel.eval('print "foo";')

Re: [Maya-Python] Colapse ChannelBox in Python or Mel?

2021-07-04 Thread Justin Israel
On Sun, Jul 4, 2021 at 11:12 AM João Victor wrote: > Hey guys, would somebody know how I could toggle colapse Channel Box (not > close)? > I could use mel or python. > > thanks a lot! > Is this what you are after? 1. Open script editor and enable "History"-> "Echo All Commands" 2. Hit the

Re: [Maya-Python] Copy key and paste keys from imported rig to referenced rig

2021-06-28 Thread Justin Israel
On Mon, Jun 28, 2021 at 11:51 PM Utkarsh Agnihotri wrote: > Hi everyone, > I am trying to copy keys from imported rig and paste it to the reference > rig. I have written following code: > > ``` import pymel.core as pm > > # select the ctrls to copy keys > sel = pm.ls("*CTRL") > > print(sel) > >

Re: [Maya-Python] Need to open Pycharm/Notepad++ from Maya python shelf (Windows)

2021-06-23 Thread Justin Israel
On Wed, Jun 23, 2021 at 10:02 PM Alien Ghost Ship Animation < animat...@alienghostship.com> wrote: > Hi all, we are porting all scripts since Python3 is now integrated, and > need to open PyCharm/Notepad++ from within Maya to replace script editor. > > *MEL *system()* executes fine and doesn't

Re: [Maya-Python] Multiple optionMenu lists working with one directory problem

2021-06-22 Thread Justin Israel
On Wed, Jun 23, 2021 at 10:43 AM Anastasia Korol wrote: > Hi guys! I am doing simple UI for choosing textures for two nodes in the > shader and I can't make the optionMenu command to work one by one with the > same source for the both optionMenu1 and optionMenu2. I have one directory > to choose

[Maya-Python] News: Additional Manager for Group

2021-06-01 Thread Justin Israel
Hi Everyone! I wanted to let you all know that there is now an additional Manager for this group. Marcus Ottosson has been a very active and valuable contributor to the group since Aug 2010. I'm happy to report that Marcus has accepted my request to share the responsibility of approving new

Re: [Maya-Python] Desperately trying to run matplotlib

2021-05-24 Thread Justin Israel
On Tue, 25 May 2021, 5:41 am justin hidair, wrote: > here's the best I managed > https://gist.github.com/yetigit/c2f55bdb8b1798b2936687567f9c6c1e Looks like maybe the wrong Visual Studio C++ compiler for Maya 2020? In addition to C++being difficult to build, combining that with Maya on

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Justin Israel
hi > wrote: > >> Thanks Justin! pybind definitely seems interesting. >> >> And yes, Cython is definitely great. I have used it in production >> previously for some generic algorithms implementations where performance >> was needed in python centric api interface. And

Re: [Maya-Python] maya API ?? reading an external json file

2021-05-18 Thread Justin Israel
On Wed, May 19, 2021 at 6:10 AM Alok Gandhi wrote: > As a side note, for generic use (outside of maya) you can use boost python > to call python from C++ and vice versa: > > https://www.boost.org/doc/libs/1_63_0/libs/python/doc/html/tutorial/index.html > Boost is a super heavy dependency. These

Re: [Maya-Python] numpy errors fixed when reintializing maya

2021-05-02 Thread Justin Israel
On Mon, May 3, 2021 at 9:59 AM Rudi Hammad wrote: > no, I don't used reload(). To avoid using reload everywhere I use this. > https://pastebin.com/sxhYQNTn Hmm, but you are still trying to dynamically change the imported module objects to force a re-import. Might not be related at all, but

Re: [Maya-Python] numpy errors fixed when reintializing maya

2021-05-02 Thread Justin Israel
Shot in the dark are you using python's reload() functionality anywhere? Does it seem to break after some type of workflow operation? On Mon, May 3, 2021 at 9:38 AM Rudi Hammad wrote: > I got the log error. Here it is: > > #

Re: [Maya-Python] docstring on obvious functions

2021-05-02 Thread Justin Israel
Alok makes a good point that "it depends". You can poll for opinions but ultimately you have to make a decision about the project and just be consistent. I tend to lean towards the side of docstrings making it easier for the reader to quickly pick up what they need to know about the

Re: [Maya-Python] docstring on obvious functions

2021-05-02 Thread Justin Israel
My take is that I want to see docstrings on public functions (which as you pointed out are different from comments). One added benefit of writing a docstring is that doc generators like sphinx, and IDEs, can produce helpful type linking and hinting. So if your function takes a certain type and

Re: [Maya-Python] C++ speed/efficiency in Maya

2021-04-06 Thread Justin Israel
really do is test actual cases. Specific function calls may have their own micro benchmark timings. I came across this earlier today: https://www.diva-portal.org/smash/get/diva2:1334763/FULLTEXT02 > On Tue, 6 Apr 2021 at 02:52, Justin Israel wrote: > >> >> >> On Tue, Apr

  1   2   3   4   5   6   7   8   9   10   >