forked from bartvdbraak/blender
* Compile fix for RNA + makefiles.
* Fix for bug in collection string lookup function.
This commit is contained in:
parent
4a4b0732e5
commit
44f94f7927
@ -61,7 +61,7 @@ clean::
|
|||||||
# is done quite intentionally. If there is a bug in that lib, it needs
|
# is done quite intentionally. If there is a bug in that lib, it needs
|
||||||
# to be fixed by the module maintainer.
|
# to be fixed by the module maintainer.
|
||||||
|
|
||||||
RNAOBJS = $(filter-out %RNA.o, $(OBJS))
|
RNAOBJS = $(filter-out %rna_dependency.o, $(filter-out %rna_access.o, $(filter-out %RNA.o, $(OBJS))))
|
||||||
|
|
||||||
$(DIR)/$(DEBUG_DIR)makesrna: $(RNAOBJS) $(DIR)/$(DEBUG_DIR)makesrna.o $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)libdna.a $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
|
$(DIR)/$(DEBUG_DIR)makesrna: $(RNAOBJS) $(DIR)/$(DEBUG_DIR)makesrna.o $(OCGDIR)/blender/makesdna/$(DEBUG_DIR)libdna.a $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a
|
||||||
$(CC) $(LDFLAGS) -o $@ $(WINLIBS) $^
|
$(CC) $(LDFLAGS) -o $@ $(WINLIBS) $^
|
||||||
|
@ -27,14 +27,14 @@
|
|||||||
|
|
||||||
#include "MEM_guardedalloc.h"
|
#include "MEM_guardedalloc.h"
|
||||||
|
|
||||||
|
#include "BLI_blenlib.h"
|
||||||
|
#include "BLI_dynstr.h"
|
||||||
|
|
||||||
#include "RNA_access.h"
|
#include "RNA_access.h"
|
||||||
#include "RNA_types.h"
|
#include "RNA_types.h"
|
||||||
|
|
||||||
#include "rna_internal.h"
|
#include "rna_internal.h"
|
||||||
|
|
||||||
#include "BLI_blenlib.h"
|
|
||||||
#include "BLI_dynstr.h"
|
|
||||||
|
|
||||||
/* Pointer */
|
/* Pointer */
|
||||||
|
|
||||||
void RNA_pointer_main_get(struct Main *main, struct PointerRNA *r_ptr)
|
void RNA_pointer_main_get(struct Main *main, struct PointerRNA *r_ptr)
|
||||||
@ -374,7 +374,7 @@ int RNA_property_collection_lookup_string(PropertyRNA *prop, PointerRNA *ptr, co
|
|||||||
else {
|
else {
|
||||||
/* no callback defined, compare with name properties if they exist */
|
/* no callback defined, compare with name properties if they exist */
|
||||||
CollectionPropertyIterator iter;
|
CollectionPropertyIterator iter;
|
||||||
PropertyRNA *prop;
|
PropertyRNA *nameprop;
|
||||||
PointerRNA iterptr;
|
PointerRNA iterptr;
|
||||||
char name[256], *nameptr;
|
char name[256], *nameptr;
|
||||||
int length, alloc, found= 0;
|
int length, alloc, found= 0;
|
||||||
@ -384,9 +384,9 @@ int RNA_property_collection_lookup_string(PropertyRNA *prop, PointerRNA *ptr, co
|
|||||||
RNA_property_collection_get(prop, &iter, &iterptr);
|
RNA_property_collection_get(prop, &iter, &iterptr);
|
||||||
|
|
||||||
if(iterptr.data && iterptr.type->nameproperty) {
|
if(iterptr.data && iterptr.type->nameproperty) {
|
||||||
prop= iterptr.type->nameproperty;
|
nameprop= iterptr.type->nameproperty;
|
||||||
|
|
||||||
length= RNA_property_string_length(prop, &iterptr);
|
length= RNA_property_string_length(nameprop, &iterptr);
|
||||||
|
|
||||||
if(sizeof(name)-1 < length) {
|
if(sizeof(name)-1 < length) {
|
||||||
nameptr= name;
|
nameptr= name;
|
||||||
@ -397,7 +397,7 @@ int RNA_property_collection_lookup_string(PropertyRNA *prop, PointerRNA *ptr, co
|
|||||||
alloc= 1;
|
alloc= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
RNA_property_string_get(prop, &iterptr, nameptr);
|
RNA_property_string_get(nameprop, &iterptr, nameptr);
|
||||||
|
|
||||||
if(strcmp(nameptr, key) == 0) {
|
if(strcmp(nameptr, key) == 0) {
|
||||||
*r_ptr= iterptr;
|
*r_ptr= iterptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user