How to add a erroe window?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/03/2011 at 19:21, xxxxxxxx wrote:
Hi all
I come from China, and I can not find a man who study python for Cinema 4D around me.
so,I guess there is the only place which I can be helped.
I hope you can understand what I said:)And there is my plugin:
###############################################################
import c4d
from c4d import guidef main() :
doc.StartUndo()
objList = doc.GetActiveObjects(childs=True)
for obj in objList:
doc.AddUndo(c4d.UNDOTYPE_CHANGE,obj)
obj.SetRelPos(c4d.Vector(0,0,0))
obj.SetRelRot(c4d.Vector(0,0,0))
c4d.EventAdd()
doc.EndUndo()if __name__=='__main__':
main()#######################################################################
the plugin let the object back to (0,0,0) #position and rotation
but, I just want add a message window when none object have be selected, and the sys will show the window with some words(just like :"please select a object frist!") to users.But, I don`t know how to add it !!!
So, I hope you can help me.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/03/2011 at 02:32, xxxxxxxx wrote:
Hi
it's from gui, >> gui.MessageDialogimport c4d from c4d import gui def main() : doc.StartUndo() objList = doc.GetActiveObjects(childs=True) if objList: for obj in objList: doc.AddUndo(c4d.UNDOTYPE_CHANGE,obj) obj.SetRelPos(c4d.Vector(0,0,0)) obj.SetRelRot(c4d.Vector(0,0,0)) else: gui.MessageDialog("Please select me!!!") c4d.EventAdd() doc.EndUndo() if __name__=='__main__': main()
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/03/2011 at 02:42, xxxxxxxx wrote:
thinks:)
you are so kind!!!And I think I should study python more hard than before
Have a nice day:)
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/03/2011 at 05:03, xxxxxxxx wrote:
Studieng the Documentation would be more senseful.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/03/2011 at 05:15, xxxxxxxx wrote:
thanks a lot
you are good people ~