Commit Graph

1059 Commits

Author SHA1 Message Date
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
Janne Karhu
b06abafe7a "Fix" for [#23640] particle system partially indifferent to vertex groups
* Some particle vertex groups haven't yet been reimplemented so commented these out in ui.
2010-09-03 05:48:19 +00:00
Campbell Barton
d8d3cc69ef patch from venomgfx, show number of textures assigned to lamps and world in the context panel 2010-09-02 18:13:06 +00:00
Campbell Barton
b2ae9d825c - inconsistent rna names - use 'vertex_group_' as prefix, only ui scripts used this
- change curve offset to be 0.0 for its rest/default value (not 1.0)
2010-09-02 07:00:34 +00:00
Janne Karhu
35535c2cb9 Fix for [#23136] Particle display percentage "forgotten" after render
* The actual problem was that the total amount of particles was rendered at all, since only the displayed percentage was calculated correctly.
* New behavior is that before baking (baking is always done for full % of particles) the display % is used for rendering too for dynamic particles.
* Also added a warning below the display % slider to inform about the situation.
2010-09-02 06:58:54 +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
4ddc61643a Renaming of Cylindric objects after a good proposal by Conz:
http://www.vrchannel.de/blender/cylinder_rename.png

Mesh Tube > Mesh Cylinder
NURBS Tube > NURBS Cylinder
Metaball Cylinder > Metaball Capsule

I know that naming is something not everyone agrees on, but these terms look geometrically correct.
2010-09-01 21:11:33 +00:00
Thomas Dinges
bd79d80b8a Internal Code Renaming:
Donut > Torus
2010-09-01 20:18:31 +00:00
Campbell Barton
5036a9d20c use mix-in classes for import export operators, these define the filepath property and invoke function at the moment. 2010-09-01 02:25:49 +00:00
Thomas Dinges
614eb41c56 RNA Renaming Fixes for particle UI. 2010-08-31 15:12:24 +00:00
Thomas Dinges
a51f31e9a5 Fixes for RNA Renaming in Texture Properties (Volume Material) 2010-08-31 14:54:04 +00:00
Thomas Dinges
a98b93be57 2.5 Fluid UI:
* Required memory is now shown on the Bake Operator, rather as an extra label.
2010-08-31 12:54:17 +00:00
Luca Bonavita
2492c12170 == userprefs: addons ==
- From now on addons bl_addon_info['name'] doesn't need to specifcy also the category, it is put automatically in the addon box title
  In some script category and the category in the title were not matching, this had to be fixed manually.

- The warning icon is at the right of the addon box title, so that it cant disalign the addon name anymore when we have a warning.

- After discussing with Campbell, I've added the field bl_addon_info['api'] where we should specify the Blender API version number the addon is 
compatible with.
  This is certainly useful for clarity, and also I need it in place while preparing the downloadable addons.
  
- Also, bl_addon_info['version'] is now assumed to be a tuple of integers as it is bl_addon_info['blender'].
  Any important text should be placed in the bl_addon_info['warning'] field, not in the script version anymore.
  I'm going to reflect this change in bf-extensions so that scripts won't suddenly break.
2010-08-31 02:41:33 +00:00
Campbell Barton
d59304e8e4 another function moved, should be last of the simple cases.
km.item_from_id() --> km.items.from_id()
2010-08-30 14:48:12 +00:00
Campbell Barton
44eb9f5095 missed this one too
scene.add_keying_set() --> scene.keying_sets.new()
also removed the use_ prefix since argument names, since this is mainly for properties.
2010-08-30 14:33:46 +00:00
Campbell Barton
eab50148e2 - keymap import/export works again (broke with own api changes)
- function renames, move WM functions into collections wm.add_keymap() --> wm.keymaps.new()
  note: new is used for named items in a collection, which return the result.
- Action.get_frame_range() is now a readonly property 'frame_range', floats rather then ints.
2010-08-30 13:50:59 +00:00
Thomas Dinges
52ca27cc45 Patch [#23524] UI cleanup for commit 31587 by Filiciss Muhgue (filiciss).
Thanks!
2010-08-30 07:15:54 +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
24627daabb patch [#23522] UI fixing for recent Python API changes
from Filiciss Muhgue (filiciss)
2010-08-27 22:12:59 +00:00
Mitchell Stokes
44cbc14771 The duplicate Text option in the TexFace panel came from a bad rename of tex -> use_bitmap_text instead of use_image, so I'm adding the use_image (Tex) back to the TexFace panel. 2010-08-27 10:05:33 +00:00
Campbell Barton
b0b787ef38 bugfix [#23534] Custom Properties not showing in OBJECT panel 2010-08-27 06:11:42 +00:00
Campbell Barton
6d195f6195 speedup for pyrna boolean checking.
if bpy.data.objects: ...

Would get loop over the entire collection, instead see if this collection has a single item.
2010-08-27 01:50:50 +00:00
Campbell Barton
9d2b1af0a1 move dopesheet UI template from C to python 2010-08-27 01:23:53 +00:00
Campbell Barton
240b164a87 fix some errors in rigify caused by recent api changes 2010-08-27 00:05:00 +00:00
Mitchell Stokes
9089b68073 The Text TexFace option was listed twice, so i removed one. 2010-08-26 20:03:21 +00:00
Campbell Barton
df04f94b50 bugfix [#23520] Smoke broken - UI doesn't allow particle system selection 2010-08-26 09:30:52 +00:00
Nathan Letwory
fb7221ce21 Patch [#23390] Addition of Author field to user preferences
Contributed by Imran Syed (freakabcd)

Adds a field where the user can put in name/nickname that exporters
then can use to write authoring information, where possible.
2010-08-26 07:19:24 +00:00
Campbell Barton
e7c4a0d53b rna api - replace panel properties bl_default_closed and bl_show_header with bl_options which has 2 flags: 'DEFAULT_CLOSED' and 'HIDE_HEADER'.
this matches operators which also uses bl_options like this
2010-08-26 01:05:37 +00:00
Campbell Barton
cb640d53d9 bugfix [#23497] Keymap editor search box not working 2010-08-25 14:29:14 +00:00
Matt Ebb
5bd7f0112c Fix/addition for recent RNA collections active index changes -
added scene render layers.active property and updated UI file
2010-08-25 07:03:35 +00:00
Campbell Barton
c6a3fb8545 bugfix [#23469] Missing Parent Menu in Pose mode 2010-08-25 02:56:37 +00:00
Campbell Barton
ad405f0cb7 remove rna function template_triColorSet(), was only used in one place and can be done just as well with 3 function calls. 2010-08-25 00:34:40 +00:00
Joshua Leung
22e1ca4134 Fixing KeyingSets breakage from recent RNA renaming madness.
* 'Active' on TimeLine header needs to show choices ALL KeyingSets available (Builtins + Scene-Absolutes), not just the ones in Scene ("Absolute Paths")

* The active KeyingSet setting is needed/used-by for both of these.
2010-08-24 06:52:16 +00:00
Campbell Barton
379fea2d0d move more active variables to be nested in collections. 2010-08-24 04:02:50 +00:00
Campbell Barton
5c604e5524 remove recently added rna function uilayout.prop_search_self() and instead allow collections to be coerced into rna structs when they define a type.
eg:
 row.prop_search_self(scene, "active", "keying_sets", text="")
...becomes
 row.prop_search(scene.keying_sets, "active", scene, "keying_sets", text="")

This is more flexible since it works for other UI functions too.
2010-08-24 03:02:27 +00:00
Campbell Barton
48e34b9956 - pythons 'del somevalue.attr' could crash when used with the rna api (reported by Luca)
eg:
    bpy.context.StringProperty(attr='myprop'); del bpy.context.myprop

- made rna StringProperty/PointerProperty & similar into class methods.

- file selector hide option was inverted
2010-08-24 02:12:09 +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
Campbell Barton
b844792bd5 rename UI function
layout.prop_object() --> prop_search().

The internal name is uiItemPointerR, in python this can translate into into an Object, however this is misleading.
It can be confused with a blender Object and uiItemPointerR can also be used for strings.
2010-08-23 05:47:45 +00:00
Campbell Barton
11228cb403 rna: move metaball.active_element to metaball.elements.active
added rna funcs...
  elem = metaball.elements.new()
  metaball.elements.remove(elem)
2010-08-23 00:57:19 +00:00
Campbell Barton
a60f79daf7 - rna py-api bug fix, a NULL item in a collection was raising an error
eg: mesh.materials[0] 
 ... when this was an empty slot.

- game world mist panel wasnt updated for rna renaming.
2010-08-22 17:23:08 +00:00
Campbell Barton
0267f6a0a3 patch [#23449] RNA renaming bugs
from Jacob F (raccoon)
2010-08-22 16:33:26 +00:00
Campbell Barton
96429a4792 fix for error rna naming 2010-08-22 12:59:13 +00:00
Brecht Van Lommel
de35361b11 Fix python errors in particles render panel and rigid body joint constraint. 2010-08-22 09:18:26 +00:00
Campbell Barton
4ca9a7e9c1 - bugfix [#23407] vertex painting on a mesh with no face segfaults
- removed animsys update values that dont need animating.
2010-08-22 06:31:26 +00:00
Campbell Barton
c2036fda5d fix for changes in recent renaming 2010-08-22 05:45:04 +00:00
Campbell Barton
87eaf57593 fix for errors in constraints and modifiers made when rna renaming. 2010-08-21 07:15:11 +00:00
Campbell Barton
5c3d2b13b8 rna name which wasnt set to change but should have been: eff_group -> effector_group 2010-08-21 06:40:46 +00:00
Campbell Barton
93ffe7d7f1 rna renaming (manual edits) 2010-08-21 04:51:00 +00:00
Campbell Barton
c8c2393310 rna naming error in recent commits 2010-08-20 22:00:23 +00:00
Brecht Van Lommel
0db0b14a52 Fix #23384: python errors in input tab in user preferences. 2010-08-20 10:02:21 +00:00
Campbell Barton
6da7684ca6 fixed [#23400] Unable to import *.3ds/*.obj files with textures
changed some rna names to be more consistant
- use_texture -> use_image, since it sets if 'image' is used.
- use_map_color_diff -> use_map_color_diffuse since diffuse is used elsewhere in the same type.
2010-08-20 08:11:26 +00:00
Campbell Barton
4f5f868a52 rna data path names which are more likely to break animations.
Added an operator "Update Animation Data",
access from the search menu to update drivers and fcurves.
2010-08-20 06:09:58 +00:00
Campbell Barton
097a6ca926 rna remaining that negates values 2010-08-20 02:08:43 +00:00
Campbell Barton
bea1c4fb13 misc rna renaming. 2010-08-19 17:46:00 +00:00
Campbell Barton
fedde2f8e3 rna rename Spline/Curve/Text3D 2010-08-19 17:31:10 +00:00
Campbell Barton
7c98860a0d rna renaming FModifier & GameObjectSettings 2010-08-19 17:10:43 +00:00
Campbell Barton
eee445590a rna naming mainly forBoids 2010-08-19 15:49:30 +00:00
Campbell Barton
486b3cd2f5 more rna renaming for non-animated properties: mainly Texface, Particle & Pointcache changes.
Changed some names when applying.
- render was use_render, changed to show_viewport so call it show_render
- texface shadow was use_shadow_face, changed to use_shadow_cast since this only affects casting.
- transp was alpha_mode, changed to blend_type since its similar to other overlay blending where this property name is used.
2010-08-19 12:51:31 +00:00
Campbell Barton
46e25e7c77 bugfix [#23384] Items disappear after expanding key config items
using dir() on operator properties isnt good practice, better use properties.keys() or properties.items()
2010-08-19 11:32:48 +00:00
Campbell Barton
736edd547b fix for error in recent renaming 2010-08-19 11:04:46 +00:00
Campbell Barton
b00c0526c7 missed this with recent renaming 2010-08-19 10:54:41 +00:00
Campbell Barton
4e3390437e - Properties from base classes are now registered too, this allows class mix-in's to define properties.
An example of how this is useful - an importer mixin could define the filepath properties and a generic invoke function which can run the subclasses exec for each selected file.

- Panels and Menus now skip the property check when registering.

- renamed _idproperties_ to _idprops_ in function names, function names were getting very long.
2010-08-19 10:16:30 +00:00
Campbell Barton
cdd62d6150 missed renaming this 2010-08-18 13:02:59 +00:00
Campbell Barton
399dda68d8 fix errors with recent commits. 2010-08-18 10:42:00 +00:00
Campbell Barton
c04199b3a1 rna naming mainly for Scene/IK/KeyingSet's 2010-08-18 08:58:37 +00:00
Campbell Barton
55ed0f0507 more rna renaming. 2010-08-18 08:26:18 +00:00
Campbell Barton
513a907730 rna rename Bone and Text changes 2010-08-18 07:45:32 +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
54e6ea70c0 rna renaming for Render* structs 2010-08-18 04:10:23 +00:00
Campbell Barton
64347d81c4 rna renaming for 'Brush' struct 2010-08-18 03:56:14 +00:00
Campbell Barton
9784a1169d rna naming: verts -> vertices 2010-08-18 03:42:26 +00:00
Campbell Barton
f32a35fd9d apply rna naming for ToolSettings 2010-08-18 03:24:52 +00:00
Campbell Barton
3bd039eff9 apply rna rename most of the show_*, names. 2010-08-17 17:03:52 +00:00
Campbell Barton
7a31417f50 apply UserPrefs and Theme rna naming changes. 2010-08-17 13:14:41 +00:00
Thomas Dinges
7394e1a312 * Put "Custom Properties" panel to bottom in particle buttons as well. 2010-08-17 09:05:44 +00:00
Thomas Dinges
2e2592127e 2.5 Texture Panels:
* Removed "Plugin" Texture Type from the Interface as it is not implemented in 2.5 atm.
2010-08-17 08:56:47 +00:00
Campbell Barton
b9d99b9c5b apply all rna naming changes for rna_space.c 2010-08-17 07:49:53 +00:00
Campbell Barton
04f619d8af - PyLineSpit() - used to print the filename and line number for internal errors now works when executing class functions in a module.
- replaced PySys_GetObject("modules") with PyImport_GetModuleDict()
- use defaults for keymap import/export rather then setting the same value every time from the UI scripts.
2010-08-14 05:33:20 +00:00
Campbell Barton
ae6a632534 fix for error in world buttons when the world was None 2010-08-13 22:35:13 +00:00
Campbell Barton
79487cca47 bugfix [#21807] Import Key Configuration problems 2010-08-13 18:48:33 +00:00
Brecht Van Lommel
ed36b00e36 Fix #23297: python error caused empty brush panel in the image editor. 2010-08-13 17:13:07 +00:00
Thomas Dinges
76e1773548 2.5 User Interface / UI Scripts
* Fixed some panel ordering after recent register changes.
* Placed "Custom Props" to the bottom again, where possible

This fixes [#23171] Material context is messed up.
2010-08-12 19:36:10 +00:00
Brecht Van Lommel
dc3ddd518b Fix #23269: inconsistent naming of recalculate roll in menus compared to
operator popup menu.
2010-08-12 16:15:50 +00:00
Campbell Barton
ab8ccaa709 python declarative UI
- remove XML testing feature
- add 2 modules: bpyml - generic, bpyml_ui - blender spesific. nothing uses these now.

==bpyml_ui module==
defines BPyML_BaseUI and its draw() function which uses the bpyml member of the class instance self.draw_data & self.draw_header_data.

This way declarative ui is opt-in and easy to use by using BPyML_BaseUI as a mix-in class.

==bpyml module==

This module translates a python like XML representation into XML
or simple python blender/ui function calls.

    sometag(arg=10) [
        another(),
        another(key="value")
    ]

# converts into ...

    <sometag arg="10">
        <another/>
        <another key="value" />
    </sometag>
2010-08-11 15:11:30 +00:00
Campbell Barton
d739a1788d small edits to text editor from writing a python editor extension.
- rename TextLine.line -> body, ConsoleLine.line -> body
- minor speedups when setting the body text, also re-allocate console lines if they are < half the length.
- added option to highlight current line in the text editor.
2010-08-11 05:21:43 +00:00
Campbell Barton
7c0216c7a0 minor adjustments to python scripts to make them easier to run outside of blender. 2010-08-10 18:21:33 +00:00
Campbell Barton
c026b8066d fix from recent poll() edits. 2010-08-09 08:18:49 +00:00
Campbell Barton
a6f13f9d7b poll() as a python '@staticmethod' was too limiting and didnt allow useful base class poll functions in many cases.
now rna functions that dont have a 'self' are automatically assumed '@classmethods'.

de-duplicated poll functions and made some minor tweaks too.
2010-08-09 01:37:09 +00:00
Campbell Barton
015c23b86d display addons sorted by category then name (remove old commented code which loaded the modules for real) 2010-08-08 13:45:16 +00:00
Campbell Barton
057aac553b Experemental XML UI, define panels/menus/headers which load at startup like python scripts.
- 2 panels implimented in properties_render_test.xml (Render Dimensions and Stamp)
- only enabled in debug mode.
- poll() functions are not supported yet.
- as stated above experemental, we'll see if this is at all useful, remove if not.
- XML could be replaced with JSON or YAML.
2010-08-07 16:21:15 +00:00
Brecht Van Lommel
89d30de7e3 Fix missing texture face panel. 2010-08-06 17:04:31 +00:00
Campbell Barton
55676442db reverted r31104 with recent commit. 2010-08-06 15:36:38 +00:00
Campbell Barton
acca04bf33 remove narrow ui feature
- re-arranged UI in a way that gave far too much vert scrolling.
- was added all over for simple things like making text="", layout engine should handle this.
- Ton and Brecht are ok with removing this now. Ton would like to work on the layout engine to make it better support these cases.
2010-08-06 15:17:44 +00:00
Luca Bonavita
17bd603cbc == Area lamp UI ==
Fixes [#23152] Area light with noshadow is affected by rayshadow sampling setup (Kino Bug Reporting Sprint)
https://projects.blender.org/tracker/index.php?func=detail&aid=23152&group_id=9&atid=498

This moves the samples field so that it is visible in area lamps when noshadow is clicked, because acording to Brecht: "area lights also use the 
samples for sampling the form factor, but they are in the shadow panel, probably for area lights that button should be moved"

Also modified the sampling buttons so that only those depending on the sampling method are below the sampling method selector, while the general 
ones come first so it's immediate to see which ones are depending on the sampling method.

Also, formatted so that options for constant jitter appear below that button, so it's faster to setup.
Same for QMC which has the threshold field just below the QMC selector, and not wide as the column.

This still uses "if wide_ui else", in IRC there has been discussion about removing it but this will be done but who is in charge of it at due 
time.
2010-08-06 14:36:39 +00:00
Campbell Barton
14fe11bd81 bugfix [#19525] Curve modifier moves mesh geometry first
more of a request then a bug but shows up a strange limitation with curve deform modifier,
The mesh bounding box would set the deform axis start/end to map the deformation of the curve to. This means it ignored offset in the object location and object data location (you could use a dummy vertex to trick it).

Old files wont change, added an option (next to stretch), called 'Bounds Clamp', old files have this behavior but newly made curves have it disabled.
Double checked this gives useful results with stretch on/off and negative axis.
2010-08-06 08:27:07 +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
4f71435bbf some fixes for the poll() function from last commit.
Martin: forgot to mention, had to remove the use of super() in poll functions for netrender. commented with FIXME.
2010-08-05 21:58:57 +00:00
Campbell Barton
163f6055d2 bugfix [#23182] Using self.report() inside poll() gives crash
poll() function is now a static method in python, this is more correct, matching C where the operator is not created to run poll.


    def poll(self, context): ...

is now...

    @staticmethod
    def poll(context): ...

Pythons way of doing static methods is a bit odd but cant be helped :|

This does make subclassing poll functions with COMPAT_ENGINES break, so had to modify quite a few scripts for this.
2010-08-05 16:05:30 +00:00
Brecht Van Lommel
25f1741517 Fix sculpt 3d view menu showing in two columns. 2010-08-04 15:59:15 +00:00
Brecht Van Lommel
8b8c280755 Fix #23157: missing sculpt symmetry and appearance panels after python
registration changes.
2010-08-04 15:56:18 +00:00