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:
authorTon Roosendaal <ton@blender.org>2006-11-14 23:41:38 +0300
committerTon Roosendaal <ton@blender.org>2006-11-14 23:41:38 +0300
commit85c90b4951523052de0cd4bd7496f53153abff3a (patch)
treeb9046a7cd496049894fdb584bdc5610f31f620a9 /source/blender/blenkernel
parenta8ca44ea4145a347fd518a261555de537e4296a3 (diff)
Fixes in commit for Group Proxy feature;
- Groups with hidden parts didn't render OK - Layer buttons sent out wrong events
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_anim.h2
-rw-r--r--source/blender/blenkernel/intern/anim.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_anim.h b/source/blender/blenkernel/BKE_anim.h
index d77677fa748..c7808331d7e 100644
--- a/source/blender/blenkernel/BKE_anim.h
+++ b/source/blender/blenkernel/BKE_anim.h
@@ -44,7 +44,7 @@ typedef struct DupliObject {
struct DupliObject *next, *prev;
struct Object *ob;
unsigned int origlay;
- int index;
+ int index, no_draw;
float mat[4][4], omat[4][4];
} DupliObject;
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 0bb0b65bb83..4d58e2b46b6 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -279,7 +279,7 @@ int where_on_path(Object *ob, float ctime, float *vec, float *dir) /* returns OK
static DupliObject *new_dupli_object(ListBase *lb, Object *ob, float mat[][4], int lay, int index)
{
- DupliObject *dob= MEM_mallocN(sizeof(DupliObject), "dupliobject");
+ DupliObject *dob= MEM_callocN(sizeof(DupliObject), "dupliobject");
BLI_addtail(lb, dob);
dob->ob= ob;
@@ -318,9 +318,11 @@ static void group_duplilist(ListBase *lb, Object *ob, int level)
group_handle_recalc_and_update(ob, group);
for(go= group->gobject.first; go; go= go->next) {
- if(go->ob!=ob && (go->ob->lay & group->layer)) {
+ /* note, if you check on layer here, render goes wrong... it still deforms verts and uses parent imat */
+ if(go->ob!=ob) {
Mat4MulMat4(mat, go->ob->obmat, ob->obmat);
dob= new_dupli_object(lb, go->ob, mat, ob->lay, 0);
+ dob->no_draw= (dob->origlay & group->layer)==0;
if(go->ob->dup_group) {
Mat4CpyMat4(dob->ob->obmat, dob->mat);
group_duplilist(lb, go->ob, level+1);