Commit Graph

43 Commits

Author SHA1 Message Date
Thomas Dinges
04bbb6a0c7 2.5: Layout Python Files:
* Code cleanup.
* Made some files match the code guidelines, should be all now.
Please everybody use them: http://wiki.blender.org/index.php/Dev:Py/Blender2.5/Layouts/Guidelines
* Made polls and header_draw functions as small as possible. 

* Small fixes here and there.
2009-09-01 00:33:39 +00:00
Campbell Barton
fe0dfc2315 use '' for enums rather then "" 2009-08-22 08:48:01 +00:00
Brecht Van Lommel
990dcd0f7f 2.5:
* Split Info and User preferences into two separate spaces.
* Renamed Buttons Window to Properties also in RNA identifiers.
2009-08-18 12:58:51 +00:00
Matt Ebb
1b26fe50c3 * More lamp tweaks, meant to commit this last night 2009-07-30 13:56:39 +00:00
Thomas Dinges
d56466747d 2.5 Part 3 of Layout Code Cleanup:
* More cleanup to match new coding guidelines.
http://wiki.blender.org/index.php/Dev:Py/Blender2.5/Layouts/Guidelines

* Replaced some if's with proper elif's.
* Removed some unnecessary code.
Note: Please don't use inconsistent assign names like colsub, subcol1 etc. anymore!
2009-07-30 10:11:19 +00:00
Matt Ebb
198d996934 * a few more small lamp panels tweaks 2009-07-29 14:17:15 +00:00
Matt Ebb
2ee51efd6b * Reverted some superfluous button alignment. The
'Align' should not be overused, it gets quite ugly (and 
loses communication impact) when used between 
buttons of different types. Dependencies should be 
shown via layout and greying out.

These lamp panels still needs some cleaning up too...
2009-07-29 13:33:14 +00:00
Thomas Dinges
f4f3a9b08b 2.5 Lamp Buttons:
* Some layout tweaks and fixes by nudelZ.
2009-07-28 11:04:08 +00:00
Thomas Dinges
e52dbadcff 2.5 Lamp Buttons:
* Layout Fix for shadow panel.
2009-07-28 05:26:01 +00:00
Campbell Barton
fe881aa7ad - lamp UI was missing y samples for rectangle area lamps
- returned ID types from RNA funcs didnt get their ID's assigned which crashed in some cases (still not working for members of ID types).
- ob.create_remder_mesh() wasnt assigning any materials.
2009-07-28 01:06:56 +00:00
Thomas Dinges
09fd0a5e48 2.5 Part 1 of Layout Code Cleanup:
* Again, some layout code cleaning. 
* Made assignments more consistent. 

I started to write code guidelines in the wiki:
http://wiki.blender.org/index.php/LayoutFiles-Code_Guidelines

Matt/William: You are welcome to change them or add new infos, I will continue on improving them as well in the next few days.
2009-07-27 20:39:10 +00:00
Thomas Dinges
b666f55e0e 2.5 Layout files:
* Removed __idname__ from all panels. 
Note: Operator classes still need that id. Don't remove it there.
2009-07-26 16:31:48 +00:00
Campbell Barton
117fdd8072 * projection paint options in the toolbar
* renamed  __no_header__ -> __show_header__
2009-07-26 03:54:17 +00:00
William Reynish
580b527854 Various layout tweaks. Improved game buttons, made minor adjustments to lamp, scene and fluids. 2009-07-23 14:35:20 +00:00
Brecht Van Lommel
6dfec894f9 2.5: Lamp button layout improvements by nudelZ. 2009-07-21 01:52:05 +00:00
Brecht Van Lommel
1f4fa869e4 2.5: RNA & UI
* Revert lamp sampling/buffers change. The right enum items should
  be defined in RNA, not the layout, so that it works in outliner,
  python api too.
* Also changed type popup to radio buttons again, and removed the
  icons. This is more consistent, and I don't think it's a good idea
  to start using icons for these things, too much clutter.

* Replace Mesh with Normals panel in the mesh buttons.
* Remove Material panel from mesh buttons.
* Added name fields for shape/vgroup/vcol/uv.
* Spacing tweak to Object and Bone names.

* Fix some naming conflicts in RNA, with "name" and "type" properties
  being defined twice in the same struct.

