Commit Graph

12856 Commits

Author SHA1 Message Date
16fe92f868 2.5 PyAPI
Support for subclassing blenders operator, to be registered as a new operator.

Still need to... 
* add constants like Operator.FINISHED
* wrap context (with rna?)
* poll() cant work right now because there is no way to access the operatorType that holds the python class.
* Only float, int and bool properties can be added so far.

working example operator.
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/WinterCamp/TechnicalDesign#Operator_Example_Code
2009-03-16 15:54:43 +00:00
133e8827b7 F-Curve Modifiers - Generator: Finishing off most of UI
* Finished code for Expanded Polynomial and Factorised Polynomial UI's.
* Started UI code for 'Builtin Function' mode. There are still 4 controls to add there to use something other than simple mapping
* Finished/fixed up verification code for these so that values get initialised ok.
2009-03-16 11:43:02 +00:00
ae0f349346 F-Curve Modifiers: Basic GUI for Generator Modifier working
* Currently, this only works for the 'Expanded polynomial' mode, but this will be expanded to include the other modes too. Now you can modify the values and interactively see the graph in the view change. 

* Disabled the backdrops (modifier 'panels') temporarily, as ROUNDBOX UI elements currently swallow all events, which is not good.

Note: the code here still uses the old-style UI definition code since the new stuff is still under heavy construction.
2009-03-16 11:11:44 +00:00
8522b08e05 F-Curve Modifiers: Generator Modifier Code
* Rewrote the Generator modifier to be more efficient and support more options
* A few UI tweaks for this, but the UI for this is still not yet functional though.
2009-03-16 01:12:37 +00:00
9ad4cd89c2 RNA:
* Fix a dependency issue in Makefiles.
* Fix use of uninitialized variable in makesrna.
2009-03-15 11:30:02 +00:00
863a0e246f Fix for typo which broke compiling 2009-03-15 10:43:17 +00:00
329aa658c9 F-Curve Modifiers: Groundwork for getting these working
- Completed cleaning up the drawing code so that F-Curves with modifiers now get drawn to reflect this.
- Added a temporary operator to add modifiers (hotkey Ctrl-Shift-M)
2009-03-15 10:39:02 +00:00
6508ad460f 2.5
fix compile error with python on MSVC.
2009-03-15 08:58:33 +00:00
dff4852671 flat and smooth shading descriptions were replaced 2009-03-15 03:11:05 +00:00
cc59417cae RNA:
- Added an autogenerated C++ API, basically a simple layer over the C
  API, but with the advantage that it fits the object oriented RNA
  model better. Read-only still like the C API.
- Had to rename "protected" property in Action Group because it is
  a C++ keyword, called it "locked" since that seems more consistent
  anyway?
- It's not used anywhere, so here's some example code I used to test it,
  to get an idea of how it would be used:

http://pasteall.org/4582/cpp

- Also, ID names are now editable.
2009-03-14 23:17:55 +00:00
e7e655ce74 2.5 filebrowser
- drawing tweak for background lines
- long and short display now behave the same, only difference is column width now.
TODO still:
- add additional columns (access rights - mode1-mode3 and owner) for non-Windows platforms
2009-03-14 18:15:28 +00:00
d297058910 return operators as a PyCFunction rather then having our own callable operator type 2009-03-14 13:43:30 +00:00
b907b9fd9b 2.5 filebrowser
* added filter buttons to header
* changed large icon for movie files to match small icon
* fixed small stack corruption in interface_draw.c (Matt, check if this is ok)
* moved nice display of file size to storage.c, where string is created.
2009-03-14 13:12:11 +00:00
2aa71b4226 2.5
*******
small commit, tweaked the emboss based on the object buttons, made it really subtle but still make it easier to read compared to no emboss, a new way will be needed for menus to work aswel
2009-03-14 09:06:31 +00:00
59b08278b4 * File browser
Columns view now displays nice human-readable file sizes
2009-03-14 05:21:57 +00:00
856cdeade7 * UI tweaking 2009-03-14 03:24:23 +00:00
4c3d64116e 2.5: UI Layout Engine, initial code.
* As a test, used by:
  * Object buttons, tried to make it match the mockup.
  * Text window header.
  * Text window properties panel.
* Panel interaction with view2d is still problematic, need to make
  this work properly still.
* Templates are very basic, the ones there are simple but already
  can follow the object buttons mockup quite closely.
