Hi,
Some time ago I learned about Pymel/python programming in Maya making this light manager using a tutorial/online resources, and it’s been a while but I could never find a solution to this, I can create, save and import all lights except the directional light that cannot be imported, I think it has something to do with how Maya light type work but I cannot find online what I should put for directional light type, if you have any idea how to solve it or why it’s not working that would be great,
thank you,
PS:i couldn’t find a similar question but i apologize if i missed it!
here is my code/maya report and the json save file:
Json:
{
“AA”: {
“translate”: [
0.0,
0.0,
0.0
],
“rotation”: [
0.0,
0.0,
0.0
],
“lightType”: “areaLight”,
“intensity”: 1.0,
“color”: [
1.0,
1.0,
1.0
],
“name”: “AA”
},
“BB”: {
“translate”: [
0.0,
0.0,
0.0
],
“rotation”: [
0.0,
0.0,
0.0
],
“lightType”: “pointLight”,
“intensity”: 1.0,
“color”: [
1.0,
1.0,
1.0
],
“name”: “BB”
},
“CC”: {
“translate”: [
0.0,
0.0,
0.0
],
“rotation”: [
0.0,
0.0,
0.0
],
“lightType”: “spotLight”,
“intensity”: 1.0,
“color”: [
1.0,
1.0,
1.0
],
“name”: “CC”
},
“VV”: {
“translate”: [
0.0,
0.0,
0.0
],
“rotation”: [
0.0,
0.0,
0.0
],
“lightType”: “volumeLight”,
“intensity”: 1.0,
“color”: [
1.0,
1.0,
1.0
],
“name”: “VV”
},
“RR”: {
“translate”: [
0.0,
0.0,
0.0
],
“rotation”: [
0.0,
0.0,
0.0
],
“lightType”: “directionalLight”,
“intensity”: 1.0,
“color”: [
1.0,
1.0,
1.0
],
“name”: “RR”
}
}