Commit Graph

439 Commits

Author SHA1 Message Date
25b99b1922 Fix makesrna generated C++ header have consistent whitespace for strings. 2015-10-27 22:11:33 +01:00
b098609186 Fix various compiler warnings. 2015-10-10 17:35:30 +02:00
a7ed374459 makesrna: use int64 for rounding check
Harmless but larger values would overflow
2015-07-10 16:42:36 +10:00
bac7353801 Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:

- More granular dependency relation nature, which solves issues with fake cycles
  in the dependencies.

- Move towards all-animatable, by better integration of drivers into the system.

- Lay down some basis for upcoming copy-on-write, overrides and so on.

The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.

It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.

There are number of assorted documents related on the design of the new system:

* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph

There are also some user-related information online:

* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/

Kudos to everyone who was involved into the project:

- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
  project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
  issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 16:06:37 +05:00
74e8e14cce Makesrna: Fix function prototypes for struct used RNA_def_struct_sdna_from
Previously makesrna would have generated code expecting DNA structure from
RNA_def_struct_sdna_from() to be passed to it. This was wrong because actual
PointerRNA points to a "parent" structure, making it impossible to add
functions to certain RNA structures.

It so far never needed and we didn't notice this issue, but it's needed for
some ongoing development now.
2015-03-27 18:44:11 +05:00
052ebd6564 C++ RNA API: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
cf29010bd4 Cleanup: warnings bit-shift int overflow 2015-03-20 15:41:36 +11:00
a975a3ca63 RNA: move palette into its own file 2015-03-18 15:57:53 +11:00
92d77b250e makesrna: move extern prototypes into own header
Patch T36049 by @jeske
2015-03-13 00:05:11 +11:00
e7c7f57481 RNA: packing functions for vfont & sound
D389 by @kevindietrich
2015-02-07 22:35:32 +11:00
fca515838e Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)'
and 'strcmp(foo, bar) == 0' in several places...
2015-01-26 16:59:24 +01:00
b09563ca8c Cleanup: fixes for building with recent clang 2015-01-14 05:11:20 +11:00
72330b97a2 Fix nasty typo in CPP RNA that would break on int or bool dynarrays... 2014-12-16 16:57:41 +01:00
915235c87a Cleanup: unused headers 2014-11-28 22:16:14 +01:00
94f0d18470 BLI_assert: print a backtrace with the error
Add BLI_system_backtrace()
2014-11-18 00:20:56 +01:00
133f79e449 Cleanup: warnings, typos 2014-10-29 14:15:21 +01:00
df01833477 RNA: check for valid ranges with int properties (C11 only) 2014-07-28 20:08:25 +10:00
9d88fb1dff RNA: Use unsigned ints when bit-shifting 2014-04-28 03:42:13 +10:00
7ca74fc1c0 Code cleanup: use 'const' for arrays (blenloader, gpu, imbuf, makesdna, modifiers, nodes) 2014-04-27 00:25:16 +10:00
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
4550731963 RNA: optimization to avoid malloc for iterators.
This mostly helps making Cycles scene synchronization a bit faster.
2014-04-05 14:50:17 +02:00
e95fd79258 Correction for error in own recent commit (makesrna c++ api, un-init var) 2014-04-01 16:53:15 +11:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
ae46e8a698 RNA: add rna_space_api.c for space functions 2014-01-29 07:31:54 +11:00
fc39e895e9 Style Cleanup: whitespace 2014-01-12 22:27:55 +11:00
f5076d54cb 'Transform' Python Function for armature, curve and lattice.
patch by Paolo Acampora with some edits.
2013-12-17 23:04:36 +11:00
c701082a92 RNA: Add pixels property type 2013-12-13 04:40:30 +11:00
6193963daa style cleanup 2013-10-22 03:03:56 +00:00
7c8c49a34a style cleanup 2013-10-21 23:35:08 +00:00
3cfd933d94 code cleanup: correct unsigned int in string formatting and use empty() checks for vectors. 2013-10-14 08:23:57 +00:00
2ce3bd0d67 code cleanup: use more obvious assignments for transform snapping angles. 2013-10-12 22:31:02 +00:00
203c6effd5 code cleanup: quiet rna warnings, remove remove_strict_flags() for cmake/rna.
also set_source_files_properties() wasn't working for rna_*_gen.c files,
set dna.c and generated data files with generated property too.
2013-09-20 06:35:28 +00:00
Lukas Toenne
4e9145fa1c makesrna fix: The C++ wrapper functions for collection lookup (both int and string) were not clearing the return pointer if no item is found, but only in case there is a custom lookup function defined.
This causes trouble with Cycles because the C++ API uses the returned pointer to determine validity - if no item is found the pointer should be NULL for checking.
2013-09-10 08:27:13 +00:00
c93750d893 RNA fixes regarding dynamic array properties in functions parameters (reviewed by Brecht, thanks!):
* It was not clear that RNA_parameter_length_get() & co only affected dynamic properties, renamed them to RNA_parameter_dynamic_length_get() and such.

