maya

virtualenv and Maya

て烟熏妆下的殇ゞ 提交于 2019-12-06 08:05:48
I'm trying to set up virtualenv to point at Maya 2013's executable so I can run unit tests inside it from the shell. Maya uses a custom python 2.6 executable located at /usr/autodesk/maya/bin/mayapy . I get these errors: $ virtualenv -p /usr/autodesk/maya/bin/mayapy mayapy Running virtualenv with interpreter /usr/autodesk/maya/bin/mayapy PYTHONHOME is set. You *must* activate the virtualenv before using it Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 2577, in <module> main() File "/usr/local/lib/python2.6/dist-packages/virtualenv.py",

Maya python connect attributes of selection

最后都变了- 提交于 2019-12-06 05:44:41
I've been trying to make a simple script that will take 2 viewport selections and then basically connect the rotation of the second to the first, I'm not sure how to create the variables for the objects from the viewport selection correctly. Here is my attempt that is not working import maya.cmds as cmds sel = cmds.ls( selection=True, sl=True ) print sel[0] print sel[0].rotate print sel[1] cmds.connectAttr( 'sel[0].rotate', 'sel[1].rotate' ) Any ideas how to make this work? it's just a syntax issue: you're quoting the entire names. You want cmds.connectAttr( sel[0] + '.rotate', sel[1] + '

Maya to three.js with animation

一个人想着一个人 提交于 2019-12-05 21:55:16
I have a rigged (skeleton and soft bind) model in Maya. The model is all one seamless low poly with a single jpeg texture mapped. There is simple animation of the skeleton. (joint rotation). I need to get it to work with ThreeJs (webGL). Do I try to export an OBJ with Morph Targets some how? I can do OBJ but how do I get the morph targets? Can the developer that I am working with read Maya's baked animation file (.MC or .XML) in webGL. Do I export a Collada DAE? Any help that can steer us in the right direction would be greatly appreciated. Thanks THREE.js comes with an exporter for Maya, but

What exactly the cmds.scriptCtx in Maya Python does?

冷暖自知 提交于 2019-12-05 21:12:07
I'm wondering what exactly the cmds.scriptCtx command does, cuz I've tried to copy and paste it directly from the Autodesk help page to my script editor and nothing happened. Here's the script from Autodesk help: import maya.cmds as cmds cmds.scriptCtx( title='Attach Curve', totalSelectionSets=1, fcs="select -r $Selection1; performAttachCrv 0 \"\"", cumulativeLists=True, expandSelectionList=True, setNoSelectionPrompt='Select two curves close to the attachment points', setSelectionPrompt='Select a second curve close to the attachment point', setDoneSelectionPrompt='Never used because

建模学习—带你轻松认识并掌握MAYA

◇◆丶佛笑我妖孽 提交于 2019-12-05 17:38:38
Autodesk Maya算是三维动画软件中运用最广,效果最好的了。 作为一个学习过影视特效制作的学渣,刚进入maya 看到满屏的英文,内心是崩溃的。 只看的懂copy和paste的up主只懂什么是Follicles、Dynamic Constraints(动力学约束)嘛!!然后就看到老师做出的动画视频瞬间被其俘虏,感觉真是高大上啊,学好这个我就是大神啊,各种骚包炫耀不是梦啊!但是! 学好maya,还需要你会一些别的技能,虽然当时up主认为零基础也是完全可以的,但是越往后学就觉得这些“别的技能”是多么重要,能够助你一臂之力,事半功倍! 一、Maya的诞生:   三维动画软件大部分应用于SGI工作站上,一些好的功能也只能在工作站上完成。世界最大的软件开发公司Alias与Wavefront 合并并收购了TDI公司,这样世界上的最大的三家软件开发公司集合在一起,推出了一个新型的SGI版的三维动画制作软件,其功能、界面、效果都是一流 的,Alias与Wavefront赋予它一个神秘而响亮的名字——Maya。随着PC机的广泛推广,Alias与Wavefront于1998年6月对 PC用户推出了Maya NT版。 二、Maya与其他软件的区别: Maya与其它的三维软件有明显的区别,首先,Maya继承了Alias所有的工作站级优秀软件的特性,灵活、快捷、准确、专业、可扩 展、可调性。

Segmentation Fault Catch

泄露秘密 提交于 2019-12-05 13:53:27
I have a python script and it will loop through bunch of maya files and do some stuff. But some time maya get seg fault and my script will stop there. I tried with signal and multiprocess. But both failed import os, optparse, glob, json, signal import maya.standalone import maya.cmds as cmds from multiprocessing import Process, Queue def loadMayaBd(): maya.standalone.initialize(name='python') def sig_handler(signum, frame): print "segfault" def doSome(args, options): signal.signal(signal.SIGSEGV, sig_handler) loadMayaBd() #from here its just a example fileNameList = args[0] for eachFile in

GLSL 4.1 with gl_ModelViewProjectionMatrix

我怕爱的太早我们不能终老 提交于 2019-12-05 10:42:40
I am working on a glsl shader program as part of a plugin that runs inside a "closed source" application. The application (maya) is written using opengl 2.1, but our graphics cards support opengl/glsl 4.1 and I want to use tessellation and geometry shaders in my program. The application sets up the opengl viewport and the traditional model/view matrix stack and I do not have control over that part of the code. My pass-through vertex shader uses GLSL 1.2 and works fine: // GLSL VERTEX SHADER #version 120 void main () { gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; } My pass-through

Way to iterate two items at a time in a list?

。_饼干妹妹 提交于 2019-12-05 06:45:09
I am wondering if there is a better way to iterate two items at a time in a list. I work with Maya a lot, and one of its commands (listConnections) returns a list of alternating values. The list will look like [connectionDestination, connectionSource, connectionDestination, connectionSource]. To do anything with this list, I would ideally like to do something similar to: for destination, source in cmds.listConnections(): print source, destination You could, of course just iterate every other item in the list using [::2] and enumerate and source would be the index+1, but then you have to add in

How to change one texture image of a 3d model(maya ) in three.js at runtime

£可爱£侵袭症+ 提交于 2019-12-04 21:06:46
This site is loading a maya model using three.js. This model has Below texture pictures Here is the JS var SCREEN_WIDTH = window.innerWidth; var SCREEN_HEIGHT = window.innerHeight; var container; var camera, scene; var canvasRenderer, webglRenderer; var mesh, zmesh, geometry, materials; var windowHalfX = window.innerWidth / 2; var windowHalfY = window.innerHeight / 2; var meshes = []; function init() { container = document.createElement('div'); document.body.appendChild(container); camera = new THREE.PerspectiveCamera(75, SCREEN_WIDTH / SCREEN_HEIGHT, 1, 100000); camera.position.x = 400;

How to Import models from 3D software, like Maya into OpenGL? [closed]

微笑、不失礼 提交于 2019-12-04 09:49:55
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . How can I import 3D models from 3D modelling software like MAYA into OpenGL especially for PC rather than for Iphone development ? 回答1: Maybe this surprises you, but OpenGL has no such thing qualifying as "models