Commit Graph

47 Commits

Author SHA1 Message Date
William Reynish
be7eeb888a Sculpt UI
*Changed Sculpt Modes Flip Direction to an enum so that you can explicitly choose Add or Subtract.
*Expanded the sculpt tool list. I realize Nicolas has a longer term plan for the brush tools, but at least now it's useable again.
2009-09-13 19:37:51 +00:00
William Reynish
bfe57bb085 Added repeat operations to the toolbar. 2009-09-10 18:58:31 +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
Matt Ebb
fab4bf0816 Re-commit previous brush ui changes.
Strangely seemed to get reverted in jahka's rev. 22861
2009-09-08 03:29:28 +00:00
Thomas Dinges
f4f51efa51 2.5:
* Use new Pressure Size Icons, old ones were still defined in the py file.
2009-09-07 11:59:05 +00:00
Nicholas Bishop
952fa6d1c1 2.5/Paint:
* Fixed some bad UI pointed out by letterrip. People had made some quite bad changes (duplicating buttons, adding UI for non-existent features, even deleting UI for existing features!)
2009-09-06 16:58:14 +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
Janne Karhu
874d38eeb4 Point cache editing:
- Baked point caches for particles, cloth and softbody can now be edited in particle mode.
	* This overwrites the old cloth/sb cache editmode editing.
	* The type of editable system is chosen from a menu.
	* For particles the current particle system and it's current cache are used.
- Currently this only works for caches that are in memory, but some automatic conversion from disk to memory and back can be implemented later.
- All tools from hair editing can't be applied to point caches and are hidden in the tool panel and specials menu. Some functionality like subdividing paths can be later implemented in a slightly different way from how it works for hair.
- Code is not yet optimized for speed, so editing might be slow sometimes.

Known issues:
- Cloth doesn't update properly while in particle mode, due to the way cloth modifier currently works. Daniel can you check on this?
- As "particle mode" is not only for particles any more some other name would be in place?
- Better icons are needed for the path, point, and tip-modes as the current icons from mesh edit mode are quite misleading.
- Direct editing of point velocities is not yet implemented, but will be in the future.

Other changes:
- Hair editing doesn't require a "make editable" button press any more.
- Multiple caches in single particle system disables changing emission properties.
- Unified ui code for all point cache panels.
	* Defined in buttons_particle.py and imported for cloth, smoke & softbody.
- Proper disabling of properties in ui after baking point caches. (Daniel could you please make needed disable code for smoke panels as their functionality is not familiar to me.)
- Hair weight brush has been removed. Once hair dynamics is re-implemented I'll code a more useable alternative to the functionality.

Bug fixes:
- Unlinking particle settings crashed.
- Deleting the active object with particles in the scene crashed.
- Softbody didn't write point caches correctly on save.
2009-08-29 15:20:36 +00:00
Matt Ebb
208f6daa1d * Tweak texture paint view3d settings, make projection paint options dependent on the tool, rather than (weirdly) the tool's availability dependent on projection paint settings. 2009-08-28 02:24:14 +00:00
Campbell Barton
fe0dfc2315 use '' for enums rather then "" 2009-08-22 08:48:01 +00:00
Campbell Barton
46fb2d37e3 have texture paint use the curve rather then the falloff setting (falloff gave ugly center area of 100% opacity) 2009-08-21 07:19:06 +00:00
Nicholas Bishop
589ea76833 2.5/Paint:
* Updated texture paint UI for stroke settings.
* Removed duplicate brush blend types, just use the ones defined in imbuf instead
2009-08-21 06:23:38 +00:00
Nicholas Bishop
2881393fbb 2.5 Paint:
* Added airbrush and airbrush rate options to paint stroke. Works for sculpt, vertex paint, and weight paint.
2009-08-21 00:46:36 +00:00
Nicholas Bishop
a54af8e3ba 2.5 weight paint:
* Refactored weight paint to use the new stroke code, now does smooth stroke and stroke spacing.

