Isotropix Forums

transfer material attributes from maya arnold to clarisse

Clarisse Scripting related topics

transfer material attributes from maya arnold to clarisse

Unread postby anabil » Fri Oct 20, 2017 4:40 am

Hi,

i was looking for a way to export shaders and textures info from maya arnold and use that in clarisse in the new standard shader with python, the best thing i can think of is exporting a json file from maya and read that somehow in clarisse with python to automatically set the corresponding shaders and attributes to the different objects based on the object name.

if that's possible, can you please show me a small example on how to do that?

thanks,
Ahmed
anabil
 
Posts: 19
Joined: Tue Mar 21, 2017 11:51 am

Re: transfer material attributes from maya arnold to clariss

Unread postby bvaldes » Mon Oct 23, 2017 4:59 pm

Hi,

This is a great idea. About the process, I would suggest you to store the data with as key the name of the attribute inside of Clarisse.
If the way to name the keys inside of the JSON dictionary is good, you could do everything inside one for-loop.

About the way to get the content of an attribute inside of Maya, you should look their Scripting documentation. For the Clarisse part you can do something like that:

python code

import json
import os
file = "the_path_to_the_json_file.json"

# Grab the content of the json file and turn it into a python dictonnary
with open(file, 'r') as f:
data = json.load(f)

# I assume that the Json file looks like that:
# {
# "material_sample_count": "10",
# "diffuse_fronColor": ["0.4", "0.2" ,"1"],
# "specular_1_color": "the_path_of_a_map.jpg",
# "emission_strentgh": "0.4"
# ...
# }

# Now we have to extract the data from the dict and set the values inside of the shader

# Create the sader
shader = ix.cmds.CreateObject("standard", "MaterialPhysicalStandard", "Global", "project://scene")

for attr in data:
# Check if the data in the doc is a file:
isTexture = False
if os.path.exists(data[attr]):
isTexture = True

# If it's a texture we khave to import the file as texture and set it with the good function
if isTexture:
mapFile = ix.cmds.CreateObject("map_file", "TextureMapFile", "Global", "project://scene")
ix.cmds.SetValues(str(mapFile) + ".filename[0]"], [data[attr]])

ix.cmds.SetTexture([str(shader.get_attribute(attr))], str(mapFile))
else:
content = data["attr"]
# Transform the content of the key to a list because Clarisse use this to setValues
if not isinstance(content, list):
content = [content]
ix.cmds.SetValues([str(shader.get_attribute(attr))], content)

This code probably doesn't work because it's not possible to test it right now but with it you will understand the process. You have now do it by your own depending on your setup and the way you create the JSON file from Maya.

Regards
Benoit VALDES
Isotropix
Clarisse QA
User avatar
bvaldes
 
Posts: 153
Joined: Mon Sep 26, 2016 11:44 am

Re: transfer material attributes from maya arnold to clariss

Unread postby anabil » Tue Oct 24, 2017 12:22 pm

Hi,

Thank you for your help :)

i got a script from a colleague to write shader data to a json file from maya, i add a little to the script to add the object shape name as well.
here is what the json file from maya looks like:

Note : i didn't try with textures yet, just testing the idea.