* It's based on a three level system: panels, templates and items.
  To get an idea of what that means in practice, see:

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/UI_LayoutEngine#Panels.2C_Templates_and_Items
2009-03-13 13:38:41 +00:00
a4793a3b4a 2.5 Python api
- rearranged modules bpyui -> bpy.ui, bpy -> bpy.data, remove bpydoc
- new module bpy.types, stores a list of all struct types
- added __rna__ attribute to types - eg bpy.types.World.__rna__ so you can access the rna data from a type. (so bpydoc.structs isnt needed anymore)
- removed unused subtyping method (use python subclassing rather then C PyTypeObject)
2009-03-13 07:50:07 +00:00
432171fd99 2.5 filebrowser
- better encapsulation for fsmenu to make it easier to remove global later.
- cleaned up fsmenu code to use just one global
- on file_exec current directory gets added to recent.
- save last 10 recent files in .Bfs too.
2009-03-12 19:36:59 +00:00
8420089d8b RNA:
* boolean/int/float_set_array now works for non-array
  properties as well, just setting the value with the first
  element of the array.
2009-03-12 15:28:00 +00:00
52dc350c09 2.5 filebrowser
- add refresh filelist operator and button in header
2009-03-12 06:40:03 +00:00
c3cf187123 * More UI control tweaks 2009-03-12 05:56:02 +00:00
9d766c35ad 2.5 filebrowser WIP commit
- cleaned up warnings (mostly unneeded variables)
- new icons for filebrowser (large refresh and parent icons missing though)
- fixed error in large icon drawing due to texture coordinates calculated outside subpart of texture.
- removed library loading stuff from filelist
2009-03-11 23:22:07 +00:00
Nathan Letwory
dc57b90f83 * small typo fix. 2009-03-11 20:25:31 +00:00
Nathan Letwory
c8583cac70 2.5 / Area management
* Add Area Swap: hold alt and drag with LMB from either actionzone. Release LMB on area you want to swap with. I added a matching cute cursor for this (and to make it a politically delicate issue, it's white on black).
  Note, there are still some error totblocks that I haven't been able to track down properly yet, so that's still a bit WIP.
2009-03-11 20:22:06 +00:00
64512d3e8e WIP PyAPI from winter camp discussions, make subtypes of the base RNA python type, eventually allowing us to have python defined RNA classes in
python - lux/pov/renderman materials, lamps etc as well as operators.

At the moment there are 2 ways to do this, The first is like subclassing from python, another (disabled) method copies the base PyTypeObject struct 
and makes some changes.

The PyType is stored in the RNA Struct for reuse, right now there are no access functions - needs to be improved.

Added a python script for printing all blend file data to the console which helps testing the api.

dir(rna) wont work for python 2.x now, use rna.__dir__() instead.
2009-03-11 17:28:37 +00:00
891c3bc663 Simplified vpaint/wpaint radial control calls. Removed also some unused radial control code. 2009-03-11 00:52:00 +00:00
33509e8510 Changed vertexpaint and weightpaint to use the standard Brush struct, so they too work with the brush panel.
Note: these modes are only using color/alpha/size from Brush, so there's more integration work todo yet.
2009-03-11 00:43:08 +00:00
47311475ba * More render data RNA 2009-03-11 00:24:34 +00:00
bb406cbf48 Added a brush panel that can be eventually be used for all the paint modes. For now, just sculpt and texture paint are set up to use it (vpaint and wpaint don't yet use the Brush type.) 2009-03-10 23:38:16 +00:00
f7f0222a76 2.5 filebrowser
(WIP commit)
- added categories SYSTEM, BOOKMARKS and RECENT to left panel (recent files not filled yet)
- selection for bookmarks now works by storing draw position, might do that for the file list too
- removed fsmenu button and Bookmark button from UI region
2009-03-10 23:14:41 +00:00
a1082a6d32 Switch to non-array parameters.
Add mising property find checks and remove uneeded param.
2009-03-10 18:10:24 +00:00
d42e3c7be9 * More 2.5 UI tweaks - text/controls/file browser 2009-03-10 08:54:35 +00:00
691b9292a4 2.5 filebrowser
Some UI tweaks and fixes
* fixed some overlapping buttons (Matt, feel free to change button arrangement if you like), the Bookmark (B) button should probably be removed eventually from the current place and the fsmenu button as well, now that we have the directories on the left panel.
* fixed initialisation of params->display 
(aligorith: thanks for fixing, I did reset the #defines, since it was just missing the correct value in the initialisation)
* fixed bug when area became too small (crash)
* fixed bug (last file missing in long display)
* fixed selection when mouse outside tiles.
2009-03-09 21:17:19 +00:00
711d70ec46 View2D fixes for File Browser: Scrollbars now draw correct.
Elubie, please check on the values for params->display. They were being set to zero by default...

Also, set the correct panning locks for the various views
2009-03-09 09:15:23 +00:00
99ef543e56 * fixed the pulldown text embossing, looked awful on dark themes 2009-03-09 08:56:36 +00:00
0fd155f78e * fun 2.5 UI commit from seoul airport!
A few UI goodies from on the plane:
- fixed the sliders for non-rounded themes
- Made properties with rna subtype of 'percentage' automatically display a '%' 
character *after* the numerical value, where it belongs. It would also be really great 
to add a ° - degree symbol after angle and perhaps rotation subtypes. This works 
fine with international fonts but not with oldskool bitmap fonts (not part of ascii). I 
wonder if there's a way to get around this?
- Added nice embossing effects on buttons, labels and pulldowns (there you go, brecht :)
- and cooler looking tooltips

And did some work on the file browser. Andrea, I hope this is ok, let me know if 
there are problems and I can work on fixing it up :)
- added some new icons for file types, that are now shown in list view.
icon designers, please feel free to update and make nicer ones!
- tweaked the default colour theme and did some graphical fiddling to make the 
various views look nicer
- rearranged the buttons on the header and swapped the 'P' button for an up arrow 
button, this needs a nicer icon too.
- added outliner style alternating bands to the list view to see info grouping better. 
This has a small prob in columns view though, can fix that.
2009-03-09 08:31:45 +00:00
a04e5795a0 * test commit, some updated icons 2009-03-09 07:51:33 +00:00
6475e462fa Graph Editor: Frame numbers in horizontal scrollbar are no longer restricted to 1.0 frame intervals. 2009-03-09 07:00:40 +00:00
f73d7c697c * Updated slider design
Still a bit of a work in progress, will look a little weird on non-rounded themes, but will fix that when back home in .au!

The slider now fills the entire button, dragging on it changes the value, clicking edits it. You can also ctrl-click on either side of the slider 'edge' to increment or decrement in small amounts. There's one temporarily in the render buttons for testing.
2009-03-08 17:12:59 +00:00
155c1fb49a compiler fix part 1
[[Split portion of a mixed commit.]]
2009-03-08 16:50:11 +00:00
403b3763a8 2.5 filebrowser
still WIP commit, so Matt can do UI design
- cleaned up filebrowser drawing and selection
- selection bugfix
2009-03-08 13:14:12 +00:00
c20b4d6618 RNA:
* boolean/int/float_get_array now works for non-array
  properties as well, just filling in a single value.
2009-03-07 15:23:03 +00:00
d7479f99b0 Share enum types with rna and small bugfix because Ton needs to make keymodifier bitflag work. 2009-03-07 10:28:08 +00:00
dfe94557a9 New include file to share enum types between RNA and operators
Start with proportional falloff modes.
2009-03-07 10:26:29 +00:00
63456cefda added python api function to register an operator into a keymap
example...
bpyui.registerKey( C, bpyui.spaceTypes.SEQ, 0, "Sequencer", "SEQUENCER_OT_view_selected",  bpyui.keyTypes.A, bpyui.keyValTypes.PRESS, 0,0, {})
May want to split this into multiple functions.
2009-03-07 09:46:33 +00:00
35f0de00e4 * Some more icon updates and tweaks, thanks jendrzych! 2009-03-07 08:52:30 +00:00
4cf9fa3e59 Animation Editors: Copy/Paste Keyframe changes
As was discussed by the team the other day, copying keyframes (to copy/paste buffer) in DopeSheet/Graph Editor no longer relies on the selection status of the F-Curves, but rather on the selected keyframes only. This should be less confusing...

However, pasting keyframes still relies on having F-Curves selected to aid in the channel-matching process. There is still a lot of room for improvement in this area though (as noted in the code!).
2009-03-07 04:24:28 +00:00
c07acfb4fd Transform fun
extracting params in split transform operators.

work in progress still, but lots of fun with operator replay (F6)
2009-03-06 15:50:15 +00:00
Nathan Letwory
aeef01559e 2.5 / SCons
* make sure we can still compile WITH_BF_PYTHON=0
2009-03-06 14:58:37 +00:00