updatepopla.blogg.se

Maya python setattr with wildcard
Maya python setattr with wildcard









  1. #Maya python setattr with wildcard full
  2. #Maya python setattr with wildcard code

The active primitive is searched for the module.

  • string fxModuleType( string palette, string description, string name )().
  • Modules are returned for the currently active primitive, and in the order of execution.
  • Get a list of fx modules for the given palette and description.
  • string fxModules( string palette, string description)().
  • #Maya python setattr with wildcard full

  • Return the full list of attributes for the given node.
  • string allAttrs( string palette, string description="", string object="" )().
  • Return the list of custom attributes for the given node.
  • string customAttrs( string palette, string description="", string object="" )().
  • If an array is specified with the extension, then all attributes of the array will be deleted. The attribute should be named using the template pattern: custom_ or custom_.
  • void remCustomAttr( string attrName, string palette, string description="", string object="" )().
  • Common usage would be to add attributes to either the palette or a RenderMan renderer, but any object can be specified. If an array is specified with the extension, then an attribute will be added for each element of the array.
  • void addCustomAttr( string attrName, string palette, string description="", string object ="")().
  • Return the list of attributes for the given node.
  • string attrs( string palette, string description="", string object="" )().
  • Set the value of an attribute on an xgen object.
  • bool setAttr( string attrName, string value, string palette, string description="", string object ="")().
  • Get the value of an attribute on an xgen object.
  • string getAttr( string attrName,string palette, string description="", string object="" )().
  • Query the existence of an attribute on an xgen object.
  • bool attrExists( string attrName, string palette, string description="", string object="" )().
  • This should be done anytime a guide is moved to a new location, a guide is added, or a guide is removed.
  • Initialize the interpolation for the active primitive of the given description.
  • bool initInterpolation( string palette, string description, string fileName="" )().
  • Get a list of all objects (for example, SpherePrimitive, GuideRenderer) for a description.
  • string objects( string palette, string description, bool activeOnly=False )().
  • The subtype given should be fully named (for example, CardPrimitive, FileRenderer).
  • Set the active subtype of the given type for the description.
  • bool setActive( string palette, string description, string subtype, bool previewer=False )().
  • The return value is the subtype (for example, SplinePrimitive, CardPrimitive).
  • Get the active subtype of the given type from the description.
  • string getActive( string palette, string description, string type )().
  • To do this, the list of descriptions for each palette is searched, which assumes that all of the descriptions are uniquely named.
  • Get the palette for the given description.
  • Get a list of descriptions for the given palette or, if no palette name is given, return all descriptions in the scene.
  • string descriptions( string palette="" )().
  • Get a list of palettes currently in the scene.
  • #Maya python setattr with wildcard code

    Once that is in place, you can use its xgg.Maya variable to determine that you are in Maya and protect your Maya code within these conditionals. This brings in the XGen global module, which has the ability to detect Maya. # Do something maya specific like using XGen's Maya API A safe way to handle this is to use XGen's Maya detection: If your script is going to run inside and outside of Maya and you are calling methods from the Maya only portion of the API, you should put those within a conditional block. This brings in the xgen module which detects Maya and optionally brings in the Maya layer of the API. The best approach is to let XGen handle the decision for you by using the following command: import xgenm as xg It is important to bring in the correct API for the task, or you may obtain unexpected results. There is a separate UI component, but the API is essentially made up of the underlying C++ code, a Python layer that constitutes the Base API, and then another Python layer that brings in necessary Maya additions as well as extra API functions that constitutes the Maya API. The API is divided into two parts: Base and Maya.











    Maya python setattr with wildcard