Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-11-08 10:30:02 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-11-08 10:30:02 +0400
commit80e398e7b2cfbdf0192b11734cb02b378b423d65 (patch)
tree69bda0498a17f6a3ad5acb47465e1eef8a5e1faa /source/blender/makesrna/intern/rna_color.c
parent72cfdfec3083cbb756ff07c860293be9ca25f8b4 (diff)
parentf086201518b85f6dd2ae60ae37dc14f1d1406c01 (diff)
Merged changes in the trunk up to revision 41638.
Conflicts resolved: doc/python_api/sphinx_doc_gen.py source/blender/blenkernel/BKE_main.h source/blender/blenkernel/intern/library.c source/blender/blenloader/intern/readfile.c source/blender/blenloader/intern/writefile.c source/blender/editors/include/UI_resources.h source/blender/editors/interface/resources.c source/blender/makesdna/DNA_ID.h source/blender/makesdna/intern/makesdna.c source/blender/makesrna/intern/rna_internal.h source/blender/makesrna/intern/rna_main.c source/blender/makesrna/intern/rna_main_api.c source/blender/makesrna/intern/rna_scene.c
Diffstat (limited to 'source/blender/makesrna/intern/rna_color.c')
-rw-r--r--source/blender/makesrna/intern/rna_color.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index b24d914fa0d..8778a34b4f7 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -176,19 +176,20 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr)
/* helper macro for use here to try and get the path
* - this calls the standard code for getting a path to a texture...
*/
-#define COLRAMP_GETPATH \
-{ \
-prop= RNA_struct_find_property(&ramp_ptr, "elements"); \
-if (prop) { \
-index= RNA_property_collection_lookup_index(&ramp_ptr, prop, ptr); \
-if (index >= 0) { \
-char *texture_path= rna_ColorRamp_path(&ramp_ptr); \
-path= BLI_sprintfN("%s.elements[%d]", texture_path, index); \
-MEM_freeN(texture_path); \
-} \
-} \
+
+#define COLRAMP_GETPATH \
+{ \
+ prop= RNA_struct_find_property(&ramp_ptr, "elements"); \
+ if (prop) { \
+ index= RNA_property_collection_lookup_index(&ramp_ptr, prop, ptr); \
+ if (index >= 0) { \
+ char *texture_path= rna_ColorRamp_path(&ramp_ptr); \
+ path= BLI_sprintfN("%s.elements[%d]", texture_path, index); \
+ MEM_freeN(texture_path); \
+ } \
+ } \
}
-
+
/* determine the path from the ID-block to the ramp */
// FIXME: this is a very slow way to do it, but it will have to suffice...
if (ptr->id.data) {