Commit Graph

26 Commits

Author SHA1 Message Date
Campbell Barton
5c6eb9c4fa replace curve.curve_2d True/False with curve.dimensions (2D/3D) enum suggested by William. 2009-09-13 17:38:43 +00:00
Campbell Barton
f130f16fef Use curve radius for paths
- use_radius option, off by default for 2.4x files, on by default on new curves.
- curve deform modifiers (think tentacles)
- follow path (parent mode and constraint)
- curve guides
- added back Alt+S to scale point radius
- Mat3Scale and Mat4Scale arithb.c functions to make a new uniform scale matrix.

- TODO, effectors, looks like they have no way to scale from the radius yet.
2009-09-12 16:25:49 +00:00
Campbell Barton
ee768ada68 curve twist
* added new twist method - "Tangent", suggested by Martin.
  the nice thing about this is its stable no matter how you rotate the data, rotation is local to each segment.
* added smooth option that smooths the twisting (before applying user twist), to workaround Z-Up and Tangent's ugly curve twisting. Id prefer not to have this however it makes tangent much nicer. Possibly tangent can be improved some other way and this can be removed.
  A smooth value of 1.0 will iterate over and smooth the twisting by the resolution value of the spline.
* Minimum-Twist method now corrects for cyclic twist by taking the roll difference between first and last, then increasingly counter rotate each segment over the entire curve. Previously it calculated from both directions and blended them.

details
* BevPoints use quats rather then 3x3 matrix.
* added BevPoint direction "dir" and tangent "tan" used only for 3D curves.
* don't calculate BevPoint->cosa, BevPoint->sina for 3D curves.
* split bevel tilt calculation into functions.
* nurbs curves currently don't generate tangents and wont work with tangent twist method.
* some of the use of quats should be optimized.
* smoothing is not animation safe, the higher the smoothing the higher the likelyhood of flipping.
2009-09-11 15:35:30 +00:00
Campbell Barton
850abb3580 curve.textboxes collection access for the UI + minor UI tweaks for poly curves 2009-09-09 00:10:12 +00:00
Campbell Barton
1d0a567023 Curve/Surface Editing
- rename "Nurb" to "Spline" in RNA, eg. bpy.data.curves[0].splines[2].type == 'NURBS'
  from a user perspective spline is a more generic term while Nurb is misleading when used for beziers and poly lines.

- added curve.active_spline property so the python UI can display the last selected curve.
  
- set the active spline when entering editmode (uses first selected spline)
  
- added back Hide Handles as a curve property (removed the global flag), access from the view panel in editmode.
  
- added hide normal option for curve, normal size access for curve and mesh display.

- changing orderU/V, endpoints, cyclic, bezierU/V now work in editmode and calls update functions.

- entering editmode was crashing with text objects

- curve.switch_direction() crashed (own fault from last commit)

- Tkey for tilt was overridden by Toolbar, made Tilt Ctrl+T.

- OBJECT_OT_mode_set check for compatible modes before running - so curves dont try go into paint mode with V key for eg.
2009-09-08 07:35:07 +00:00
Campbell Barton
4c859897f6 - crash fix for setting a curve smooth operator
- added curve attribute use_twist_correction
- added nurb attribute type  - NURBS, POLY, BEZIER
- renamed a number of curve attributes with the use_ prefix.
- UI layout adjustments to only show buttons that are needed and reflect internals for nurbs.
... Note that many of the buttons only apply to NURBS, and all the "V" buttons only apply to surfaces, remove when not needed.
2009-09-07 15:02:43 +00:00
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
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
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
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
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
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
2a055ca728 2.5:
* Added new modifier tab.
* Fixed problems when no object was selected after delete.

* Added initial Armature, Bone, Curve and Font panels, by William Reynish (Billrey). Thanks!
* Small RNA changes

* Commit revision 20240 and 20268 from trunk. ("Mouse wheel zoom lost after rendering.")
2009-05-19 15:38:36 +00:00