Commit Graph

1482 Commits

Author SHA1 Message Date
Daniel Genrich
26ec00d567 First version of fields panel.
Please keep in mind: I am no python expert and may have some ugly layout-tricks in this file. GUI designed by nudelZ. 
Commit approved by William ;-)
2009-07-19 11:28:43 +00:00
Nicholas Bishop
036c0012e6 Sculpt/2.5:
* Added pointer RNA for the sculpt brush
* Converted sculpt settings panel (in the NKEY area) from C to Python
* For Python UI, needed context for whether sculpt is enabled or not; discussed this with Brecht and added sculpt_object to scene context
2009-07-19 01:55:21 +00:00
Campbell Barton
d7564761c0 operator macro playback (run operator reports in the console)
- reports can be selected with RMB, Border (bkey) and (de)select all.
- delete reports (X key)
- run operators in the console (R key)
- copy reports (Ctrl+C), can be pasted in the text editor an run with alt+p

Details
- Added "selected_editable_objects" and "selected_editable_bases" to screen_context.c, use the scene layers, this was needed for duplicate to run outside the 3D view.
- RNA_property_as_string converted an array of 1 into "(num)" need a comma so python sees it as a tuple - "(num,)"
- add flag to reports, use for seletion atm.

opens a new world of context bugs :)
2009-07-19 00:49:44 +00:00
Campbell Barton
7018af51cd removed BeOS dirs (BeOS isn't supported anymore)
removed unneeded includes for the console.
2009-07-18 05:26:47 +00:00
Campbell Barton
ffdd2d12ce patch from oxben (Benjamin)
* fixes two typos in the material buttons: "Recieve" -> "Receive"
* adds a missing preference in the User Preferences view: "Rotate Around Selected"
2009-07-18 04:09:23 +00:00
Campbell Barton
802ca7f639 patch from William, adds some rna user prefs and adjusts prefs UI. 2009-07-17 12:35:57 +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
Matt Ebb
1ef7293585 Colour Management
- 1st stage: Linear Workflow

This implements automatic linear workflow in Blender's renderer. With the 
new Colour Management option on in the Render buttons, all inputs to the 
renderer and compositor are converted to linear colour space before 
rendering, and gamma corrected afterwards. In essence, this makes all 
manual gamma correction with nodes, etc unnecessary, since it's done 
automatically through the pipeline.

It's all explained much better in the notes/doc here, so please have a look:
http://wiki.blender.org/index.php/Dev:Source/Blender/Architecture/Colour_Management

And an example of the sort of difference it makes:
http://mke3.net/blender/devel/rendering/b25_colormanagement_test01.jpg

This also enables Colour Management in the default B.blend, and changes the 
default lamp falloff to inverse square, which is more correct, and much 
easier to use now it's all gamma corrected properly.

Next step is to look into profiles/soft proofing for the compositor.

Thanks to brecht for reviewing and fixing some oversights!
2009-07-17 02:43:15 +00:00
Campbell Barton
70f6255433 bpy rna
Calling rna functions with invalid keywords, too many keywords and too many args would fail silently
- now raise an error with invalid keywords and a list of valid ones, raise an error when too many args are given.
- calling rna functions would alloc a ParameterList each time, changed to use a stack variable (2 pointers and an int).
- store the number of parameters ParameterList
- python exception types were wrong in many cases, (using attribute error rather then type error)
- fixes to small errors in python UI scripts.
2009-07-17 02:31:28 +00:00
Campbell Barton
ef28383ab9 grr, py 2.5 2.6 and 3.x need different StringIO's 2009-07-16 23:04:29 +00:00
Campbell Barton
deb180e37f - Scrollbars for the console (use View2D functions)
- Set View2D operators not to register, got in the way a lot with the console.
- Made autocomplete Ctrl+Enter so Tab can be used.
- Should work with python 2.5 now. (patch from Vilda)
- Moved report struct definitions into DNA_windowmanager_types.h, could also have DNA_report_types.h however the reports are not saved, its just needed so the report list can be used in the wmWindowManager struct. Fixes a crash reported by ZanQdo.
- Store the report message length in the report so calculating the total height including word wrap is not so slow.
2009-07-16 22:47:27 +00:00
Guillermo S. Romero
9eebb2ca36 SVN maintenance. 2009-07-16 22:06:04 +00:00
Daniel Genrich
37d33d0b76 2.5 UI: Renaming cloth UI file to fit naming scheme 2009-07-16 21:22:52 +00:00
Daniel Genrich
730f319130 Another fluid + (little) cloth gui and settings update 2009-07-16 14:31:32 +00:00
Joshua Leung
9f2a13b263 2.5 - User Preferences Layout patch from William
Screenshot here:
http://www.reynish.com/files/blender25/userprefs_layout.png
2009-07-16 10:32:21 +00:00
Campbell Barton
88e3e8c1c9 - use outliner colors (with subtle stripes) for report so you can see divisions between operators with wrapping.
- added class option for PyOperators __register__ so you can set if py operators are logged in the console.
- PyOperators was refcounting in a more readable but incorrect way. in some cases would be possible to crash so better not drop the reference before using the value.
- console zoom operator was registering which meant zooming in to see some text would push it away :)
2009-07-16 07:11:46 +00:00
Campbell Barton
2f74b5a260 Console Space Type
* interactive console python console.
* display reports and filter types. defaults to operator display so you can see the python commands for tools as you use them,
  eventually it should be possible to select commands and make macto/tools from them.

