Heavy curve - lots of curve shapes (takes an age to select and edit)


Hi all,

Anyone work with heavy detailed curves much in maya? I need a bit of advice.

I’ve been given a floor layout as a curve from another piece of software (see image below), when i go to select it, it takes about 40 seconds to actually select the curve.
The attribute editor has a large amount of curve shapes.

I was hoping to render the curve with Arnold but would be a bit tedious to go through each shape in the attribute editor and assign a flat curve shader to it. Anyone have any ideas on a better approach? Thanks :slight_smile:


You can assign materials with the script. Try Curve Editor of Asset Manager for that task.
Or select curve shapes and run Python script:

import pymel.core as pm
# select curves, SHIFT select shader, run
def shaderAsign():
    sel = pm.ls( sl=1 )
    mat = sel.pop( -1 ) 
    for i in sel:
        if i.nodeType() == 'transform':
            i = i.getShape()
        mat.outColor >> i.aiCurveShader


Hi kiryha, thanks for the suggestion, I can’t seem to get the script to work, I get this error returned:


Error: NameError: file <maya console> line 4: global name ‘pm’ is not defined


Maybe there is another solution, as you can see in my example below, I have too many curve shapes under this one curve. I’ve tried using the Curves>> attach tool but I end up with too many edges getting bridged across the original shape.

Maybe i’ll just have to re-trace over all the curve shapes with a simpler design. Another thing I could do is to just render a matte and adjust a flat colour in after effects afterwards… hmm.


Try to add this line of code on very top of the script:

import pymel.core as pm

if above doesn’t work then:

import maya.cmds as pm

I am not sure if he used Pymel of Python and what is exact difference but one of those should work with the code i think.


Pymel, the first one is correct.


Thanks all :slight_smile: