英文:
NameError var declaration,var scope
问题
I don’t know python and i found this script, I want to use it in blender for a 3d model. There is a name error I don’t know how to solve it, is there any way to make the variable global from the ‘if statement’ ?
I don’t know python i just want to use the script in blender
英文:
I don’t know python and i found this script, I want to use it in blender for a 3d model.There is a name error I don’t know how to solve it,is there any way to make the variable global from the ‘if statement’ ?
I don’t know python i just want to use the script in blender
答案1
得分: 1
Translate the requested code snippet:
只需在导入语句后面的顶部定义bsdf
变量;
import bpy
bsdf = None
... 代码的其余部分 ...
英文:
Just define the bsdf
variable on the top after the import statement;
import bpy
bsdf = None
... rest of the code ...
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论