Example use of autocomp.  b<tab>, bpy.<tab>, bpy.<tab>, bpy.data.<tab> etc.

basic instructions are printed when opening the console.

Details...
* Console exec and autocomp are done with operators written in python.
* added CTX_wm_reports() to get the global report list.
* The window manager had a report ListBase but reports have their own struct, switched to allocate and assign when initializing the WM since the type is not available in DNA.
* changed report types flags for easier display filtering.
* added report type RPT_OPERATOR
* logging operators also adds a python-syntax report into CTX_wm_reports() so they can be displayed in the console as well as calling a notifier for console to redraw.
* RnaAPI context.area.tag_redraw() to redraw the current area from a python operator.

Todo...
* better interactions with the console, scrolling, copy/paste.
* the text displayed doesnt load back.
* colors need to be themed.
* scroll limit needs to be a user pref.
* only tested with cmake and scons.
2009-07-16 00:50:27 +00:00
Brecht Van Lommel
d4504aa891 2.5
* Some changes to make lamp and world textures editing work.
  You may have to click on another texture slot once before
  being able to add a texture, and the layout is messy. Added
  this so lightenv project isn't blocked by this being missing.
* Adding a new material slot now doesn't create a new material
  anymore, to avoid creating unused materials.
* Tiny changes to scene/object buttons.
2009-07-15 19:20:59 +00:00
Brecht Van Lommel
4df1836325 2.5: User Preferences
* Added basic infrastructure to layout user preferences. The
  intention is that you open a user preferences space in place
  of the buttons space, and have panels there.
* The existing sections don't have to be followed, it's easy
  to create different ones, just change the user_pref_sections
  enum in RNA.
* This will get separated from the info header later.
2009-07-15 19:19:43 +00:00
Brecht Van Lommel
d2d2c3aec2 2.5: added panel with IK settings for bone. 2009-07-14 22:11:25 +00:00
Brecht Van Lommel
efe8e8dd15 2.5: small tweaks for scene and object layouts. 2009-07-14 20:38:21 +00:00
Brecht Van Lommel
83acd4ac6b 2.5: Objects
* Added Relations panel with layers, pass_index, parent.
* Groups panel now can do add to group/remove from group.
* Parent, parent type, track are now editable.
* Separate constraint add operator for object and bones.
2009-07-14 20:27:28 +00:00
Brecht Van Lommel
f1a745c436 2.5: Armature
* Bone Transform panel now works, using appropriate EditBone or
  PoseChannel properties.
* Bone name and parent are now editable.
* Some other tweaks to the UI layouts for Armature and Bone.
* Notifiers for armature/editbone properties.
2009-07-14 17:59:26 +00:00
Thomas Dinges
42e2796a51 2.5 Scene Buttons:
* Replaced Render Layer Dot Icons with X ones. Patch by William Reynish.
2009-07-14 13:20:46 +00:00
Thomas Dinges
99e369d38d 2.5 Buttons:
* Some Updates for n-key Areas in View3D and Image Editor and some tweaks in bone panels. Patch by William Reynish. Thanks!
2009-07-14 12:32:19 +00:00
Matt Ebb
0bfc98706e RNA/button tweaks:
* Texture -> renamed 'no rgb' to 'rgb to intensity' (btw it's not just for
 image textures )

* Render -> stamp closed by default - not taking effect, because saved in 
.B.blend. How do we fix this? 

* Material -> removed 'Buffer Bias' dependency - it's for receiving shadows,
not casting them

* Material -> Ray Shadow bias renamed 'Auto Ray bias' - switches between an
 automatically calculated value vs the specified value
