[Maya-Python] Using MArrayDataBuilder in python API 2.0

2021-07-02 Thread f.mi...@gmail.com
I need a simple DG node that uses connected mesh and copies vertex 
coordinates to output MPoint array.
I am having trouble with setting this array with MArrayDataBuilder. It 
ether always stays zero-length or grows on every compute().
This surely must be simple to do, but I'm stuck. Can anybody help ?
One important detail - I need this array to be made of compound points so 
that I can query individual coordinates as attributes.

code:
https://pastebin.ubuntu.com/p/ZyY52k2dTN/

-- 
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/12fa9b5a-8dc0-4759-a16a-e9f597824436n%40googlegroups.com.


Re: [Maya-Python] Using MArrayDataBuilder in python API 2.0

2021-07-03 Thread f.mi...@gmail.com
My initial goal was to be able to read specific vertex coordinates, for 
example in expressions. So If I want to connect to, say 
outPoints[3].outPointsX - then I think compound attributes are my only 
choice.

On Friday, July 2, 2021 at 11:30:24 AM UTC+2 Marcus Ottosson wrote:

> Compound attributes always makes life hard. Does it behave any different 
> with plain float attributes? I.e. can the problem be isolated to the 
> compound attributes?
>
> On Fri, 2 Jul 2021 at 10:01, [email protected]  wrote:
>
>> I need a simple DG node that uses connected mesh and copies vertex 
>> coordinates to output MPoint array.
>> I am having trouble with setting this array with MArrayDataBuilder. It 
>> ether always stays zero-length or grows on every compute().
>> This surely must be simple to do, but I'm stuck. Can anybody help ?
>> One important detail - I need this array to be made of compound points so 
>> that I can query individual coordinates as attributes.
>>
>> code:
>> https://pastebin.ubuntu.com/p/ZyY52k2dTN/
>>
>> -- 
>> 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/12fa9b5a-8dc0-4759-a16a-e9f597824436n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/python_inside_maya/12fa9b5a-8dc0-4759-a16a-e9f597824436n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/ad0c52b2-eb31-49ee-88c3-547e5f0cec21n%40googlegroups.com.


Re: [Maya-Python] Using MArrayDataBuilder in python API 2.0

2021-07-05 Thread f.mi...@gmail.com
Now I get it, Marcus. Good idea!
So I did test with floats and got some results. The exact same code with 
kFloat also fails, but I found something that works with kFloats (but not 
with Points).

Shortened version that works with kFloat:

outPointsH = dataBlock.outputArrayValue(self.outPoints)
outPointB = outPointsH.builder()
outPointB.growArray(len(inPoints))
for i, in_pt in enumerate(inPoints):
print(i, in_pt.x)
outPointB.addElement(i).setFloat(float(in_pt.x))
outPointsH.set(outPointB)
outPointsH.setAllClean()

Full code with 4 approaches, only one works: 
https://pastebin.ubuntu.com/p/CZr7ytX9C6/
My use case is very specific (and I will probably settle for something 
simpler), so I can live with floats instead of points.
Nevertheless I'd love to know how to dynamically set points array in API - 
this things always make me trouble.

thanks !
-michal

On Saturday, July 3, 2021 at 1:22:35 PM UTC+2 Marcus Ottosson wrote:

> Sure, yes the end result can be compound attributes, but what I'm 
> wondering is whether compound attributes are the root cause of the problem, 
> or if it's elsewhere. As a test, if you were to replace the compound 
> attribute with a float, does it still cause trouble? If so, then we know to 
> look more closely into the compound attributes. If not, then we could 
> strike that off. Either way, being one step closer to success.
>
> On Sat, 3 Jul 2021 at 11:56, [email protected]  wrote:
>
>> My initial goal was to be able to read specific vertex coordinates, for 
>> example in expressions. So If I want to connect to, say 
>> outPoints[3].outPointsX - then I think compound attributes are my only 
>> choice.
>>
>> On Friday, July 2, 2021 at 11:30:24 AM UTC+2 Marcus Ottosson wrote:
>>
>>> Compound attributes always makes life hard. Does it behave any different 
>>> with plain float attributes? I.e. can the problem be isolated to the 
>>> compound attributes?
>>>
>>> On Fri, 2 Jul 2021 at 10:01, [email protected]  
>>> wrote:
>>>
>>>> I need a simple DG node that uses connected mesh and copies vertex 
>>>> coordinates to output MPoint array.
>>>> I am having trouble with setting this array with MArrayDataBuilder. It 
>>>> ether always stays zero-length or grows on every compute().
>>>> This surely must be simple to do, but I'm stuck. Can anybody help ?
>>>> One important detail - I need this array to be made of compound points 
>>>> so that I can query individual coordinates as attributes.
>>>>
>>>> code:
>>>> https://pastebin.ubuntu.com/p/ZyY52k2dTN/
>>>>
>>>> -- 
>>>> 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/12fa9b5a-8dc0-4759-a16a-e9f597824436n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/python_inside_maya/12fa9b5a-8dc0-4759-a16a-e9f597824436n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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/ad0c52b2-eb31-49ee-88c3-547e5f0cec21n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/python_inside_maya/ad0c52b2-eb31-49ee-88c3-547e5f0cec21n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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/a536fb29-8ceb-4a78-8687-25b21eb5e3den%40googlegroups.com.


