Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Save your own objects in the ShelfTab ?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Anonymous
560 Views, 6 Replies

Save your own objects in the ShelfTab ?

Hello, community,

I modeled in Maya19 single elements which can be put together, you surely know editors of video games

e.g.: Skyrim construction editor. The dungeons are cropped in single elements "meshes"
so that they can be put together to form a room / corridor. Now I have such single elements / corridors in different shapes like X, L and T as well as simple straight corridors. Now to put these corridors together vertex by vertex, I have to set the pivot to the corresponding vertex (Key; D+V) to connect it to the next vertex of the next corridor

(Key; V).
Now this is quite cumbersome... since I always have to have a separate corridor in the scene to copy and paste.
So now my question:
Is it possible... no it is possible...
How do I get these corridors into the shelf tab / menu?
They are defined somewhere in the script?
Exactly the same as when I create a cube in the MEL that comes:
polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1;

 

Where are these coordinates for my self-made objects which I have named?

If I had them,

I could put them all in the Shelf Tab and select them by clicking !

 

Greetings

6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

Hi! Construct geometry using point positions in 3d space is not simple task. You can save your models and the use import command like this:

 

import pymel.core as pm

pm.importFile('/path/to/your/file.ma')

 and add this command to your shelf. 

Message 3 of 7
Anonymous
in reply to: Anonymous

Jo Genial ... something like that could work.

 

THANK YOU

 

I'll try it.

 

 

Danke

Message 4 of 7
Anonymous
in reply to: Anonymous

Well... it would have been nice... unfortunately, I can't do it with me.

 

import pymel.core as pm

pm.importFile('/path/to/your/file.ma')

 

with or without () ??
?? --> that comes with it too?

Does neither MEL nor Python...

What am I doing wrong?

Message 5 of 7
Anonymous
in reply to: Anonymous

It's pymel with python syntax. So it would by with () 

Tags (1)
Message 6 of 7
Anonymous
in reply to: Anonymous

pm.importFile(E:\SAVES Work\fly2\Gygoracdesea Desktop\biblo\lampe New2.ma)
# Error: invalid syntax #

import pymel.core as pm

pm.importFile('E:\SAVES Work\fly2\Gygoracdesea Desktop\biblo\lampe New2.ma')

# pymel.core : Updating pymel with pre-loaded plugins: svgFileTranslator, mayaHIK, invertShape, GamePipeline, curveWarp, tiffFloatReader, MASH, poseInterpolator, bifrostvisplugin, ATFPlugin, hairPhysicalShader, cacheEvaluator, ikSpringSolver, ik2Bsolver, xgenToolkit, AbcExport, retargeterNodes, gameFbxExporter, VectorRender, OpenEXRLoader, lookdevKit, Unfold3D, Type, mayaCharacterization, Boss, mtoa, meshReorder, modelingToolkit, MayaMuscle, rotateHelper, matrixNodes, bifmeshio, AbcImport, autoLoader, deformerEvaluator, sceneAssembly, gpuCache, Substance, OneClick, shaderFXPlugin, objExport, bifrostshellnode, renderSetup, GPUBuiltInDeformer, ArubaTessellator, stereoCamera, quatNodes, fbxmaya #
# Error: RuntimeError: file C:\Program Files\Autodesk\Maya2019\Python\lib\site-packages\pymel\internal\pmcmds.py line 134: File not found. #

 

It does not work!

Message 7 of 7
Anonymous
in reply to: Anonymous

Sorry but you  need to learn basic syntax of Python. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report