'''
----> Examples <----
Prints out all nodes in the scene before the new scene opend then prints out all nodes in the new scene.
'''
import maya.cmds as cmds
import callback_util
# Example proc
def print_all_nodes(*args):
print cmds.ls('*')
print len(cmds.ls('*'))
# Create callback instance
callback_obj = callback_util.Callback((print_all_nodes))
# Run proc before scene updates
callback_obj.scene_update_before()
# Run proc after scene updates
callback_obj.scene_update_after()
# Adds more maya node
for i in range(20):
cmds.spaceLocator()
# Open new Maya scene
cmds.file (f=True, new=True)
# Removes callback from instance
callback_obj.remove()
-Nick
___________________
Nicholas Silveira
Technical Artist
Email: nicholas.silveira@gmail.com
nicholas-silveira.blogspot.com
linkedin.com/in/nicholassilveira
Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.
Please use the Feature Requests to give me ideas.
Please use the Support Forum if you have any questions or problems.
Please rate and review in the Review section.
