Commit Graph

16828 Commits

Author SHA1 Message Date
Matt Ebb
af324690ee * Small graphical/gui tweaks to constraint and modifier templates 2009-05-27 03:42:51 +00:00
Brecht Van Lommel
1b1667018e UI:
* Added Constraints template and Add Constraint operator.
* Added toggle=True/False parameter to uiItemR, to get a
  toggle button (actual button) rather than an "option"
  button (checkbox) 
* Added OPTION/OPTIONN button type, to distinguish with
  TOG/TOGN.

RNA:
* Make all modifier pointers editable, including correct updates.
* Added notifiers and updates to constraints.
* Fix a stack corruption, pointed out by Andrea, and potentially
  causing crashes.
2009-05-27 00:03:49 +00:00
Andrea Weikert
b89fb7d8fd 2.5 filebrowser
- some cleanup of ugly conditional.
2009-05-26 21:34:20 +00:00
Andrea Weikert
3159f4a243 2.5 MSVC projectfiles update
- file editors/space_image/image_panels.c -> image_buttons.c (renamed)
- file editors/interface/interface_templates.c added

Also added small fix for crash in filebrowser.
2009-05-26 18:54:39 +00:00
Campbell Barton
c590dd3e8c minor ref-counting changes, means new subclasses will get the correct ref count though there are big problems with this still.
Found that subclassing an RNA struct (without even registering or instancing adds a reference to Py_None).
Unlikely a python bug, tested with py2.6 and 3.1
2009-05-26 06:29:15 +00:00
Matt Ebb
a98f1f54bf * Tiny cloth panel tweaks 2009-05-26 05:12:27 +00:00
Matt Ebb
64ddd9ea4f * Scene buttons tweaks
* Added 'render stamp' rna & buttons
2009-05-26 05:03:27 +00:00
Matt Ebb
61101e560d * Small tweaks to texture panels 2009-05-26 02:49:46 +00:00
Thomas Dinges
84e919ca4b 2.5 Buttons:
* Added initial Cloth Modifer panel.
Enable a Cloth Modifier to see the panels in the physics tab.
2009-05-25 18:32:28 +00:00
Campbell Barton
67d8a5b5b0 texture buttons raised py errors when there were no textures on an object 2009-05-25 14:58:10 +00:00
Campbell Barton
6d156a1bab Store the context for python in a static variable with assessor functions - BPy_GetContext/BPy_SetContext,
Still not happy with this in the long term but its less problematic then storing the context in pythons namespace which couldn't be set before importing modules.

This might fix a crash quite a few people have reported (but I cant reproduce).
2009-05-25 13:48:44 +00:00
Nicholas Bishop
edd783db73 2.5/Sculpt:
Bugfix for doing a multires subdivision while in sculptmode (forgot to resize projected vertices.)
2009-05-24 23:05:27 +00:00
Ton Roosendaal
ab407f6ac7 2.5
First version of region-scaling. WIP commit, so bear with me a while!

- All fixed sized regions have a small 'drag' widget, on the left or top.
  (not yet for free-sized regions, like 4-split).
- Mouse-over on widget changes cursor and allows drag.
- Click on widget hides/reveals.
- Fun for test; 3d view header, if high enough, draws more rows of
  buttons when width is too small.

The WIP stuff;
- It doesn't save yet in files, using the "minsize" variable of region
  definitions, also means other similar areas show same sizes now.
- Definitions for pref size, min/max will be added.
- Properties panel in Fcurve window draws widget on wrong place when
  hidden (subdiv system needs tweak)
- Widgets don't draw perfect yet, also needs further tweaks.

But, in general it's quite fun and usable. :) Many variatians are possible,
like for real tabs, or little icons, or just click-drag on edge.

The reason to first try the widget/tab variation:
- it re-uses the "Area Action Zone" code, widgets for layouting Screens
- it's visible, hotkey-only options for screen layouts are not preferred.
- distinguish clearly area-edges from region-edges this way. Having the
  cursor change shape on every edge (and block input) is probably annoying
  too... but that can be tested.

Later more!
2009-05-24 13:29:29 +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
3956a10deb 2.5 Buttons:
* Some Modifier layout cleanup.
* For fun: Added icons to the Render Buttons.
* small RNA Typo's
2009-05-23 11:19:18 +00:00
Matt Ebb
5b5d213290 * Updated a whole swag of excellent new icons by jendryzch.
This includes a bunch of new object primitive icons 
which would be great to get into the 'add object' menus, 
they're not there yet. The specific lamp data type icons 
are now used in the outliner though, which is very helpful.
2009-05-23 07:19:31 +00:00
Nicholas Bishop
380efe9dc4 Multires/2.5:
Added subdivide operator and button for multires.
Since this seems to be the only modifier with an operator defined, I'm not sure if I put it in a good place or not, someone can check on this?
2009-05-23 07:12:55 +00:00
Ton Roosendaal
1a69eab4a0 2.5
- Added new popup menu type, which can be used to pass on a
  running operator too. Needed it for debug menu, allowing to
  set variables outside of operator "first do then tweak" system. :)

  void uiPupBlockOperator()
  
  Don't forget to tell invoke() return that operator now runs modal!