Code: Select all
[
    {
        "object_name": "pSphereShape1",
        "data": [
            {
                "specular_2_normal_input": [
                    0.0,
                    0.0,
                    0.0
                ]
            },
            {
                "diffuse_front_strength": 0.6484848260879517
            },
            {
                "diffuse_front_color": [
                    1.0,
                    1.0,
                    0.0
                ]
            },
            {
                "diffuse_back_color": [
                    0.18000000715255737,
                    0.18000000715255737,
                    0.18000000715255737
                ]
            },
            {
                "emission_color": [
                    1.0,
                    1.0,
                    1.0
                ]
            },
            {
                "diffuse_sss_distance_1": 1.5
            },
            {
                "diffuse_sss_weight_1": 1.0
            },
            {
                "diffuse_sss_color_1": [
                    0.4390000104904175,
                    0.15600000321865082,
                    0.07800000160932541
                ]
            },
            {
                "diffuse_sss_distance_2": 4.0
            },
            {
                "diffuse_sss_color_2": [
                    0.4390000104904175,
                    0.07999999821186066,
                    0.017999999225139618
                ]
            },
            {
                "diffuse_sss_distance_3": 0.75
            },
            {
                "diffuse_sss_color_3": [
                    0.5230000019073486,
                    0.6370000243186951,
                    0.6669999957084656
                ]
            },
            {
                "diffuse_sss_density_scale": 1.0
            },
            {
                "transmittance_color": [
                    1.0,
                    1.0,
                    1.0
                ]
            },
            {
                "transmittance_density": 1.0
            },
            {
                "specular_1_strength": 0.4909090995788574
            },
            {
                "specular_1_color": [
                    1.0,
                    0.0,
                    1.0
                ]
            },
            {
                "specular_1_roughness": 0.5575757622718811
            },
            {
                "specular_1_anisotropy": 0.35151514410972595
            },
            {
                "specular_1_anisotropy_rotation": 0.13939394056797028
            },
            {
                "specular_1_index_of_refraction": 1.399999976158142
            },
            {
                "specular_1_fresnel_reflectivity": [
                    0.5479999780654907,
                    0.5490000247955322,
                    0.5699999928474426
                ]
            },
            {
                "specular_1_fresnel_edge_tint": [
                    0.5789999961853027,
                    0.5979999899864197,
                    0.6200000047683716
                ]
            },
            {
                "specular_2_color": [
                    1.0,
                    1.0,
                    1.0
                ]
            },
            {
                "specular_2_roughness": 0.5
            },
            {
                "specular_2_anisotropy": 0.5
            },
            {
                "specular_2_index_of_refraction": 1.399999976158142
            },
            {
                "specular_2_fresnel_reflectivity": [
                    0.5479999780654907,
                    0.5490000247955322,
                    0.5699999928474426
                ]
            },
            {
                "specular_2_fresnel_edge_tint": [
                    0.5789999961853027,
                    0.5979999899864197,
                    0.6200000047683716
                ]
            },
            {
                "transmission_color": [
                    1.0,
                    1.0,
                    1.0
                ]
            },
            {
                "transmission_link_to_specular": true
            },
            {
                "transmission_index_of_refraction": 1.399999976158142
            },
            {
                "opacity": [
                    1.0,
                    1.0,
                    1.0
                ]
            }
        ],
        "name": "alSurface2"
    },
    {
        "object_name": "pSphereShape2",
        "data": [
            {
                "specular_2_normal_input": [
                    0.0,
                    0.0,
                    0.0
                ]
            },
            {
                "diffuse_front_strength": 0.5272727012634277
            },
            {
                "diffuse_front_color": [
                    0.0,
                    1.0,
                    0.0
                ]
            },
            {
                "diffuse_back_color": [
                    0.18000000715255737,
                    0.18000000715255737,
                    0.18000000715255737
                ]
            },
            {
                "emission_color": [
                    1.0,
                    1.0,
                    1.0
                ]
            },
            {
                "diffuse_sss_distance_1": 1.5
            },
            {
                "diffuse_sss_weight_1": 1.0
            },
            {
                "diffuse_sss_color_1": [
                    0.4390000104904175,
                    0.15600000321865082,
                    0.07800000160932541
                ]
            },
            {
                "diffuse_sss_distance_2": 4.0
            },
            {
                "diffuse_sss_color_2": [
                    0.4390000104904175,
                    0.07999999821186066,
                    0.017999999225139618
                ]
            },
            {
                "diffuse_sss_distance_3": 0.75
            },
            {
                "diffuse_sss_color_3": [
                    0.5230000019073486,
                    0.6370000243186951,
                    0.6669999957084656
                ]
            },
            {
                "diffuse_sss_density_scale": 1.0
            },
            {
                "transmittance_color": [
                    1.0,
                    1.0,
                    1.0
                ]
            },
            {
                "transmittance_density": 1.0
            },
            {
                "specular_1_strength": 1.0
            },
            {
                "specular_1_color": [
                    1.0,
                    0.0,
                    0.0
                ]
            },
            {
                "specular_1_roughness": 0.17575757205486298
            },
            {
                "specular_1_anisotropy": 0.5
            },
            {
                "specular_1_index_of_refraction": 1.399999976158142
            },
            {
                "specular_1_fresnel_reflectivity": [
                    0.5479999780654907,
                    0.5490000247955322,
                    0.5699999928474426
                ]
            },
            {
                "specular_1_fresnel_edge_tint": [
                    0.5789999961853027,
                    0.5979999899864197,
                    0.6200000047683716
                ]
            },
            {
                "specular_2_color": [
                    1.0,
                    1.0,
                    1.0
                ]
            },
            {
                "specular_2_roughness": 0.5
            },
            {
                "specular_2_anisotropy": 0.5
            },
            {
                "specular_2_index_of_refraction": 1.399999976158142
            },
            {
                "specular_2_fresnel_reflectivity": [
                    0.5479999780654907,
                    0.5490000247955322,
                    0.5699999928474426
                ]
            },
            {
                "specular_2_fresnel_edge_tint": [
                    0.5789999961853027,
                    0.5979999899864197,
                    0.6200000047683716
                ]
            },
            {
                "transmission_color": [
                    1.0,
                    1.0,
                    1.0
                ]
            },
            {
                "transmission_link_to_specular": true
            },
            {
                "transmission_index_of_refraction": 1.399999976158142
            },
            {
                "opacity": [
                    1.0,
                    1.0,
                    1.0
                ]
            }
        ],
        "name": "alSurface1"
    }
]


