关闭

4.3 - Maya Commands: Errors and Warnings

295人阅读 评论(0) 收藏 举报
分类:

import maya.cmds as cmds
import maya.OpenMaya as om

#Errors
print("start")
cmds.error("This is an error") # the procedure will be interrupted
print("end")# the end will not be printed

print("start")
om.MGlobal.displayError("This is a displayError") # the code  will not be interrupted
print("end")

#Warning
cmds.warning("This is a warning")
om.MGlobal.displayWarning("This is a displayWarning")

# Info
print("This is print statement")
om.MGlobal.displayInfo("This is a displayInfo") # the Info will be displayed in maya


import maya.cmds as cmds
import maya.OpenMaya as om



sel = cmds.ls(sl=True)

num_sel = len(sel)
    

if num_sel >= 2:
    for s in sel:
        print(s)
elif num_sel == 1:
    om.MGlobal.displayError("Please select at least two objects")
else:
    om.MGlobal.displayError("no object selected")
    
    





0
0
查看评论

ndk-build时提示“some warnings being treated as errors”

解决方法:在Application.mk文件后面添加下面代码: APP_CPPFLAGS += -Wno-error=format-security
  • wingor2010
  • wingor2010
  • 2014-06-04 17:55
  • 2130

NS3编译错误cc1plus: all warnings being treated as errors解决方法

编译错误: -Werror选项使得gcc将所有的报警当作错误进行处理,因此模型没有编译成功。 解决方法: 网上找了很多都说把makefile里的"-Werror"去掉,但是NS3没有makefile,因此无法修改选项,找到NS3根目录下的build/c4che/cache....
  • Mary19920410
  • Mary19920410
  • 2017-04-26 20:37
  • 1943

cc1plus: all warnings being treated as errors

简介编译Qt时出现这样的提示 cc1plus: all warnings being treated as errors ,原因是编译时候gcc配置把警告按错误处理解决方法在Makefile中找到 -Werror项,删除即可。删除后重新编译。
  • x356982611
  • x356982611
  • 2017-05-02 12:43
  • 1208

linux下编译 出现 cc1: warnings being treated as errors

<br />出现这问题的原因是-Werror这个gcc编译选项。<br /> 只要在makefile中找到包含这个-Werror选项的句子,将-Werror删除,或是注释掉就行了~会不会有什么问题还不清楚,至少可以编译通过~~~听说在cygwin环境下编译不会出错的!<...
  • livingpark
  • livingpark
  • 2010-08-13 17:32
  • 27848

编译android4.0源码报错cc1plus: warnings being treated as errors

编译android源码,Make出错,提示cc1plus: warnings being treated as errors,主要原因是 Makefile 里面 gcc 的参数多了一个"-Werror",找到出错的make文件夹,看Make文件里面有没有“-Werror"...
  • typ9718
  • typ9718
  • 2014-04-11 15:32
  • 1120

GCC警告提示错误“cc1:all warnings being treated as errors”

Busybox-1.4.1编译 Ubuntu-12.04-i386   1、unused-but-set-variable 修改Makefile,添加CFLAGS += $(call cc-option,-Wno-unused-but-set-variable ,)参数设置,如...
  • zhangjs0322
  • zhangjs0322
  • 2014-05-06 15:20
  • 20335

Ubuntu下解决Make的:cc1plus: warnings being treated as errors

From: http://blog.sina.com.cn/s/blog_a5cf7b9a01011kzt.html 当Make出错,提示cc1plus: warnings being treated as errors,主要原因是 Makefile 里面 gcc ...
  • puncha
  • puncha
  • 2013-03-10 10:44
  • 13519

cc1: all warnings being treated as errors 解决办法

1、只需要运行: $ CXXFLAGS="-Wall" $ ./waf configure ($不属于命令)   或者   2、在 makefile 中找到 -Werror 将其注释掉或者删除
  • SubDragonzj
  • SubDragonzj
  • 2015-01-29 19:01
  • 980

使用makefile编译文件的时候出现cc1plus: warnings being treated as errors

使用makefile编译文件的时候出现cc1plus: warnings being treated as errors ,编译就被打断。 主要原因是 Makefile 里面 gcc 的参数多了一个 "-Werror" 找到出错的make文件夹,看Make文件里面有没有“-W...
  • sleep_3
  • sleep_3
  • 2018-01-29 11:43
  • 23

ns3编译出现cc1plus: warning being treated as errors的解决方法

由于在configure时出现了三个模块没有编译:click openflow和visualizer,找了几篇帖子,发现都说click跟openflow是根据具体情况看是否编译的,但是visualizer一般都能编译成 模块。 因此根据http://www.nsnam.org/wiki/ind...
  • fanfan_821
  • fanfan_821
  • 2012-08-09 22:32
  • 2742
    个人资料
    • 访问:544932次
    • 积分:11650
    • 等级:
    • 排名:第1554名
    • 原创:620篇
    • 转载:99篇
    • 译文:0篇
    • 评论:99条
    文章分类
    最新评论