Note: weight paint is failing to free it's MocNodes in 2.5, someone might want to look into that
2009-08-20 15:25:12 +00:00
Nicholas Bishop
7dfc1317ac 2.5/Paint:
* Converted vertex paint to use the new stroke system. Now supports the same smooth stroke and stroke spacing as sculpt mode.
* Refactored the paint cursor a bit, just sculpt for now but other modes soon.
* A couple warning fixes
2009-08-20 05:13:07 +00:00
Nicholas Bishop
ca20107edb 2.5/Sculpt:
* Added UI for rake mode
2009-08-18 01:39:49 +00:00
Nicholas Bishop
a5da26f59d 2.5/Sculpt:
* Added UI for brush stroke. Contains for now spacing and smooth stroke
* Removed Sculpt UI for airbrush -- doesn't do anything in sculpt mode
* Improved smooth stroke by using float instead of int precision, so smooth stroke is even smoother now
2009-08-18 01:19:00 +00:00
Nicholas Bishop
21ca9a6049 2.5 paint:
* Fixed texture paint UI
2009-08-17 15:17:45 +00:00
Nicholas Bishop
b0fe88117b 2.5 Paint:
* Updated the brush selection UI to make the slots less apparent; adding and removing brushes now directly adds and removes slots.
2009-08-17 15:05:18 +00:00
Campbell Barton
97db057a4c paint toolbox layout grouping 2009-08-17 07:35:23 +00:00
Nicholas Bishop
73ea51eccd 2.5/Sculpt:
* Some UI fixes suggested by broken, removed specialized Add Brush menu in favor of standard ID add button, also put a separator between brush selection and brush properties.
2009-08-17 03:16:14 +00:00
Nicholas Bishop
9d2d3a8be7 2.5 Paint:
* Converted vertex paint and weight paint to use the new Paint type
2009-08-17 02:49:31 +00:00
Nicholas Bishop
afa0fa5e29 2.5 Sculpt:
* Added a new Paint type in scene DNA. This is now the base struct for Sculpt.
* The Paint type contains a list of Brushes, you can add or remove these much like material and texture slots.
* Modified the UI for the new Paint type, now shows the list of brushes active for this mode
* Added a New Brush operator, shows in the UI as a list of brush tool types to add
* Made the sculpt tool property UI smaller and not expanded, expectation is that we will have a number of preset brushes that will cover the basic sculpt brush types

TODO:
* Vertex paint, weight paint, texture paint need to be converted to this system next
* Add brush presets to the default blend
2009-08-16 19:50:00 +00:00
William Reynish
2cc64a95b5 Minor adjustments to particle buttons and particle brush panels. Use only two rows in lists, and added greying out. 2009-08-16 11:25:18 +00:00
Thomas Dinges
2b3d2b72ea 2.5 3DView:
* Renaming of edit mode context types. 
* Code cleanup.
2009-08-15 20:21:49 +00:00
Thomas Dinges
0ce5163cc0 2.5 3D_View:
Patch [#19031] (2.5) python menus for the view3d header
by Lorenzo Pierfederici (lento). Thanks!

* Added CTX_data_mode_string() to find out in which mode we're in.
* Added some "select" menus as a test.

This patch makes it basically possible to wrap the 3D View menus to python.
2009-08-15 19:40:09 +00:00
Nicholas Bishop
c6e041f125 2.5/Paint modes:
* Moved brush curve preset operator out of sculpt to paint_utils
* Added a button to the curve panel to set the preset
2009-08-14 04:45:29 +00:00
Nicholas Bishop
c1ca2ab5dc Sculpt/2.5:
* Added toolbar UI for setting "anchored" mode
* Added a "persistent" mode for the layer brush; basically you can keep sculpting on the same layer between strokes when this is on. There's a button to reset the base so you can add another layer on top of that, and so on.
This feature was suggested by Blenderer on BA, thanks!

Note, I think these options could use better names in the UI, but I couldn't really think of anything very descriptive, suggestions welcome
2009-08-09 17:21:40 +00:00
Thomas Dinges
c4c0753dcc 2.5 Button Files:
* Cleanup of smoke and texture files to match guidelines. 
* Made "Curve" Panel in Toolbar Closed per default.
2009-08-08 17:21:34 +00:00
Thomas Dinges
039d4d427b 2.5 3D View Toolbar:
Brush Panel:
* Separated the code for different modes, easier to maintain.
* Only settings which are used in the current paint mode are shown now.
2009-08-07 19:16:59 +00:00
Thomas Dinges
1311b2f78b 2.5: 3D View Toolbar:
* Added some greying out and hiding for disabled/non available settings.
* Some layout tweaks.
* Added "Flip Direction" for Sculpt, this is the "Add, Sub" Option from 2.49, this time as a boolean. Off = Add, On, Sub.
2009-08-07 09:45:48 +00:00
Campbell Barton
07ed542187 pedantic changes to python UI scripts
- SOFTBODY -> SOFT_BODY
- Use getattr() with enum value to get the modifier function rather then a lot of elif's
2009-08-06 13:15:23 +00:00
Thomas Dinges
08d4b96317 2.5 3DView:
* Removed redundant color picker panels from the Properties Panel.
* Deleted some old C Buttons Code. (Background Image, Weight Paint, View and the Color pickers.)
* Added missing Particle Mode Buttons into the Toolbar. They need a check if the system is editable or not. 
* Pose Mode Panels in Toolbar were not working due to wrong context. Fixed.
2009-08-02 16:44:32 +00:00
Campbell Barton
eb40d8ef0f render api utility function to initialize a render layer from an image rather then loading through python.
lay = result.layers[0]
	lay.rect_from_file("somefile.png", part.x, part.y)

If the source image is bigger then the render layer x/y offsets can be used to choose the part of the image use.
2009-07-27 18:50:10 +00:00
Thomas Dinges
3e5f46ebf9 2.5 Various fixes:
* Small code and layout cleanup in 3DView Side Panels.
* Added missing redraw notifier for changing world datablock and cursor location.
2009-07-26 08:53:23 +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
756488fbe2 2.5: Painting
Various fixes for painting, sculpting and particle edit, still
much to be done...

* Move RNA paint and sculpt structs into rna_sculpt_paint.c,
* Added Particle Edit RNA.
* Some tweaks to existing Paint RNA.

* Put texture paint and particle edit object in context.

* Fix some errors in the brush layout, properly doing None
  checks, fixing some wrong property identifiers.
* Added tool enum for texture paint and particle edit in panels.

* Allow editing brush textures in the texture buttons, still with
  a stupid toggle, ideas for how to make the connection better are
  welcome.
2009-07-25 22:31:02 +00:00
Thomas Dinges
5815cfd53b 2.5 Smooth/Flat Shading:
* Added operators in Toolbar for Object Mode too. (Mesh only).
I think it should be there too, going into edit mode and select all just to change the shading of the whole mesh is not good. ;-)
2009-07-25 10:42:23 +00:00
Joshua Leung
020a34b9de 2.5 - Restored most of the remaining Armature/Pose Operators
* Armature:
- added: fill, merge, separate
- renamed: duplicate, align