i tested the other code in clarisse with a little different adjustments and it creates the different materials with the correct attrs and names, and that's awesome :D
i want to go a little further and i want to know how to read "object_name": "pSphereShape1" from the json and assign the newly created material in clarisse to that object..

any help with the code in clarisse would be much appreciated,

Thank you very much,
Ahmed
anabil
 
Posts: 19
Joined: Tue Mar 21, 2017 11:51 am

Re: transfer material attributes from maya arnold to clariss

Unread postby bvaldes » Tue Oct 24, 2017 2:23 pm

Hi,

Happy that everything works. About assign the material to the geometry, you can do something like that:

python code

# You have to looking for the object path (project://scene/pSphereShape1)
objects = ix.api.OfObjectVector() # A container that will contain all the items from the search
filter = "*pSphereShape1"
className = "Geometry"
# This function will looking for all mathing objects with le filter and the className, like a group does.
ix.application.get_matching_objects(objects, filter, classname)

# If you are sure that you object is unic with the name you can do this:
item = objects[0]

# Then to assign a material it's:
ix.cmds.SetValues([str(item) + ".materials[0]"], [str(shader)])

I hope this help.
That could be good to the community to share your script. Like that everybody will be able to switch materials from Maya to Clarisse easily.

Regards,
Benoit VALDES
Isotropix
Clarisse QA
User avatar
bvaldes
 
Posts: 153
Joined: Mon Sep 26, 2016 11:44 am

Re: transfer material attributes from maya arnold to clariss

Unread postby anabil » Wed Oct 25, 2017 5:25 am

Hi,

i'm very happy that everything works perfectly too, and yes of course, i will share the complete script after it's finished.

for the most part it works great with file textures and attributes values, so i want to add two more things, bump maps and displacements, i want your help with the code on how to create displacement and bump nodes and connect those to the shaders and objects.

i will add two more keys to the json file, one will be called ['bump_map_tex'], and the other is ['disp_map_tex'] so we can use their values to create displacement and bump nodes in clarisse.

thank you very much for your time and help :))) The clarisse forum is the best :D :D

EDIT: i didn;t know that i could get callbacks in the clarisse log like in maya, with that i was able to find the code very easily. Thanks for that

now i'm only stuck in one area, when i tell it to assign the displacement to the object it gets assigned to all of my objects. i don;t know why yet..
i will share the code with you shortly.

Thanks
anabil
 
Posts: 19
Joined: Tue Mar 21, 2017 11:51 am

Re: transfer material attributes from maya arnold to clariss

Unread postby anabil » Wed Oct 25, 2017 11:38 am

Hello,

i got it all figured out now :D :D so i thought i should share the script and maybe some other people would have more ideas to add to it.

this is the script to write AlSurface shaders data from maya to a JSON file:

python code

import maya.cmds as cmds

import os
import json


def store_alstandard_mat_data(objA=None, file_path=None):

if objA == None:
objA = cmds.ls( sl=True )

"""
Store the Arnold AlStandard material attributes in a json file
Example: store_alstandard_mat_data(objA=['sphere1'], file_path='c:/test_mat.json')
:param shader_nameA: array, string name of the object to query from
:param file_path: str, full output path
:return:
"""


if not objA:
return

if not file_path:
return

disp = []
shader_nameA = []