- Test menu: alt+ctrl+d gives the G.rt debug value. 
  
  Values of 0-16 now can be used to shrink areas, stuff like this
  then happens (rt==4):
  http://download.blender.org/institute/rt5.jpg
  Was looking at ways to visually distinguish areas and regions
  better. Yes I know, cute rounded corners, etc. Just testing!
2009-05-22 15:02:32 +00:00
Thomas Dinges
5bc3bd7b06 2.5 Buttons:
* Added initial Texture Buttons by William Reynish. Thanks! 
Note: I did some code cleanup and fixes to the code. 

* Texture RNA fixes.
2009-05-22 12:07:03 +00:00
Ton Roosendaal
43fc5606cf 2.5
Fix in sliders; didn't notice the left part messed up :)
Another slider draw method to explore would be like this:

(<| -------- |>)

Would make it symmetrical, and visually matching number
buttons better. (the "<" is background color triangle,
without circle around it).
2009-05-22 09:09:07 +00:00
Thomas Dinges
82bd674653 2.5 Buttons Modifier:
* Forgot to initialize the fluid function.
2009-05-22 07:41:36 +00:00
Thomas Dinges
88f5c999f2 2.5 RNA:
* Added missing Subdivision Type Notifier.
2009-05-22 07:02:09 +00:00
Thomas Dinges
c671469bbb 2.5 Buttons Modifier:
* Converted all modifier to python layout engine. Needs a layout cleanup still.
* Removed corresponding C code (brecht: please check)
* 2 RNA Modifier fixes

* Added initial Mesh panel by William Reynish.
2009-05-21 21:23:36 +00:00
Ton Roosendaal
c056b22a14 2.5
Simple UI script fix, wanted to check... works all nice. :)
For ui scripters: keep track of alignment flags!