* Fixed RNA_function_find_parameter(), we can't use BLI_findstring() here, need to call RNA_property_identifier()!

* Fixed RNA_parameter_get() and RNA_parameter_set(), which were completely wrong for dynamic properties.

* Fixed RNA_parameter_dynamic_length_get/set_data(), they did not check the property was actually a dynamic one and were using again ugly blackmagic casting intead of ParameterDynAlloc structure!

* makesrna was still using an ugly hackish (and perhaps not always working) code when handling dynamic parameters, now synchronized with RNA_parameter_dynamic_length_get_data and RNA_parameter_get code.
2013-08-26 16:08:03 +00:00
33686720f2 Fix RNA parameter passing issue with dynamic arrays, was computing the wrong
size in some cases.
2013-08-11 15:49:27 +00:00
5881fe5d67 avoid runtime overflow (1 << 31), for RNA and armature layer UI. 2013-08-04 00:01:41 +00:00
c9eb93d9fd fix for possible dounle fclose in makesrna's replace_if_different function. 2013-07-29 08:01:12 +00:00
a25f00301f make code style of makesrna.c conform to the rest of blender, was also some odd indentation for property and struct definitions. 2013-07-29 04:18:01 +00:00
2a417a597d fix [#36155] Crash with __contains__ 2013-07-16 05:29:19 +00:00
b9ffdb5cfd Workaround visual studio 2012 compiler bug compiling large RNA_blender_cpp.h, removed
the comments/descriptions for now to make it smaller. Maybe eventual solution would be
to split this up but for now it's not a public API yet anyway.
2013-06-23 13:59:06 +00:00
0fab77023d fix for building c++ rna api with recently added smoothgroup api call. 2013-06-14 14:57:35 +00:00
ed68497700 style cleanup 2013-04-25 16:35:57 +00:00
a0e03a6c77 Fix cycles build error, RNA C++ API did not properly handle output parameters. 2013-04-24 19:21:18 +00:00
5524ed9ba2 Merged changes in the trunk up to revision 55700.
Conflicts resolved:
source/blender/editors/mesh/mesh_intern.h
2013-04-01 13:47:19 +00:00
9328ae282c remove duplicate defines in makesrna.c 2013-04-01 10:26:16 +00:00
62cede96d3 A major code update for making the DNA file specification of Freestyle settings
and RNA for it independent of the build flag for enabling Freestyle.  Suggested
by Sergey Sharybin through a code review of the branch.

* Many #ifdef WITH_FREESTYLE blocks were removed to always have Freestyle-specific
DNA file specification and RNA for it built in Blender.  This will allow Freestyle
setting survive even when a non-Freestyle build is used for loading and saving
files.  It is noted that operations are still conditionally built through #ifdef
WITH_FREESTYLE blocks.

* To this end, new blenkernel files BKE_freestyle.h and intern/freestyle.c have
been added.  All API functions in FRS_freestyle_config.h as well as some of those
in FRS_freestyle.h were moved to the new files.  Now the relocated API functions
have BKE_ prefix instead of FRS_.
2013-03-23 03:00:37 +00:00
c1ceab1281 Merged changes in the trunk up to revision 55357.
Resolved conflicts:
release/datafiles/startup.blend
source/blender/editors/space_nla/nla_buttons.c

Also updated source/blender/blenkernel/intern/linestyle.c as a follow-up of
recent changes for the use of bool.
2013-03-18 00:48:59 +00:00
5162a155af Fix #34481: camera focal length and sensor size did not use units yet, now they do.
I've added a separate camera unit type. It's a bit strange to have an exception for
this but it ensures units are shown in familiar millimeters and it also ensures
backwards compatibility.
2013-03-13 17:16:49 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
dfa8540cdf use bool for rna funcs. 2013-03-07 02:44:55 +00:00