for i in objA:
allChildren = cmds.listRelatives(i, ad=1)
for eachChild in allChildren:
# Get the shader groups attached to this particular object
shaderGroups = cmds.listConnections(cmds.listHistory(eachChild))
if shaderGroups is not None:
# Get the material attached to the shader group
materials = [x for x in cmds.ls(cmds.listConnections(shaderGroups), materials=1)]
#filtering only alSurface materials
if materials:
for mat in materials:
# If its AlSurface material add it to the list
if cmds.nodeType(mat) == 'alSurface':
if materials not in shader_nameA:
shader_nameA.append(mat)
# If its displacement material add it to the list
if cmds.nodeType(mat) == 'displacementShader':
if materials not in disp:
disp.append(mat)
if not shader_nameA:
return
# converting maya attribute names to clarisse names
clarisse_arnold_pairs = {'diffuse_front_color': 'diffuseColor',
'diffuse_front_strength': 'diffuseStrength',
'diffuse_roughness': 'diffuseRoughness',
'diffuse_back_color': 'backlightColor',
'diffuse_back_strength': 'backlightStrength',

'diffuse_sss_mix': 'sssMix',
'diffuse_sss_mode': 'sssMode',
'diffuse_sss_density_scale': 'sssDensityScale',
'diffuse_sss_color_1': 'sssRadiusColor',
'diffuse_sss_distance_1': 'sssRadius',
'diffuse_sss_weight_1': 'sssWeight1',
'diffuse_sss_color_2': 'sssRadiusColor2',
'diffuse_sss_distance_2': 'sssRadius2',
'diffuse_sss_weight_2': 'sssWeight2',
'diffuse_sss_color_3': 'sssRadiusColor3',
'diffuse_sss_distance_3': 'sssRadius3',
'diffuse_sss_weight_3': 'sssWeight3',
'diffuse_sss_group[0]': 'sssTraceSet',

'diffuse_normal_mode': None,
'diffuse_normal_input': 'diffuseNormal',

'specular_1_color': 'specular1Color',
'specular_1_strength': 'specular1Strength',
'specular_1_roughness': 'specular1Roughness',
'specular_1_anisotropy': 'specular1Anisotropy',
'specular_1_anisotropy_rotation': 'specular1Rotation',
'specular_1_fresnel_mode': 'specular1FresnelMode',
'specular_1_index_of_refraction': 'specular1Ior',
'specular_1_fresnel_preset': None,
'specular_1_fresnel_reflectivity': 'specular1Reflectivity',
'specular_1_fresnel_edge_tint': 'specular1EdgeTint',
'specular_1_brdf': 'specular1Distribution',
'specular_1_exit_color': None,
'specular_1_normal_mode': None,
'specular_1_normal_input': 'specular1Normal',

'specular_2_color': 'specular2Color',
'specular_2_strength': 'specular2Strength',
'specular_2_roughness': 'specular2Roughness',
'specular_2_anisotropy': 'specular2Anisotropy',
'specular_2_anisotropy_rotation': 'specular2Rotation',
'specular_2_fresnel_mode': 'specular1FresnelMode',
'specular_2_index_of_refraction': 'specular2Ior',
'specular_2_fresnel_preset': None,
'specular_2_fresnel_reflectivity': 'specular2Reflectivity',
'specular_2_fresnel_edge_tint': 'specular2EdgeTint',
'specular_2_brdf': 'specular1Distribution',
'specular_2_exit_color': None,
'specular_2_normal_mode': None,
'specular_2_normal_input': 'specular2Normal',

'transmission_color': 'transmissionColor',
'transmission_strength': 'transmissionStrength',
'transmission_link_to_specular': 'transmissionLinkToSpecular1',
'transmission_linked_to': None,
'transmission_index_of_refraction': 'transmissionIor',
'transmission_roughness': 'transmissionRoughness',
'transmittance_color': 'ssAttenuationColor',
'transmittance_density': 'ssDensityScale',
'transmission_exit_color': None,
'transmission_normal_mode': None,
'transmission_normal_input': 'transmissionNormal',

'emission_color': 'emissionColor',
'emission_strength': 'emissionStrength',

'normal_input' : 'normalCamera',

'opacity': 'opacity'}

shaderA = []

for shader_name in shader_nameA:

attributes = cmds.listAttr(shader_name, visible=True)
# getting the object name
shading_engine = cmds.listConnections(shader_name, type='shadingEngine')[0]
object_name = cmds.listRelatives(cmds.listConnections(shading_engine, type = 'mesh'))[0]
#getting displacement shader
disp_conn_node = cmds.listConnections(shading_engine + '.displacementShader', d=False, s=True)

# base dictionary keys and values to be written in the json file
atrA = {'object_name' : object_name, 'disp_name' : [], 'name': shader_name, 'data': []}