[Maya-Python] Check if timeline is playing Trax sounds

2021-11-29 Thread f.mi...@gmail.com
 How do I query if timeline is using Trax to play sound ?

There seems to  only be options to query for individual sound nodes:
https://help.autodesk.com/view/MAYAUL/2022/ENU/?guid=__CommandsPython_index_html

See attachment for screenshot


-- 
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/3ab12c30-1edc-48a8-b180-d57cde10d13an%40googlegroups.com.


[Maya-Python] Re: automating a render

2025-11-26 Thread f.mi...@gmail.com
are you rendering with standalone arnold kick.exe? If yes, here's part of 
code ripped from my setup to export .ass files:



import maya.app.renderSetup.model.renderSetup as renderSetup

def RenderCacheExport(renderLayers, frameList):
tryAttr("defaultRenderGlobals.animation", 1) #tryAttr is a wrapper 
around setAttr
tryAttr("defaultRenderGlobals.extensionPadding", 4)
tryAttr("defaultArnoldDriver.halfPrecision", 1)
tryAttr("defaultArnoldDriver.tiled", 1)
tryAttr("defaultArnoldRenderOptions.bucketScanning", 0)
tryAttr("defaultArnoldRenderOptions.enableProgressiveRender", 0)


for f in frameList:
mc.currentTime(f, e=1)
for rl in renderLayers:
render_setup = renderSetup.instance()
renderLayerList = render_setup.getRenderLayers()
renderLayerList = [l for l in renderLayerList if l.name() == rl]
render_setup.switchToLayer(renderLayerList[0])

mc.setAttr('defaultRenderGlobals.imageFilePrefix', f
'c:/temp/out_{rl}_{f}.exr', type='string')
mc.arnoldExportAss(cam='|persp', f=f'c:/temp/out_{rl}_{f}.ass')




On Monday, November 10, 2025 at 3:11:39 PM UTC+1 [email protected] wrote:

> I need to setup a script..and having a hell of time finding resources 
> online to show the commands or even a solid "stable" approach to this
>
> so I have a script setup to alter a few things in my scene, set a new 
> frame and what I need is pointers on then having it render the image to 
> disk using Arnold to a set path
>
> that last bit is where I am having issues finding anything on the commands 
> or proper way to do it

-- 
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 visit 
https://groups.google.com/d/msgid/python_inside_maya/6687d030-9de8-4566-8b5e-1b177b49442dn%40googlegroups.com.


[Maya-Python] Re: I can't build plugin for maya 2026

2025-11-26 Thread f.mi...@gmail.com
Some DLLs can't be found and loaded. You could try Dependency Walker 
 and try to find what DLL is 
missing. Start it from maya session (for example with MEL: system 
"c:/.../depends.exe") and load your MLL plugin file. From there you may be 
able to find what is missing.

On Wednesday, November 26, 2025 at 3:38:20 PM UTC+1 Abdelhalim abulmagd 
wrote:

> thanks nicolas.
>
> I actually tried building with:
>
> *Qt 6.8.2 — msvc2022_64*
>
> But I’m still getting the same issue —
> the plugin won’t load inside Maya.
> On Wednesday, November 26, 2025 at 4:26:14 PM UTC+2 Nicolas Chaverou wrote:
>
>> Hey,
>> I'd suspect this is due to QT update (because of VFX ref platform)
>> https://help.autodesk.com/view/MAYADEV/2026/CHS/?guid=Qt6Migration
>> Hope that helps
>>
>>
>> On Wednesday, November 26, 2025 at 2:30:01 PM UTC+1 Abdelhalim abulmagd 
>> wrote:
>>
>>> I downloaded the Maya 2026 DevKit from Autodesk’s website, and when I 
>>> try to build my plugin, I keep getting this error.
>>> *// The specified module could not be found.*
>>> *// Error: file: C:/Program 
>>> Files/Autodesk/Maya2026/scripts/others/pluginWin.mel line 316: The 
>>> specified module could not be found.*
>>> *// (testPlugin)*
>>>
>>> I also tested the DevKits for Update 1, Update 2, and Update 3 — but I 
>>> still get the same error every time.
>>>
>>> My plugin is using:
>>>
>>> *Qt 5.15.2 — msvc2019_64*
>>>
>>> Could this be the reason for the problem?
>>> Or is the issue coming from Maya itself?
>>>
>>

-- 
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 visit 
https://groups.google.com/d/msgid/python_inside_maya/ea6d82ad-d7b9-4f56-9864-9ee1a2f0df05n%40googlegroups.com.