Commit Graph

310 Commits

Author SHA1 Message Date
Campbell Barton
de1c5de708 bugfix [#24151] AddPresetBase class does not add Color import when saving color properties 2010-10-05 19:14:41 +00:00
Campbell Barton
e568ea668e revert r32284, turns out OpenSuse needs this for forkpty(), also fixed missing import with 3ds export. 2010-10-04 11:42:39 +00:00
Campbell Barton
05884e09be - rna bugfix where ints were not clamped and would overflow, now raise an error and print valid range.
- fixed WM_OT_context_cycle_int was causing problems with int overflow, now it cycles properly.
- rename QUOTE macro to STRINGIFY_ARG, and added STRINGIFY, which is used more often since it gives the value as a string.
2010-10-03 01:44:00 +00:00
Campbell Barton
ee84a5b082 fix for crash when using the console to load a file, when the UI changes dont attempt to add to the console's buffer. 2010-10-01 17:55:35 +00:00
Janne Karhu
84fe3ab081 Added RNA conversions to the fcurve/driver fix script from my sequencer speed effect commit. 2010-10-01 09:54:07 +00:00
Campbell Barton
3dea67a3fd bugfix [#24065] obj export (mtl image path) 2010-10-01 05:19:40 +00:00
Nathan Letwory
ad1604e840 .B25.blend -> startup.blend 2010-09-27 23:33:10 +00:00
Campbell Barton
3e4a2c7219 bugfix [#19096] FBX doubly rotated
bug was infact that un-animated bones pose transformations were not exported.
2010-09-24 11:08:55 +00:00
Campbell Barton
afc58c3bea a few bugfixes since porting from 2.4x and from rna renaming. 2010-09-24 09:39:32 +00:00
Campbell Barton
485bd68634 remove 2.4x commented lines 2010-09-24 09:15:24 +00:00
Campbell Barton
6a4b9298c8 patch [#23968] filter_filetypes property to allow operators to filter by file extensions in the file selector
modified the patch to store the string internally rather then an array of allocated string pointers, less hassle with memory allocation.
changed to use fnmatch, so *.foo is needed (not .foo as with the patch)
2010-09-24 07:05:43 +00:00
Campbell Barton
e90ad1d9ba Annoying hack to pretend that an operator and its properties are the same, when passing an operator to an rna function argument which accepts 'AnyType', then pass the properties instead.
This means we can do operator drawing without passing self.properties as an argument.

while this check if quite specific, if this gives problems later on we should probably change operators not to try to mix an operator and its properties, it looks nice to a scripter but internally is not easy to manage.
2010-09-24 03:48:26 +00:00
Campbell Barton
d135e63705 bugfix [#23945] obj export problems 2010-09-22 13:24:21 +00:00
Campbell Barton
12628b197d bugfix [#23935] Exporting to Unity3d .fbx Blender 2.5 2010-09-22 12:36:54 +00:00
Campbell Barton
69d72046e2 fix for error and other minor changes found while looking into bug [#23813]. 2010-09-20 05:01:31 +00:00
Campbell Barton
aaf328dc78 remove redundant []'s for list comprehension's, py2.4+ supports this. 2010-09-19 07:07:14 +00:00
Campbell Barton
868fdd80a2 use is rather then == when comparing against None. 2010-09-18 10:43:32 +00:00
Campbell Barton
5452f335d7 New optional operator function, check(), it takes the same arguments as execute().
This runs after changing a property and allows correcting incompatible options.
 Returning True will redraw the UI.

Currently this is used for setting the write extension when saving files, so changing the image format also corrects the extension.
The same is accessible from python where its used when saving SVG/EPS/PNG files.

This fixes: [#23828] obj export problems, [#23760] Exporting OBJ and filetype ending
also fixed document submission operator.


Now the filename in the file selector is the one used for writing this means we remove the "Save Over" popup which could be overlooked too easily.
Instead display the filename field with red tint, and a note in the tooltip.
2010-09-17 09:27:31 +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
31ddda3bf0 bvh import was broken for non euler-native rotations 2010-09-15 03:33:49 +00:00
Campbell Barton
8d0c01e6e2 keyconfig updates/changes
- use preset subclass with funcs for updating the keyconfig
- keyconfig filenames are used for the UI names as with presets (so separation anymore)
- keyconfig's are stored in the preset dir (scripts/cfg dir removed)
- only the active keyconfig script is loaded
- some bugfixes for saving keymaps
- user interactions no longer saves keyconfigs too, I think this needs to be re-worked.

developer note...
multiple keyconfigs at once are not really needed now that they are stored & accessed directly in python.
for now I left it alone but we could consider to remove this capability in the future.
2010-09-14 16:45:24 +00:00
Campbell Barton
74b2022a82 button to remove presets.
note: this is an option to the add preset operator which is a bit odd but easiest since these classes have all the info needed for removal as well.
2010-09-14 04:58:25 +00:00
Campbell Barton
1a58c6af7e revert 31916, while having the image name and the material name mixed, this is intentional else texface export breaks.
ideally this would only happen in cases where there are more then 1 image so we could avoid ugly names in common cases.
  svn merge -r31916:31915  release/scripts/op/io_scene_obj/export_obj.py
2010-09-14 01:10:20 +00:00
Nathan Letwory
a02e69064d Fix [#23761] OBJ exported materialname wrong
Reported by Reiner Prokein.

Just use the material name instead of concatenating with any image names to it.
2010-09-14 00:45:37 +00:00
Nathan Letwory
4dc52feb70 Fix one more case of z_transparency 2010-09-14 00:30:45 +00:00
Campbell Barton
7c9bf53bf1 bugfix [#23778] obj importing forgets to enable transparent into material 2010-09-13 02:35:59 +00:00
Nathan Letwory
4038ca3e71 Fix import of material with z transp enabled.
Reported by Heikki Lehikoinen in #blender.fi
2010-09-12 20:24:15 +00:00
Nathan Letwory
97964e5766 Fix [#23770] io_anim_bvh reloads the wrong module
Spotted and fixed provided by Tim Baker
2010-09-11 23:13:47 +00:00
Thomas Dinges
9ce624f6f6 Removed a "properties" too much. :/ 2010-09-11 15:33:30 +00:00
Campbell Barton
38669bd5fd - added PNG image export option to UV layout (was only SVG and EPS which was annotying for some users)
- support for non utf8 paths when exporting UV layout.
2010-09-11 10:31:50 +00:00
Thomas Dinges
cd4fb20b73 Patch [#23759] more replace self.properties.foo --> self.foo for bf-extensions/trunk/py/scripts
by Filiciss Muhgue (filiciss). Thanks a lot!

Part 1: Trunk, second part of patch will be committed to Extensions.
2010-09-10 23:39:43 +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
e0aca888de bugfix [#23464] Crash on Tab
OBJ importing edges would produce corrupt meshes because face edges were not created.
2010-09-07 00:32:45 +00:00
Campbell Barton
59ac5b0930 in response to bug [#23701] Edit Mode: unable to bind vertex/edge/face select modes to keys
while not a bug, being able to cycle over vertex/edge/face modes is useful. added an operator to cycle an array, could be used for cycling the active layer or mesh edit mode.
2010-09-06 22:43:09 +00:00
Thomas Dinges
916a466e15 Bugfix for [#23676] Obj Import fails again. 2010-09-04 11:11:37 +00:00
Campbell Barton
0cf0f5a622 rna api
- move: material.add_texture(tex, coords, mapto) --> material.texture_slots.add()
- added material.texture_slots.create(index), material.texture_slots.clear(index)
- texture slot functions also work for lamp and world now.

Other minor changes
- allow rna functions to set FUNC_NO_SELF and FUNC_USE_SELF_ID at once.
- [#23317] Changed some operators' RNA to accept lengths, a modification I made to this patch made it not work as intended, removed this edit so unit buttons appier in the UI for certain operators.
- Sphinx doc gen, 2 columns rather then 3, didnt quite fit in some cases.
2010-09-03 14:53:54 +00:00
Campbell Barton
52cefa4bc1 sphinx doc gen
- use 3 column lists for inherited props, funcs and for references to save on vertical space.
- use the blender version string for the upload path and PDF name.
2010-09-03 09:21:40 +00:00
Campbell Barton
d0c54d3d0e use set as a suffix (matches operators)
- set_frame() --> frame_set()
 - set_context_pointer() --> context_pointer_set()

material adding works for curves and metaballs, new function to remove materials.

materials.link() didnt well fit how this is used elsewhere
 - order matters
 - it can be linked more than once.
 - remove(material), isnt that useful since you need to manage indicies.

... use list style functions instead. materials.append(mat) / materials.pop(index)
2010-09-03 07:25:37 +00:00
Guillermo S. Romero
a8269c8946 SVN maintenance. 2010-09-03 03:30:20 +00:00
Campbell Barton
ddbfb05c84 rna context rename
* context.main & bpy.types.Main --> context.blend_data & bpy.types.BlendData
* context.manager --> context.window_manager
2010-09-02 04:53:05 +00:00
Thomas Dinges
bd79d80b8a Internal Code Renaming:
Donut > Torus
2010-09-01 20:18:31 +00:00
Nathan Letwory
da31d2628e Fix [#23612] OBJ import with imports double textures
Reported by Reiner Prokein

A .obj file can have multiple mtllib statements with the same name. Ensure that only one occurance is saved, so we don't get multiple entries from same material.

Also fix tabs -> spaces
2010-09-01 14:49:34 +00:00
Campbell Barton
39cb1432d8 bugfix [#23285] Exporters not available whel using special characters in path name
- ID properties now suopport non utf-8 strings for their values but not their keys.
- moved utility functions into py_capi_utils.c from bpy_utils and bpy_rna.
- import/export paths have to be printed with repr() or %r, so non utf-8 chars are escaped.
2010-09-01 14:13:48 +00:00
Campbell Barton
a89c526a92 finished moving importers and exporters into python packages (as proposed on the mailing list).
- made operator dir's into python packages
- lazy loading of module which do the actual import and export (faster blender load times)
- general maintanance and small fixes.
- bugfix for exporting x3d materials
- leak fix for exporting 3ds
2010-09-01 12:11:34 +00:00
Campbell Barton
66a4de07e0 excuse the noise, adding type's in format package names. 2010-09-01 03:06:28 +00:00
Campbell Barton
afe5c536fa moving import/export scripts into packages (just moving scripts, need to add __init__.py still, temp break import/exporters) 2010-09-01 03:02:30 +00:00
Campbell Barton
69949d730b added animation data update to the help menu as discussed in last meeting. 2010-08-29 15:40:48 +00:00
Campbell Barton
50bce31dbb rna api changes
- mesh.add_geometry(v, e, f)  --> mesh.vertices.add(tot), mesh.edges.add(tot), mesh.faces.add(tot)
- mesh.add_material(mat) --> mesh.materials.link(mat)

changed material.link so it always adds a material even if it exists in the list, this behavior is good for users but not scripts since it can mess up indicies (some formats may have the same material set twice).
2010-08-26 22:44:05 +00:00
Campbell Barton
f6c323aa42 - move more active properties into their collections:
scene.active_keying_set --> scene.keying_sets.active
  ...same for active_uv_texture. active_vertex_color, active_keyconfig, 

- move mesh.add_uv_layer() and mesh.add_vertex_color() into their collections
  also have them return the newly created layer and dont set the layer active.

  uvtex = mesh.uv_layers.new(name)
  vcol = mesh.vertex_colors.new(name)
2010-08-23 22:16:45 +00:00