This removes auto-registration, committed by Martin r30961.
Realize this is a contentious topic but Brecht and myself both would rather opt-in registration.
TODO:
- addons need updating.
- class list will be modified to use weakrefs (should have been done for existing system too).
- will move bpy.types.(un)register functions into bpy.utils.(un)register_class, currently including these functions in a type list is internally ugly, scripts which loop over types also need to check for these.
Users can set their machine name to something containing non-ascii characters. In Python this currently causes problem due to
socket.gethostname() throwing UnicodeEncodingError. Work around this by not using platform.system() (which uses internally socket.gethostname()).
See http://www.pasteall.org/16215 for backtrace
Crash was caused by missed offscreen OpenGL buffer. Added checking around this stuff.
Also fixed crash of simple "Image from view operator".
Note: This commit fixes only crashing, you'll be still unable to use this tools.
also made all other exporters do this.
Made some internal changes.
- moved path functions from bpy.utils to bpy.path (similar to os.path)
- added functions...
bpy.path.ensure_ext(path, ".ext", case_sensitive=False) # simple function to ensure the extension is set.
bpy.path.resolve_ncase(path) # useful for importing scenes made on windows where the path case doesnt match the files.
path -> filepath (for rna and operators, as agreed on with elubie)
path -> data_path (for windowmanager context functions, this was alredy used in many places)
* Made it use the temp directory in user preferences when the .blend file hasn't been saved yet
* Made bmain->name (wrapped as bpy.data.filename) contain an empty string when
there's no .B25.blend and no file saved, rather than "<memory2>".
This is a good candidate for consistent file path api, retrieving temp dirs / project-
specific temp dirs / etc...
Campbell please check/beautify if you like, but it works properly on OS X, either
opening Preview with the 'open' command or Photoshop, when the path is set
in user preferences.
unrelated changes that ended up being more trouble to commit separate...
- removed BLI_split_dirfile(), was nasty, occasionaly modifying the source string, it could create directories and used the $CWD in some cases. was only used in 2 places in filesel.c, if this gives problems can address without bringing back this function.
renamed BLI_split_dirfile_basic --> BLI_split_dirfile
- view3d_operator_needs_opengl was being called for offscreen render when it wasnt needed.
image.py has a function image_editor_guess(), please test on windows and mac. (using 'startfile' and 'open')
this is only used when the image editor is not set.
rename image.save() --> image.save_render() because it uses render settings for saving.
added image.save() which is like pressing save in the image view, saving to the images path and removing the dirty flag.
Running scripts directly didnt call the register function, even though this is not essential its good to be able to run a script directly and see changes in the UI.