Creating a template.nk file somewhere on Nuke path is the simplest and
more reliable way. What ever is in that template file is used as the
default for newly created scripts.
If you need to do Python'y things, you could maybe do something like:
def projectsettings():
if nuke.root().name()=="Root":
# Script is saved somewhere
return
customisation_things_here()
nuke.callbacks.addOnScriptLoad(projectsettings)
Would need some testing, as it might trigger in cases where it's undesirable
On 10/07/13 02:42, Julian Hodgson wrote:
What's the simplest way to add a callback that gets executed for new
scripts only - so I can set default project settings?
Cheers,
Julian
Registered Address: Passion Pictures Ltd, 33-34 Rathbone Place, London
W1T 1JN.
Registration number: 2177709. Registered in England & Wales
Disclaimer
This message (and any associated files) is intended only for the
use of the individual or entity to which it is addressed and may
contain information that is confidential, subject to copyright or
constitutes a trade secret. If you are not the intended recipient
you are hereby notified that any dissemination, copying or
distribution of this message, or files associated with this message,
is strictly prohibited. If you have received this message in error,
please notify us immediately by replying to the message and deleting
it from your computer. Messages sent to and from us may be monitored.
Internet communications cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. Therefore, we do not accept
responsibility for any errors or omissions that are present in this
message, or any attachment, that have arisen as a result of e-mail
transmission. If verification is required, please request a hard-copy
version. Any views or opinions presented are solely those of the author
and do not necessarily represent those of the company.
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
--
ben dickson
2D TD | [email protected]
rising sun pictures | www.rsp.com.au
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python