* context.scene.tool_settings -> context.tool_settings.
2009-07-21 00:55:20 +00:00
Thomas Dinges
c72064272f 2.5 Lamps:
* Replaced RNA ENUM hacks for "shadow method" and "shadow_ray_sampling_method" with modifications in the layout file.
2009-07-20 20:34:14 +00:00
William Reynish
e43c425e8c Ok, first commit! Hope this goes ok.
Added the Turbidity parameter to the Sky panel in lamp buttons, since it affects sky as well as atmosphere.
2009-07-20 17:59:45 +00:00
Campbell Barton
587d408f61 patch from William
Cleaned up force fields panel, as well as the other fixes (sculpt, lamps)
2009-07-20 16:39:16 +00:00
Thomas Dinges
a74edc0caf 2.5 Buttons:
Small fixes:

* Removed Particle System Context header
* Lamp Type is a menu now, better for small displays.
2009-07-10 19:11:22 +00:00
Brecht Van Lommel
d091856486 2.5: Buttons Window
* Fix poll() callback changes in recent commit, note that these have
  to work with pinned context too.
* Hide header for context panels in py layout.
* Don't jump back when collapsing a panel, allow the view to be
  over some empty space until you scroll back.
* Fix follow context icon, order had to be reversed in icon file.
* ID template now has icon as part of browse button instead of
  outside the buttons.
2009-07-09 19:45:27 +00:00
Thomas Dinges
403dc0f25a 2.5 Buttons:
* Fixed some Bugs from Commit 21458. 

* Show Preview Render only when there is an active id block. 

* Some Code Cleanup (especially in polls). Please try to keep it clean ;-)
2009-07-09 16:09:44 +00:00
Campbell Barton
4a3f56a29d patch from William, panel names need to be unique 2009-07-09 09:42:34 +00:00
Campbell Barton
9f592e4f62 Patch from William
"moving the ID browser into its own panel. Eventually these panels should loose their headers to distinguish them from other, normal panels. Also a few other fixes for bones and armature panels."
2009-07-09 09:07:25 +00:00
Brecht Van Lommel
272fac8fd6 UI: some API functions don't require explicit context passing anymore. 2009-06-23 00:19:10 +00:00
Brecht Van Lommel
5ea992df98 UI:
* Fix context.cloth, was not being set correct.
* Fix errors with context pinning, scripts should
  not assume context.object to be there.
* Always show preview even if e.g. the material is not
  set, to keep ID buttons from jumping while you're
  using them.
2009-06-18 14:20:25 +00:00
Thomas Dinges
c3c38155ad 2.5 Buttons:
* Added more material buttons by William. Thanks.
I made some minor adjustments and added Specular Shader Model RNA. 

* Code cleanup and some consistency tweaks of button files.
Notes: Preview render now only shows up when there is an active world, material, texture or lamp.
* Made sure initial panels with ID Datablocks are shown, even when no block is active.
2009-06-13 21:22:21 +00:00
Brecht Van Lommel
eecf7722b6 UI Buttons:
* Context now allows pinning a datablock, independent of
  selection.
* Initial ID browse buttons for most buttons tabs.
* Browsing from world to texture now displays world textures
  again, but is a bit of a hack, not sure there is a right
  way to do this.
* There's a button to switch between active materials and
  textures now, only temporary though.
* There's some code to put context part in own region,
  disabled still because it doesn't work that well yet.
2009-06-07 13:36:12 +00:00
Thomas Dinges
349f5df595 2.5 Preview render
* Added Preview panel to the lamp buttons.
2009-06-07 11:42:13 +00:00
Brecht Van Lommel
dc7d0ef474 UI:
* Add Lamp Fallof Curve and Texture Color Ramp panels.
* Use button space context data.
* A few other minor python layout script updates.
2009-06-03 00:17:35 +00:00
Thomas Dinges
a01fa8b581 2.5 Buttons
* More greying out tweaks by William Reynish and myself.
2009-05-29 09:53:46 +00:00
Thomas Dinges
ef01c5bf0a 2.5 Buttons Code:
* Code Cleanup.
* Tiny layout changes.
* Added proper context for bone, curve, mesh and text objects. 

* Fixed Sun/Sky context.
2009-05-24 12:37:55 +00:00
Thomas Dinges
8013f6522e 2.5 Buttons:
* Some minor layout cleanup.
2009-05-21 11:10:34 +00:00
Matt Ebb
b495e544a8 * removed some arbitrary range limits on property values
* turned some slider UI controls back into number fields