#getting displacement texture path and adding it to the json dict
if disp_conn_node:
if cmds.nodeType(disp_conn_node) == 'displacementShader':
disp_file = cmds.listConnections(disp_conn_node[0] + '.displacement' , d=False, s=True)
if disp_file:
tx_disp_file_path = cmds.getAttr(disp_file[0] + '.fileTextureName')
# If it has a file path check if it's valid
if tx_disp_file_path:
if os.path.exists(tx_disp_file_path):
disp_name = tx_disp_file_path.replace('\\', '/')
disp_attr = str(disp_name)
atrA['disp_name'].append(disp_attr)


for i in attributes:

value = cmds.getAttr(shader_name + '.' + str(i))

if value:
#check the attr is color attr not a texture
if isinstance(value, list):
value = value[0]

# Check if output plug has a file node connection
output_conn_node = cmds.listConnections(shader_name + '.' + str(i), d=False, s=True)

if output_conn_node:
if cmds.nodeType(output_conn_node, api=True) == 'kFileTexture':
tx_file_path = cmds.getAttr(output_conn_node[0] + '.fileTextureName')

# If it has a file path check if it's valid
if tx_file_path:
if os.path.exists(tx_file_path):
value = tx_file_path.replace('\\', '/')

# Override for bump maps
# Check if input plug has a file node connection
bump_conn_node = cmds.listConnections(shader_name + '.' + str(i), d=False, s=True)

if bump_conn_node:
if cmds.nodeType(bump_conn_node) == 'bump2d':
bump_input = cmds.listConnections(bump_conn_node[0] + '.bumpValue', d=False, s=True)

if bump_input:
tx_bmp_file_path = cmds.getAttr(bump_input[0] + '.fileTextureName')

# If it has a file path check if it's valid
if tx_bmp_file_path:
if os.path.exists(tx_bmp_file_path):
value = tx_bmp_file_path.replace('\\', '/')


for clar_id, arnold_id in clarisse_arnold_pairs.iteritems():
if i == arnold_id:
attr = {clar_id: value}
atrA['data'].append(attr)
break

if atrA:
shaderA.append(atrA)

#save data to the json file
if shaderA:
with open(file_path, 'w') as fp:
json.dump(shaderA, fp, sort_keys=False, indent=4)

print '[Info]Finished exporting material data...'

# Example script:
store_alstandard_mat_data(file_path='path_to_write_your_json_file/test.json')



Note : this script will only export alsurface data not any other shader...


--and here is the script for clarisse:

Python Code:

python code

import ix

import os
import json
import ntpath


def read_mat_data(file_path=None, default_path="project://scene"):


if not file_path:
return

if not os.path.exists(file_path):
return

# Open the json file and read the data
with open(file_path, 'r') as fp:
dataA = json.load(fp)

if not dataA:
return

for shader in dataA:
if shader:
shader_name = shader['name']
objectA = shader['object_name']
disp_texture = shader['disp_name']

if disp_texture:

disp_tex = shader.get('disp_name')[0]

# create a displacement node
disp_node = ix.cmds.CreateObject(str(ntpath.basename(disp_tex)) + "_disp",
"Displacement", "Global",
default_path)
# create texture for displacement
disp_TextureNode = ix.cmds.CreateObject(str(ntpath.basename(disp_tex)) + "_dispTX",
"TextureStreamedMapFile", "Global",
default_path)

# setting displacement texture values
ix.cmds.SetTexture([disp_node.get_full_name() + ".front_value"],
disp_TextureNode.get_full_name())

ix.cmds.SetValues([disp_TextureNode.get_full_name() + ".filename[0]"], [str(disp_tex)])
ix.cmds.SetValues([disp_TextureNode.get_full_name() + ".color_space_auto_detect"], ["0"])
ix.cmds.SetValues([disp_TextureNode.get_full_name() + ".file_color_space"], ["linear"])


if objectA:
object_name = shader.get('object_name')

# Create Physical Material
if shader_name:
standard_mat = ix.cmds.CreateObject(str(shader_name) + '_mat', "MaterialPhysicalStandard", "Global",
default_path)
if standard_mat:
attributes_data = shader.get('data')

if attributes_data:
for i in attributes_data:
if i:

if isinstance(i, dict):
for clar_id, val in i.iteritems():

# Everything that is a list considered as color values
if isinstance(val, list) and len(val) == 3:
ix.cmds.SetValues([standard_mat.get_full_name() + "." + str(clar_id)],
[str(val[0]), str(val[1]), str(val[2])])

