![maya python setattr of multiple objects maya python setattr of multiple objects](https://s3.manualzz.com/store/data/029687242_1-37b5aafc1270f143a0fc5b8f30bb6e96-360x466.png)
#self.m_height = 100#then we could just calcualte width and height from base w/h and multiple by scale #self.m_width = 100#we could instead use scale and just let them scale instead of drag vertex #self.m_scale = (1, 1, 0) #we shouldn't really work with scale
#Maya python setattr of multiple objects update#
#these will need to be actual data, and update as you move the object in the world Light_edf + ".exitance", attributes, attributes, attributes, type="double3"Ĭmds.connectAttr(light_edf + ".outColor", light_material + ".EDF_front_color", f=True)Ĭmds.connectAttr(light_surface_shader + ".outColor", light_material + ".surface_shader_front_color", f=True) Light_edf = ms_commands.create_shading_node("diffuse_edf", area_light + "_edf") Light_surface_shader = ms_commands.create_shading_node("constant_surface_shader", area_light + "_surface_shader")Ĭmds.setAttr(light_surface_shader + ".alpha_multiplier", 0, 0, 0, type="double3") Light_material = cmds.createNode("ms_appleseed_material", n=area_light + "_material")Ĭmds.setAttr(light_material + ".enable_back_material", 0)Ĭmds.setAttr(light_material + ".duplicate_front_attributes_on_back", 0) # create and initialise material for object Now it should work every time.Īnd the dragon mesh.Def convert_area_light(area_light, attributes):
![maya python setattr of multiple objects maya python setattr of multiple objects](https://www.iamag.co/wp-content/uploads/2015/08/Python-Scripting-in-Maya-Texture-Repath-Tool-2.jpg)
I changed how the shape node’s name is handled. In this case, you have to remove the freeze transform part! You can build more complex assets (asset clusters) with multiple objects and multiple scatters and export those as ASS. An obvious example is a tree with scattered leaves and stuff. Of course, you can use those proxy objects in any scatter. Run the proc (folder query and commands).Run the target folder query and the commandsįileBrowser("ddTargetFolderASS", "Select the Target Folder", "", 4 ) ma file, so you can import it in any sceneįile -force -options "v=0 " -typ "mayaAscii" -pr -es ($path + "proxy_" + $filename + ".ma") Turn off visibility for the exported Group (or object) SetAttr ($shName + ".aiOverrideShaders") 0 SetAttr ($shName + ".aiOverrideLightLinking") 0 SetAttr ($shName + ".dso") -type "string" $fullpath SetAttr ($shName + ".aiTranslator") -type "string" "procedural" String $shName = `listRelatives -s $ddAssSel` String $fullpath = $path + $filename + $extension įile -force -options "-shadowLinks 1 -mask 6399 -lightLinks 1 -boundingBox -fullPath" -typ "ASS Export" -pr -es $fullpath The filename = the selected Group's name Create the variables for manageable paths The first selected object (or group or locator) will be the exported ASS the second one will be the proxy of that. MakeIdentity -apply true -t 1 -r 1 -s 1 -n 0 -pn 1 Freeze transform before export to avoid Double Transformation Global proc int ddTargetFolderASS(string $dirpath,string $type) define the proc for the FileBrowser Command I’m using the fileBrowser command to get a simple target folder for the ASS file.Ĭheck the comments. I wrote a simple MEL script to export the first selected object/group/locator as ASS and use the second selected object as a proxy.
![maya python setattr of multiple objects maya python setattr of multiple objects](http://1.bp.blogspot.com/-S6E-3JmwN44/UQxPsDvGveI/AAAAAAAAAMQ/E6KR6DwuAPE/s1600/rotate.jpg)
![maya python setattr of multiple objects maya python setattr of multiple objects](https://www.comtec.daikin.co.jp/DC/UsersNotes/Ritaro/tutorial/maya_07/images/maya07_01.jpg)
It can also contain shaders and links to textures etc. In some cases links to those data, like openVDB files etc. It can contain every kind of data: geometries, instances (also the result of a MASH network via the Instancer node), complex hierarchy of objects.
#Maya python setattr of multiple objects how to#
This is a simple example of how to use MEL and Arnold the smart way.ĪSS is Arnold’s own file format. ASS file format and some MEL script to build your own asset library, Maya/Arnold