* Pose:
- added: apply pose

* Armature Edit menu has been converted to use operators/layout now
2009-07-25 05:11:28 +00:00
Thomas Dinges
4f3ee918c1 2.5 3DView Toolbar:
* Some Code and tiny layout cleanup.
2009-07-24 21:01:41 +00:00
William Reynish
87f3ba8a80 Toolbar
Improved the brush tools UI and added a bunch of brush controls. There seems to be some RNA magic missing for texture paint to work, so that's empty for now. Added tablet pressure buttons, which needs a new icon.

Added a bunch of tools in a categorized fashion for all edit modes. Need to figure out what to do for vert/edge/face specific tools - perhaps it could detect the mode setting and show most appropriate tools for each mode.
2009-07-24 11:14:59 +00:00
William Reynish
5cd5e85143 Cleaned up logic buttons in logic space slightly.
Moved Shade Smooth/Flat from Mesh obdata panel to tools area. These kinds of operator tools aren't really allowed in the buttons window anymore - whole point of new tools area :)
The only operators that are allowed in buttons window are things that act on the RNA fields, like add/remove buttons for adding vertex groups etc.
2009-07-21 09:35:39 +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
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
Campbell Barton
a705f64245 python access to operators now hides the _OT_ syntax, eg. SOME_OT_operator -> some.operator
this works for the calling operators from python and using the RNA api.

bpy.ops.CONSOLE_exec() is now bpy.ops.console.exec()

eg.
split.itemO("PARTICLE_OT_editable_set", text="Free Edit") becomes... split.itemO("particle.editable_set", text="Free Edit")

For now any operator thats called checks if its missing _OT_ and assumes its python syntax and converts it before doing the lookup.

bpy.ops is a python class in release/ui/bpy_ops.py which does the fake submodules and conversion, the C operator api is at bpy.__ops__

personally Id still rather rename C id-names not to contain the _OT_ text which would avoid the conversion, its called a lot since the UI has to convert the operators.
2009-07-17 12:26:40 +00:00
Brecht Van Lommel
3082d12630 2.5:
* Rename OT_duplicate_add, to OT_duplicate. Also fixes warning
  print since I forgot to do this in the toolbar for MESH.
2009-07-08 21:41:35 +00:00
Ton Roosendaal
d44b341be6 2.5
Python definition of view3d context-depending toolbar. Feel free to edit
it into anything useful. :)
2009-07-02 11:24:27 +00:00