("Border" button was aligned with above button)
2009-05-21 17:41:13 +00:00
Ton Roosendaal
34498f3870 2.5
Bugfix: In full-area screen mode, you cannot split windows again, the
full-area code is too primitive for that. Just disabled now.
(reported by Venom's Lab!)
2009-05-21 17:13:50 +00:00
Ton Roosendaal
aae27374f7 2.5
Interface draw fixes:

- Red cursor for text edit widget was in wrong location
- Selection for text edit widget too
- Number slider text edit was too far too the left
- Number slider 'fill' was drawing outside boundaries.
  (Matt: note I just interpolated rounding value :)
2009-05-21 17:09:06 +00:00
Brecht Van Lommel
2ede3b6e23 2.5: warning fixes. 2009-05-21 15:36:16 +00:00
Brecht Van Lommel
94902dac97 2.5 UI: Modifier Template
* template_modifier creates the modifier box, and returns a layout
  to put the buttons in.
* Only the armature modifier is now done with python code, all other
  modifiers use C code. To convert a modifier to python, remove the
  corresponding C code and create a function in DATA_PT_modifiers.
* Some modifiers still require some RNA work to get it working well,
  especially to make pointers editable. Mostly that is a matter of
  defining an own _set callback and put some of the modifier C code
  into it.
* Still various buttons that don't work, like for hooks or mesh
  deform binding.
* Fix for crashing decimate modifier (still disabled).

* Removed UI_BUT_NO_HILITE, HMENU.
* Make uiLayoutBox work with align.
2009-05-21 15:34:09 +00:00
Matt Ebb
65143c50e0 * Updated the Mac OS X blender and .blend file icons to support
the new (in 10.5) 512px icon standard.

Thanks to Samo 'xype' Korosec for the original graphic treatment!

http://mke3.net/blender/devel/2.5/hugeicon.jpg
2009-05-21 13:39:47 +00:00
Ton Roosendaal
99cb9a26b0 2.5
Animation playback back in control. And non-blocking still!

- Play follows the "Playback" options in TimeLine menu.
  Only the region 'windows' are drawn, not headers, toolbars,
  channel views, etc.
  The option "Buttons Window" also redraws property regions.
- The Timeline header always redraws, this to denote at least
  progressing frame numbers
- For now: if you choose to play 3D views, it also redraws 
  the TimeLine. Seems to be good convention, but probably
  better to add menu option for it?

- Fun test: while playback, change Playback options, works OK!

- New: top header button shows animation play status, and allows
  to stop playback

- New: Animation stop/start operator. Assigned to ALT+A. It has
  no options yet; just plays active region + all 3D windows now.
  Options will follow, based on reviews.
  Also ESC won't work for now, just press ALT+A again.
2009-05-21 13:33:04 +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
Nicholas Bishop
176a49d1ab Bug fix: the flags for brush rake/anchored were switched. 2009-05-20 18:37:28 +00:00
Brecht Van Lommel
3cc2d61689 UI:
* Hide enable button in horizontal collapsed panels.
* Fix enable button not being in correct position when zooming.
* Fix n-key panels layout being messed up.
2009-05-20 17:18:48 +00:00
Diego Borghetti
3e49545891 Fix the fix ;)
Only check for type because ptr.data can be NULL and
ptr.type not.
2009-05-20 17:18:47 +00:00
Ton Roosendaal
d5a4a57e5c 2.5
Node editor:
- Crash could occur on ALT+LMB remove link lines (read free'd mem)
- Button labels were handled as full buttons, disabling node usage
  quite a lot, like drag, select, or create links.
  (Caused by making all node labels buttons)

Brecht: old UI_NO_HILITE can be depricated, it was for bad overdraw
issues. I guess it's OK to not handle Label buttons at all...
2009-05-20 16:55:28 +00:00
Thomas Dinges
34aaa18af2 2.5 Buttons:
* More button tweaks by William Reynish. Thanks!
2009-05-20 16:24:04 +00:00
Ton Roosendaal
6294510504 2.5
Fixes:

- Render (F12) would choose the (hidden) info window in cases, disabled
  that.
- Browsing ID's (like Image in Image editor) failed when no ID was
  assigned yet.
2009-05-20 16:23:55 +00:00
Diego Borghetti
8407c94f0b Fix segfault on Outliner.
Try to expand the RNA tree in Outliner -> User Preference crash blender.

RNA_struct_idproperties was not checking if ptr.data is NULL
and always try to access the properties type information.

Note: brecht double check this.
2009-05-20 15:59:57 +00:00
Thomas Dinges
240ee1104c 2.5 UI:
* Added missing buttons validation for Modifier Tab.
2009-05-20 15:33:28 +00:00
Ton Roosendaal
a06caced79 2.5
Colorband (ramp) buttons back (now only in Node editor)
2009-05-20 15:20:24 +00:00
Ton Roosendaal
d6f71875bd 2.5
Undid fix from matt to prevent tog button alignment, this is not
working that way... made UI look very bad (like layer buttons)

The new code has 'toggle' and 'option' button types, with the
latter being the new style, and first for icon rows, layers, etc.

Purpose is that RNA or py api would allow to distinguish.
2009-05-20 14:47:48 +00:00
Brecht Van Lommel
0a13c162b1 UI: added support for enable buttons in the panel header. 2009-05-20 14:46:49 +00:00
Ton Roosendaal
8f620ea5f0 2.5
- Made Normal (Sphere) button draw with nice AA
  (check in node editor)
- Bugfix in alignment code, collumns were not drawing OK
- Picker buttons draw swatches again, and made them work.
2009-05-20 14:32:15 +00:00
Matt Ebb
2e91f1b155 Assorted UI tweaks/cleanups 2009-05-20 13:56:22 +00:00
Brecht Van Lommel
a47c673b55 2.5 Material:
* Added material "type" property, with Surface/Volume/Halo
  options, compatible with sim_physics, as requested for
  material buttons layout. Obviously the Volume setting
  does nothing currently.
* Deprecated MA_HALO flag in favor of this.
2009-05-20 13:34:04 +00:00
Ton Roosendaal
56b726917d 2.5
Fix: Node Editor backdrop drawing messed up viewport, making drawing of
UI elements not pixel accurate anymore.
2009-05-20 11:07:34 +00:00
Brecht Van Lommel
f1286b15a3 RNA:
* Any Struct can now have ID properties, by creating a callback
  function to create/return an IDProperty.
* Wrapped PoseChannel ID properties.
* Note there is still no way to create ID Properties in 2.5, though
  the callback to get/create the initial group is now exposed through
  RNA_struct_idproperties.
2009-05-20 09:52:02 +00:00
Brecht Van Lommel
d80911b867 RNA: ID properties were not being shown as RNA properties anymore, fixed.
Python: fix two warnings (initialize to NULL).
2009-05-20 09:17:21 +00:00
Campbell Barton
a1cc5ef8eb fix for crash drawing the UI, normally this would cause a memory leak but for some reason it crashed with py2.6 and not 3.1. 2009-05-20 05:35:53 +00:00