2009-07-14 04:13:04 +00:00
Daniel Genrich
8f98c5e873 Fix cloth UI + tooltips - patch provided by nudelZ 2009-07-13 22:35:04 +00:00
Brecht Van Lommel
41fb3626f3 2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
  better organize things according to the pipeline, and also showing
  important properties by default, and collapsing less important ones.

Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
  do something when there is a node tree using nodes, or a strip in the
  sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
  does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
  but still using FFMPEG. Unfortunately Ogg is broken at the moment
  (also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
  maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
  it work.
* Organized file format menu by image/movie types.

Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.

Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
Campbell Barton
b5eff581bc Console Autocomplete (Alt+Enter in the text editor), should be moved out of the text editor soon.
The autocomplete function is generic and could be made into its own module.
Examples:
 b -> bpy

 bpy.data.mes -> bpy.data.meshes

 bpy.ops.OB -> bpy.ops.OBJECT_OT_

 bpy.data.objects[0].a -> (options)
active_material, active_material_index, active_particle_system, active_particle_system_index, active_shape_key, active_shape_key_index, active_vertex_group, active_vertex_group_index, animation_data
2009-07-13 09:31:35 +00:00
Brecht Van Lommel
26ef6da24b 2.5
* Objects now support up to 32767 material slots. It's easy to
  increase this further, but I prefer not to increase the memory
  usage of mesh faces, it seems unlikely that someone would
  create 32767 distinct materials?
* Forward compatibility: the only thing you can potentially lose
  reading a 2.5 file in 2.4 is object linking (instead of default
  data), though usually that will go fine too. Reading files with
  > 32 material slots in 2.4 can start giving issues.

* The ob->colbits variable is deprecated by the array ob->matbits
  but I didn't remove the ob->colbits updates in very few places
  it is set.
* I hope I changed all the relevant things, various places just
  hardcoded the number 16 instead of using the MAXMAT define.

* Join Objects operator back. This is using the version from the
  animsys2 branch coded by Joshua, which means it now supports
  joining of shape keys.

* Fix for crash reading file saved during render.
2009-07-13 00:40:20 +00:00
Janne Karhu
6fb0181b50 Keyed physics refresh:
- Keyed targets in one list instead of "chaining", this opens up many more possibilities than before and is much less obscure.
- Better keyed timing possibilities (time & duration in frames).
- Looping over keyed targets list.

Other changes:
- New child setting "length" with threshold (great for guard & underfur with a single particle system)
- Modularization of path interpolation code.
- Cleared "animateable" flags from many particle settings that shouldn't be animateable.

Fixes:
- Keyed particles weren't copied properly (ancient bug).
- Hair rotations depended on global z-axis for root rotation so downward facing strands could flip rotation randomly. Now initial hair rotation is derived from face dependent hair matrix. (This caused for example ugly flipping of child strands on some cases).
- Children from faces weren't calculated straight after activating them.
- Multiple disk cache fixes:
	* Disk cache didn't work correctly with frame steps.
	* Conversion from memory cache to disk cache didn't work with cloth.
	* Disk cache crashed on some frames trying to close an already closed cache file.
	* Trails didn't work with disk cached particles.
- Child rough effects were effected by emitter object loc/rot making them next to useless with animation, why didn't anybody tell me this!!
- Lots of random code cleanup.
2009-07-12 23:38:47 +00:00
Campbell Barton
78703a9ef8 python console in ~80 lines
Shift+Enter in the text editor executes the TEXT_OT_line_console operator defined in space_text.py

The operator's class stores a namespace for each text block.

Eventually this should have its own input rather then using the text editor.

Tested with py3.1 and 2.6

TEXT_OT_insert was only using the first char from a string, added support for inserting strings.
2009-07-12 12:47:34 +00:00
Brecht Van Lommel
b775f1bb32 2.5:
* Code to start moving 3D view header and panels to python, at
  the moment the View menu and one empty panel is in python. The
  C header code is wrapped in one template, so parts of that can
  be moved over while still keeping things working.
* Fix for mistake in RNA enum commit yesterday, and some warning
  fixes.
2009-07-11 13:32:20 +00:00
Joshua Leung
0096a3dee2 2.5 - Made more operators for constraint buttons
* Move Up/Down and Delete are now operators 
* Made TrackTo constraint use expanded enum toggles for up axis too. 
--> BUG ALERT: specifying name and expand in the arguments to itemR doesn't work (name gets skipped)
2009-07-11 12:54:17 +00:00
Joshua Leung
10d14e7259 2.5 - Restored Set/Clear Inverse Buttons for ChildOf Constraint
I've tagged these operators with CONSTRAINT_OT_* not OBJECT_OT_constraint_* since constraints can operate on Bones too (and do so more often)
2009-07-11 11:52:20 +00:00
Brecht Van Lommel
2e3e044d27 RNA
* Enums can now be dynamically created in the _itemf callback,
  using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
  for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
  for operators. This doesn't fit design well at all, needed to do
  some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
  _itemf callback, for docs and fallback in case there is no context.

* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
  (unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +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
Ton Roosendaal
8f60227750 2.5
UI script for setting render output
2009-07-10 16:56:20 +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
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
Brecht Van Lommel
51ae88aa3b 2.5: Mesh and Various Fixes
* 3D view Mesh menu works again, but incomplete.
* Add Properties and Toolbar to 3D View menu.
* Added "specials" menus back, vertex/edge/face and general.
* Various fixes in existing mesh operators, some were not working.
* Add MESH_OT_merge.
* Merge all subdivide ops into MESH_OT_subdivide, subdivide code
  changes to make smooth + multi give good results.
* Rename all select inverse ops to *_OT_select_inverse.
* Fix "search for unknown operator" prints at startup, and some
  warnings in py code.
* Don't run .pyc files on startup.
* Remove unused image window header C code.
2009-07-08 21:31:28 +00:00
Thomas Dinges
288bfeea1e 2.5 Sequencer:
* Replaced some notifiers with proper ones.
* Added "Draw Safe Margin" and "Separate Colors" Features to the menu.
2009-07-08 19:14:32 +00:00
Brecht Van Lommel
5e749af429 2.5: Various Fixes
* Context panel now draws without header, with arrows, no scene name.
* Softbody vertex group search popup.
* Improve names for autogenerated shortcut keys in menus.
* Make most Select menus in the 3D view header work.
* Fix armature border select selection syncing.
* Add POSE_OT_select_constraint_target,
  MESH_OT_select_by_number_vertices, MESH_OT_select_vertex_path.
* Merge mesh select similar into one operator.
* Don't give MESH_OT_select_random Space hotkey.
* Add DAG_object_flush_update to many mesh edit tools, not calling this
  will crash with modifiers.
* RNA_def_enum_funcs for dynamic enums in operators, but not very useful
  without context yet.
* Fix refresh issue with image window header + editmode.
* Fix drawing of shadow mesh for image painting.
* Remove deprecated uiDefMenuButO and uiDefMenuSep functions.
* Remove keyval.c, code is in wm_keymap.c already.
* Rename WM_operator_redo to WM_operator_props_popup.
2009-07-08 15:34:41 +00:00
Dalai Felinto
cfd5046c9e 2.5 filebrowser: previous/next + bugfix + elubie's changes and cleanup
* Previous/Next Folder browser
* bugfix: "open most recently opened directory".

* Previous and Next functionalities:
- use BACKSPACE to navigate to previous folders
- use SHIFT+BACKSPACE to navigate forward
- once you change the folder by other ways the forward folder list is cleared

* bug fix: the sfile->params->dir set through ED_fileselect_set_params wasn't correct. According to the code taking the settings from the existing (previous) filebrowser is a temp solution. In that case this is a fix for a temp solution :)
(changes in: wm_event_system.c, filesel.c and ED_fileselect.h)

** Andrea(elubie): we can get away of the folderlist_clear_next test if we manually pass a boolean to file_change_dir (e.g. file_change_dir(sfile, true)). I tried not to mess up with your changes here. It's slightly slower (and maybe hacky) but its's more conservative IMHO.

(my first commit to 2.5 ... that was a good reason to put my paper on hold :p)
2009-07-07 07:25:44 +00:00
Janne Karhu
46f6cdcdcc Added a particle instance modifier option to use particle size. 2009-07-05 12:36:20 +00:00
Thomas Dinges
84c614ff5f 2.5 Physic Buttons:
* Some minor layout cleanup to the field panel.
2009-07-04 08:50:41 +00:00
Janne Karhu
66918b3add A bunch of fun stuff now possible because of new pointcache code:
* Baked normal particles can now use the "Path" visualization.
* Path "max length" & "abs length" are now history:
	- New option to set path start & end times + random variation to length.
	- Much more flexible (and calculated better) than previous options.
	- This works with parents, children, hair & normal particles unlike old length option.
	- Only known issue for now is that children from faces don't get calculated correctly when using path start time.
* New option "trails" for "halo", "line" and "billboard" visualizations:
	- Draws user controllable number of particle instances along particles path backwards from current position.
	- Works with children too for cool/weird visualizations that weren't possible before.
* Normal particle children's velocities are now approximated better when needed so that "line" visualization trails will look nice.
* New particle instance modifier options:
	- "path"-option works better and has controllable (max)position along path (with random variation possible).
	- "keep shape"-option for hair, keyed, or baked particles allows to place the instances to a single point (with random variation possible) along particle path.
	- "axis" option to make rotation handling better (still not perfect, but will have to do for now).

Some fixes & cleanup done along the way:
* Random path length didn't work for non-child particles.
* Cached & unborn particles weren't reset to emit locations.
* Particle numbers weren't drawn in the correct place.
* Setting proper render & draw visualizations was lost somewhere when initializing new particle settings.
* Changing child mode wasn't working correctly.
* Some cleanup & modularization of particle child effector code and particle drawing & rendering code.
* Object & group visualizations didn't work.
* Child simplification didn't work.
2009-07-04 03:50:12 +00:00