# Everything that is a string is considered as a file path
elif isinstance(val, basestring):
texture_node = ix.cmds.CreateObject(str(ntpath.basename(val)) + "_tx",
"TextureStreamedMapFile", "Global",
default_path)

if texture_node:

ix.cmds.SetValues([texture_node.get_full_name() + ".filename[0]"],
[str(val)])


# for bump mapping
if clar_id == 'normal_input':
#print 'iam a normal input'
bump_node = ix.cmds.CreateObject(str(ntpath.basename(val)) + "_bumpNode",
"TextureBumpMap", "Global",
default_path)

ix.cmds.SetTexture([bump_node.get_full_name() + ".input"],
texture_node.get_full_name())

ix.cmds.SetTexture([standard_mat.get_full_name() + "." + str(clar_id)],
bump_node.get_full_name())
else:
#everything that's not a bump map
ix.cmds.SetTexture([standard_mat.get_full_name() + "." + str(clar_id)],
texture_node.get_full_name())
else:
# Set the attribute
ix.cmds.SetValues([standard_mat.get_full_name() + "." + str(clar_id)],
[str(val)])



#A container that will contain all the items in the scene
objects = ix.api.OfObjectVector()

#filtering by name from the json file
filter = "*%s" % str(object_name)
className = "Geometry"

# This function will looking for all mathing objects with le filter and the className, like a group does.
ix.application.get_matching_objects(objects, filter, className)

#If you are sure that your object is unique with the name you can do this:
item = objects[0]

# assign the newly created shader to that object
ix.cmds.SetValues( [str(item) + ".materials[0]"], [str(standard_mat)] )

# assign displacement to object if any
if disp_texture:
ix.cmds.SetValues( [str(item) + ".displacements[0]"], [str(disp_node)] )

# Example Script:
read_mat_data(file_path='path_to_your_json_file/test.json', default_path="project://scene")


PS: i have no idea who wrote the initial script, i only added parts to it and modified some parts inside, so special thanks to the unknown hero :D :D

thank you again :)
Ahmed
anabil
 
Posts: 19
Joined: Tue Mar 21, 2017 11:51 am

Re: transfer material attributes from maya arnold to clariss

Unread postby bvaldes » Wed Oct 25, 2017 3:25 pm

Hi,

Nice work and thank you to share your work with us!
Benoit VALDES
Isotropix
Clarisse QA
User avatar
bvaldes
 
Posts: 153
Joined: Mon Sep 26, 2016 11:44 am

Re: transfer material attributes from maya arnold to clariss

Unread postby bruce » Wed Oct 25, 2017 4:18 pm

Hi, Ahmed

Thanks a lot, I test it on a simple shader it works like a charm!

Cheers.
Bruce
Isotropix
Technical Artist - Clarisse Specialist
User avatar
bruce
 
Posts: 178
Joined: Fri May 20, 2016 12:11 pm

Re: transfer material attributes from maya arnold to clariss

Unread postby janoshunyadi » Wed Oct 25, 2017 8:16 pm

Nice to see our script pop up here. I think credit is due where it should belong ;)

https://forum.isotropix.com/viewtopic.php?f=5&t=3162&p=12934&hilit=clarisse_alshader_io#p12934

Btw. it's been on Github for a while for anyone to fork it:
https://github.com/kidintwo3/clarisse_alshader_io

Greets,
Janos
janoshunyadi
 
Posts: 100
Joined: Tue Dec 01, 2015 2:51 pm

Re: transfer material attributes from maya arnold to clariss

Unread postby anabil » Thu Oct 26, 2017 3:24 am

hi bruce,

that's great to know, now i'm having an issue when testing on larger scene, i'm getting this error :

Code: Select all
Traceback (most recent call last):
  File "<string>", line 120, in <module>
  File "<string>", line 111, in read_mat_data
  File "C:/Program Files/Isotropix/Clarisse iFX 3.5/Clarisse/python\framework.py", line 5057, in __getitem__
    raise IndexError("The index (" + str(index) + ") is out of range")
IndexError: The index (0) is out of range


i think that's with the shader assignment part? i will do more tests, and if you know some other way to search for objects inside of clarisse by name with conditions or something that would be great as well.

cheers,
Ahmed
anabil
 
Posts: 19
Joined: Tue Mar 21, 2017 11:51 am

Next

Return to Scripting