Note: Sliders should only be used when representing a property that's 
conceptually a percentage or ratio. For arbitrary numbers, use a number field.

For example, a lamp's energy can theoretically be anything - 0.1, 3.5, 125.0, it 
doesn't matter - it's just a number, not a percentage. So this should be a 
number field.
2009-05-21 07:40:43 +00:00
Thomas Dinges
34aaa18af2 2.5 Buttons:
* More button tweaks by William Reynish. Thanks!
2009-05-20 16:24:04 +00:00
Brecht Van Lommel
40ae17d2f6 UI
* Fix buttons jumping around when resizing and zoom. Part of this was
  adding a tiny a 0.001f offset in UI_view2d_view_ortho, otherwise the
  rounding is unpredictable (used to be 0.375f, but that was disabled).
* Fix various issues with zooming, panning panels.  V2D_LOCKOFS_X/Y is
  now taken into account in more places in the view2d code, to avoid
  zooming into the center or panning out of the view.
* Remove "Free" align mode in buttons window (it's not really useful).

* View3D/Graph/Image editors now use the same PanelType system as the
  buttons window, means some deprecated panel code could be removed.
* Some small visual tweaks for panels.
* View 2D Reset operator (Home key), to reset zoom and panning for panels.

* Added argument to set number buttons as sliders (slider=True for itemR).
* Ignore labels for button alignment (doesn't look right).
* Fix some use of context.main in py scripts, should get data from active
  object instead.
* Fix autotexspace -> auto_texspace in py script.
2009-05-19 17:13:33 +00:00
Thomas Dinges
120ef02027 2.5 Buttons:
* Cleanup of scene, lamp and camera panels.

* Small RNA lamp changes.
2009-05-15 16:24:08 +00:00
Brecht Van Lommel
b4d46e5ded UI: Layout Engine
* Buttons are now created first, and after that the layout is computed.
  This means the layout engine now works at button level, and makes it
  easier to write templates. Otherwise you had to store all info and
  create the buttons later.
* Added interface_templates.c as a separate file to put templates in.
  These can contain regular buttons, and can be put in a Free layout,
  which means you can specify manual coordinates, but still get nested
  correct inside other layouts.

* API was changed to allow better nesting. Previously items were added
  in the last added layout specifier, i.e. one level up in the layout
  hierarchy. This doesn't work well in always, so now when creating things
  like rows or columns it always returns a layout which you have to add
  the items in. All py scripts were updated to follow this.

* Computing the layout now goes in two passes, first estimating the
  required width/height of all nested layouts, and then in the second
  pass using the results of that to decide on the actual locations.

* Enum and array buttons now follow the direction of the layout, i.e.
  they are vertical or horizontal depending if they are in a column or row.
* Color properties now get a color picker, and only get the additional
  RGB sliders with Expand=True.
* File/directory string properties now get a button next to them for
  opening the file browse, though this is not implemented yet.
* Layout items can now be aligned, set align=True when creating a column,
  row, etc.
* Buttons now get a minimum width of one icon (avoids squashing icon
  buttons).

* Moved some more space variables into Style.
2009-05-15 11:19:59 +00:00
Thomas Dinges
2df94626c4 2.5:
* Renamed Local Lamp to Point Lamp, as discussed in IRC.
* Small layout changes to the lamp panel.
2009-05-14 19:41:45 +00:00
Thomas Dinges
c32a3bd73b 2.5 Buttons:
*Added initial material buttons (Material Color, Ray Transparency, Ray Mirror, Subsurface Scattering)
Only works for default material atm. 

*some layout tweaks to the lamp panels.
2009-05-10 12:12:05 +00:00
Thomas Dinges
acb4d58120 2.5 Buttons:
* Added more lamp buttons and cleaned up the layout
2009-05-09 10:33:06 +00:00
Thomas Dinges
5fa80e74a1 2.5 Buttons:
* More Lamp options: Shadow and Spot (WIP, incomplete)
* Added initial lattice panel
2009-05-08 21:52:57 +00:00
Thomas Dinges
bf2daa56c1 2.5 Buttons:
* Split the buttons_data.py into separate files, this makes it easier to maintain them. 
Notes: Added an extra modifier file, because modifiers are for different object types.

* Added basic lamp buttons and Sun/Sky settings.
As the camera buttons they only work for the default light object for now.

* Some minor code cleanup
2009-05-08 18:17:57 +00:00