Commit Graph

13 Commits

Author SHA1 Message Date
04428d6750 added "description" and "readonly" properties to RNA Structs (also accessible via python)
Many descriptions are not written, grep for DOC_BROKEN if you have some spare time to write struct descriptions.
2008-12-19 04:06:24 +00:00
9178dc8596 Small RNA changes
* rna_validate_identifier now checks identifiers are not python keywords such as if, and, from (builtins like max, object and sort are ok)
* rna_validate_identifier prints an error explaining why it fails
* renamed Struct's "from" to "base" - to point to the struct inherited from.
* renamed ImageUsers's "pass" and "layer" to "renderPass" and "renderLayer"
* use the identifier as the key for ENUM's (matching structs and properties)
2008-12-18 23:34:19 +00:00
ced396ce6d Use the identifier for struct property access too
struct.properties['pulse_false_level'] instead of struct.properties['Pulse False Level']
2008-12-18 07:22:28 +00:00
a196d283ed Use the identifier rather then the struct name to access a collection of structs.
bpydoc.structs.keys() - ['Actuator', 'ActuatorSensor', 'AlwaysSensor', 'AndController'.... etc
now reads...
bpydoc.structs.keys() - ['Actuator', 'Actuator Sensor', 'Always Sensor', 'And Controller'...

This is more correct since an identifier is supposted to be unique when a name might not be.
2008-12-18 05:28:17 +00:00
6c2750a6fe Added "bpydoc" to the global namespace of python scripts, making documentation available no matter what data is open in the current blend file, Directory type was also missing from the subtype enum causing the test rna-dump script to fail. 2008-12-16 16:32:48 +00:00
c13bb258b1 RNA:
Added some functionality to make inspecting all RNA structs possible. Not used
yet, but can be tested by replacing this line in space_outliner.c:

RNA_main_pointer_create(G.main, &cell.ptr);

with:

RNA_blender_rna_pointer_create(&cell.ptr);
2008-12-15 13:46:50 +00:00
b863bf98e5 RNA
* Wrap most user editable data in DNA_mesh_types.h and DNA_meshdata_types.h.
  Still needs to be improved in some areas though, especially how to deal
  with data layers (expose per element or as array, or both?), and data in
  face corners (bmesh type data structures are more logical here).

Tweaks to RNA defining to make some cases easier:
* Added range callback function for int/float.
* Added 'skip' callback for listbase and array iterators to skip items in
  the collection.
* Extra error print when calling wrong define_property_*_sdna functions.
* Also made button code respect non_editable flag, is quick change though,
  need to add support for properly graying out etc.
2008-11-24 12:12:24 +00:00
129585285c RNA
* More ID property support. What was already possible was showing
  ID properties as RNA properties. Now it is possible to define
  RNA properties and have an ID property automatically created the
  first time it is set (if not set it retuns the default).

* Added support for defining RNA structs and properties at runtime.
  This is useful for python and plugins, and could also be used
  for operators, not sure yet what is best there, they could be done
  in preprocess for speed, but not sure how to do that while keeping
  operator registration a single function.

* Added quick functions to get/set properties based on names, to be
  used for operators.

* Added some simple support for inheritance, was already doing this
  but having it as a feature simplifies things. Two things were added
  for this: when defining a struct you can give a 'from' struct whose
  properties will be copied, and structs like ID, operator, modifier,
  can define a refine callback that will return the more specific type
  of the struct like ID -> Object, Mesh, .. .

* Added simple windowmanager wrap with only the registered operators
  list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
c3da1af01c RNA minor changes
* Added start of lamp wrapping (code by Michael Fox).
* Add back Object.data, was crashing with unknown data type.
* Added support for using consecutive variables like float r, g, b;
  as an array without writing a manual get/set function.
* Also note the RNA documentation is updated now to be more
  about how to define RNA and use it, including some diagrams.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
2008-11-18 10:57:06 +00:00
623421d580 RNA
* Added support for ID properties, mapped as follows:
	* IDP Int = RNA Int
	* IDP Float, Double = RNA Float
	* IDP_String = RNA String
	* IDP Group = RNA IDPropertyGroup Struct
	* IDP_Array = RNA Array

* PropertyRNA and StructRNA are now defined private for the module,
  to force external code to always use accessor functions.
2008-11-17 18:44:06 +00:00
a2cc29d221 RNA
* Rename cname to identifier.
* Rename PropertyEnumItem to EnumPropertyItem.
* Wrapped min/max/step/precision, pointer type for RNA.
* Draw FLT_MAX a bit better in buttons.
2008-11-14 18:46:57 +00:00
a2175968a7 RNA
* Added RNA list viewer. This is currently drawn in the outliner
  window, the UI is limited but it is just intended to test RNA
  at the moment.
* Added UI names for currently wrapped properties.
* Made iterating collections a bit more convenient.
2008-11-14 17:05:25 +00:00
4a8e571e8d RNA
* Added accessor functions for structs and properties instead of
  direct access, in preparation of wrapping ID properties.
* Added more error prints for wrong defines.
* Wrap RNA data structures with RNA.
* Disable dependency code for now to avoid confusion.
2008-11-14 14:34:19 +00:00