Commit Graph

40 Commits

Author SHA1 Message Date
Campbell Barton
4612034cf4 patch [#25809] Auto-Registration as utility function.
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.
2011-02-10 23:48:22 +00:00
Campbell Barton
9f81104b29 patch [#24251] Add missing tooltips for image operatios
from Sergej Reich (sergof), with minor edits.
2010-10-15 08:41:58 +00:00
Nathan Letwory
a90f876948 Fix for fix, not UnicodeEncodingError (where did I get that from?) but UnicodeDecodeError. 2010-10-13 22:20:34 +00:00
Nathan Letwory
a97af1449c Fix UnicodeEncodingError, which prevents netrender, reprojection and playback from working on Windows in certain situations.
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
2010-10-13 21:53:37 +00:00
Nathan Letwory
ad1604e840 .B25.blend -> startup.blend 2010-09-27 23:33:10 +00:00
Sergey Sharybin
2c79fa84b6 Fix #22603: Crash on launching external editor in texture paint [r29461] [WinXP 32bit]
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.
2010-09-16 15:54:48 +00:00
Campbell Barton
111965478a replace self.properties.foo --> self.foo 2010-09-09 18:03:57 +00:00
Campbell Barton
115b256738 ran through pep8 checker 2010-09-07 15:17:42 +00:00
Campbell Barton
7da5d9faec rna renaming, still only adjusting properties that wont be animated (at least its very unlikely). 2010-08-18 07:14:10 +00:00
Campbell Barton
30d180ff0d bugfix [#23194] export UVs miss the extension file
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.
2010-08-06 01:40:54 +00:00
Campbell Barton
33a6ba99ca exit image externally wasnt checking if the image existed first. 2010-08-03 23:02:18 +00:00
Martin Poirier
5b345524ea RNA Types metaclass registration
See mailing list posts for details [1][2][3]

Addons still need to be fixed; Campbell said he'd do it today.

See any of the py files (outside netrender) in this commit for how to do it (it's rather simple).

[1] http://lists.blender.org/pipermail/bf-committers/2010-February/026328.html
[2] http://lists.blender.org/pipermail/bf-committers/2010-August/028311.html
[3] http://lists.blender.org/pipermail/bf-committers/2010-August/028321.html
2010-08-02 02:55:12 +00:00
Campbell Barton
c2f36a4d6a naming changes
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)
2010-06-14 03:52:10 +00:00
Campbell Barton
9cbbc9d3af rename some rna properties filename --> filepath
* filename == "foo.ext"
 * filepath == "/path/to/and/including/foo.ext"

this was alredy followed in some places not not everywhere.
2010-06-02 17:58:28 +00:00
Campbell Barton
245ab753f5 misc uninteresting stuff (killing time at airport commit)
- pep8 updates
- RNA_TwoDFilterActuator --> RNA_Filter2DActuator
- minor changes to conolse namespace init.
2010-05-03 16:00:42 +00:00
Martin Poirier
e5a01c66a3 Fix external image editor (needs to be a list, otherwise extends adds each character as a list item).
Note: The default value ("start") on windows doesn't work. Start is not a real program.
2010-04-12 02:43:17 +00:00
Matt Ebb
9acba540db Fix [#21756] Texture paint "quick edit" sending wrong path on unsaved scenes
* 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...
2010-04-07 09:07:06 +00:00
Campbell Barton
bc149e0fbe pep8 cleanup 2010-04-04 14:52:15 +00:00
Brecht Van Lommel
4924654b03 Remove some experimental python script code. 2010-04-01 20:48:20 +00:00
Brecht Van Lommel
aff0551e5b Some minor python UI script fixes. 2010-04-01 12:53:38 +00:00
Campbell Barton
391cc2d004 merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
Matt Ebb
1d4b932145 Fix [#21553] Re-Projection just opening the image editor but not the image.
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.
2010-03-17 03:07:37 +00:00
Campbell Barton
f8a4683b72 pep8 warnings 2010-03-14 23:26:17 +00:00
Campbell Barton
b356eb6a8b image re-project now uses offscreen render function and has input for render size.
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.
2010-03-08 20:08:04 +00:00
Campbell Barton
581efb4346 re-project images now save as PNG's rather then TAGA's, should work around a problem photoshop has with saving taga's with alpha channels. 2010-03-07 20:39:27 +00:00
Campbell Barton
28a0d4a65a aparently startfile didnt work. trying 'start' command for windows. 2010-03-07 11:41:26 +00:00
Campbell Barton
b237dc3af5 image editor user preference.
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.
2010-03-07 09:23:57 +00:00
Tom Musgrove
8e35d91985 ok now all 3 major platforms should work 2010-03-07 02:38:15 +00:00
Tom Musgrove
d6a28f438f doh that is what i get for committing before testing... adding missing lines 2010-03-07 02:14:52 +00:00
Campbell Barton
03bd7346ef reverting 27304, please test before committing. 2010-03-07 02:12:51 +00:00
Tom Musgrove
1eed648aa9 allow darwin and windows users to use the view based image editing also, temporary hard coded workaround till it is setable via prefs 2010-03-07 02:08:43 +00:00
Campbell Barton
3838b80cf1 re-project + gimp integration, now its easy to edit the view in the gimp and apply the projection back without manually opening and saving files. 2010-03-06 21:47:16 +00:00
Campbell Barton
7c0d2ffb64 pep8 cleanup 2010-03-06 01:40:29 +00:00
Campbell Barton
fbb8672da4 replace operator options bl_undo and bl_register with bl_options
eg.
 bl_options = {'REGISTER', 'UNDO', 'BLOCKING', 'GRAB_POINTER'}

This didnt exist when operators were originally wrapped.
2010-03-01 00:03:51 +00:00
Campbell Barton
bbf6dde277 rna/py api
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.
2010-02-26 12:28:44 +00:00
Campbell Barton
97bdfe6f1b pep8 cleanup + correction for external player operator return value. 2010-02-22 23:32:58 +00:00
Campbell Barton
23efeff6a9 [#21177] Text editor
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.
2010-02-16 09:55:07 +00:00
Campbell Barton
39c04315e2 change python scripts so modules which register with blender have a register() function rather then making import automatically run the register functions (generally considered bad practice by python people) 2010-02-14 11:21:21 +00:00
Campbell Barton
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Campbell Barton
912fdcacab button to save edited textures in texture paint 2010-02-12 11:34:25 +00:00