svn merge https://svn.blender.org/svnroot/bf-blender/branches/render25 -r27875:27895
This commit is contained in:
@@ -1236,11 +1236,17 @@ static void image_fix_relative_path(Image *ima)
|
||||
|
||||
#define LIBTAG(a) if(a && a->id.lib) {a->id.flag &=~LIB_INDIRECT; a->id.flag |= LIB_EXTERN;}
|
||||
|
||||
static void lib_indirect_test_id(ID *id)
|
||||
static void lib_indirect_test_id(ID *id, Library *lib)
|
||||
{
|
||||
|
||||
if(id->lib)
|
||||
if(id->lib) {
|
||||
/* datablocks that were indirectly related are now direct links
|
||||
* without this, appending data that has a link to other data will fail to write */
|
||||
if(lib && id->lib->parent == lib) {
|
||||
id_lib_extern(id);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(GS(id->name)==ID_OB) {
|
||||
Object *ob= (Object *)id;
|
||||
@@ -1336,7 +1342,7 @@ void all_local(Library *lib, int untagged_only)
|
||||
a= set_listbasepointers(G.main, lbarray);
|
||||
while(a--) {
|
||||
for(id= lbarray[a]->first; id; id=id->next)
|
||||
lib_indirect_test_id(id);
|
||||
lib_indirect_test_id(id, lib);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12130,8 +12130,8 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
|
||||
if(fd==NULL) {
|
||||
|
||||
/* printf and reports for now... its important users know this */
|
||||
printf("read library: %s\n", mainptr->curlib->name);
|
||||
BKE_reportf(basefd->reports, RPT_INFO, "read library: '%s'\n", mainptr->curlib->name);
|
||||
printf("read library: '%s', '%s'\n", mainptr->curlib->filename, mainptr->curlib->name);
|
||||
BKE_reportf(basefd->reports, RPT_INFO, "read library: '%s', '%s'\n", mainptr->curlib->filename, mainptr->curlib->name);
|
||||
|
||||
fd= blo_openblenderfile(mainptr->curlib->filename, basefd->reports);
|
||||
|
||||
|
||||
@@ -78,6 +78,8 @@ struct rcti;
|
||||
/* meshtools.c */
|
||||
|
||||
intptr_t mesh_octree_table(struct Object *ob, struct EditMesh *em, float *co, char mode);
|
||||
long mesh_mirrtopo_table(struct Object *ob, char mode);
|
||||
|
||||
struct EditVert *editmesh_get_x_mirror_vert(struct Object *ob, struct EditMesh *em, struct EditVert *eve, float *co, int index);
|
||||
int mesh_get_x_mirror_vert(struct Object *ob, int index);
|
||||
int *mesh_get_x_mirror_faces(struct Object *ob, struct EditMesh *em);
|
||||
|
||||
@@ -563,7 +563,8 @@ void free_editMesh(EditMesh *em)
|
||||
em->allfaces= em->curface= NULL;
|
||||
|
||||
mesh_octree_table(NULL, NULL, NULL, 'e');
|
||||
|
||||
mesh_mirrtopo_table(NULL, 'e');
|
||||
|
||||
em->totvert= em->totedge= em->totface= 0;
|
||||
|
||||
// XXX if(em->retopo_paint_data) retopo_free_paint_data(em->retopo_paint_data);
|
||||
|
||||
@@ -261,8 +261,10 @@ void ED_object_exit_editmode(bContext *C, int flag)
|
||||
me->edit_mesh= NULL;
|
||||
}
|
||||
|
||||
if(obedit->restore_mode & OB_MODE_WEIGHT_PAINT)
|
||||
mesh_octree_table(obedit, NULL, NULL, 'e');
|
||||
if(obedit->restore_mode & OB_MODE_WEIGHT_PAINT) {
|
||||
mesh_octree_table(NULL, NULL, NULL, 'e');
|
||||
mesh_mirrtopo_table(NULL, 'e');
|
||||
}
|
||||
}
|
||||
else if (obedit->type==OB_ARMATURE) {
|
||||
ED_armature_from_edit(obedit);
|
||||
|
||||
@@ -1111,7 +1111,8 @@ static int set_wpaint(bContext *C, wmOperator *op) /* toggle */
|
||||
}
|
||||
}
|
||||
else {
|
||||
mesh_octree_table(ob, NULL, NULL, 'e');
|
||||
mesh_octree_table(NULL, NULL, NULL, 'e');
|
||||
mesh_mirrtopo_table(NULL, 'e');
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene);
|
||||
|
||||
@@ -374,6 +374,24 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
||||
}
|
||||
}
|
||||
SEQ_END
|
||||
|
||||
{
|
||||
SpaceSeq *sseq= CTX_wm_space_seq(C);
|
||||
if (sseq && sseq->flag & SEQ_MARKER_TRANS) {
|
||||
TimeMarker *marker;
|
||||
|
||||
for (marker= scene->markers.first; marker; marker= marker->next) {
|
||||
if( ((x < CFRA) && marker->frame < CFRA) ||
|
||||
((x >= CFRA) && marker->frame >= CFRA)
|
||||
) {
|
||||
marker->flag |= SELECT;
|
||||
}
|
||||
else {
|
||||
marker->flag &= ~SELECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// seq= find_nearest_seq(scene, v2d, &hand, mval);
|
||||
|
||||
|
||||
@@ -64,7 +64,8 @@ void ED_editors_exit(bContext *C)
|
||||
Object *ob= sce->obedit;
|
||||
|
||||
/* global in meshtools... */
|
||||
mesh_octree_table(ob, NULL, NULL, 'e');
|
||||
mesh_octree_table(NULL, NULL, NULL, 'e');
|
||||
mesh_mirrtopo_table(NULL, 'e');
|
||||
|
||||
if(ob) {
|
||||
if(ob->type==OB_MESH) {
|
||||
@@ -91,8 +92,10 @@ void ED_editors_exit(bContext *C)
|
||||
Object *ob= sce->basact->object;
|
||||
|
||||
/* if weight-painting is on, free mesh octree data */
|
||||
if(ob->mode & OB_MODE_WEIGHT_PAINT)
|
||||
mesh_octree_table(ob, NULL, NULL, 'e');
|
||||
if(ob->mode & OB_MODE_WEIGHT_PAINT) {
|
||||
mesh_octree_table(NULL, NULL, NULL, 'e');
|
||||
mesh_mirrtopo_table(NULL, 'e');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -687,7 +687,6 @@ typedef struct SolidifyModifierData {
|
||||
float crease_outer;
|
||||
float crease_rim;
|
||||
int flag;
|
||||
char pad[4];
|
||||
} SolidifyModifierData;
|
||||
|
||||
#define MOD_SOLIDIFY_RIM (1<<0)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "RNA_define.h"
|
||||
#include "RNA_types.h"
|
||||
|
||||
#include "rna_internal.h"
|
||||
|
||||
@@ -216,58 +217,36 @@ static void rna_Curve_update_deps(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
rna_Curve_update_data(bmain, scene, ptr);
|
||||
}
|
||||
|
||||
static PointerRNA rna_Curve_bevelObject_get(PointerRNA *ptr)
|
||||
{
|
||||
Curve *cu= (Curve*)ptr->id.data;
|
||||
Object *ob= cu->bevobj;
|
||||
|
||||
if(ob)
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_Object, ob);
|
||||
|
||||
return rna_pointer_inherit_refine(ptr, NULL, NULL);
|
||||
}
|
||||
|
||||
static void rna_Curve_bevelObject_set(PointerRNA *ptr, PointerRNA value)
|
||||
{
|
||||
Curve *cu= (Curve*)ptr->id.data;
|
||||
Object *ob= (Object*)value.data;
|
||||
|
||||
if (ob) {
|
||||
/* if bevel object has got the save curve, as object, for which it's */
|
||||
/* set as bevobj, there could be infinity loop in displist calculation */
|
||||
if (ob->type == OB_CURVE && ob->data != cu) {
|
||||
cu->bevobj = ob;
|
||||
}
|
||||
} else {
|
||||
cu->bevobj = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static PointerRNA rna_Curve_taperObject_get(PointerRNA *ptr)
|
||||
static void rna_Curve_update_taper(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
{
|
||||
Curve *cu= (Curve*)ptr->id.data;
|
||||
Object *ob= cu->taperobj;
|
||||
|
||||
if(ob)
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_Object, ob);
|
||||
|
||||
return rna_pointer_inherit_refine(ptr, NULL, NULL);
|
||||
}
|
||||
|
||||
static void rna_Curve_taperObject_set(PointerRNA *ptr, PointerRNA value)
|
||||
{
|
||||
Curve *cu= (Curve*)ptr->id.data;
|
||||
Object *ob= (Object*)value.data;
|
||||
|
||||
if (ob) {
|
||||
/* if taper object has got the save curve, as object, for which it's */
|
||||
/* set as bevobj, there could be infinity loop in displist calculation */
|
||||
if (ob->type == OB_CURVE && ob->data != cu) {
|
||||
cu->taperobj = ob;
|
||||
/* set as taperobj, there could be infinity loop in displist calculation */
|
||||
if (ob->type != OB_CURVE || ob->data == cu) {
|
||||
cu->taperobj = NULL;
|
||||
}
|
||||
} else {
|
||||
cu->taperobj = NULL;
|
||||
}
|
||||
|
||||
rna_Curve_update_deps(bmain, scene, ptr);
|
||||
}
|
||||
|
||||
static void rna_Curve_update_bevel(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
{
|
||||
Curve *cu= (Curve*)ptr->id.data;
|
||||
Object *ob= cu->bevobj;
|
||||
|
||||
if (ob) {
|
||||
/* if bevel object has got the save curve, as object, for which it's */
|
||||
/* set as bevobj, there could be infinity loop in displist calculation */
|
||||
if (ob->type != OB_CURVE || ob->data == cu) {
|
||||
cu->bevobj = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
rna_Curve_update_deps(bmain, scene, ptr);
|
||||
}
|
||||
|
||||
static void rna_Curve_resolution_u_update_data(Main *bmain, Scene *scene, PointerRNA *ptr)
|
||||
@@ -1087,21 +1066,17 @@ static void rna_def_curve(BlenderRNA *brna)
|
||||
|
||||
/* pointers */
|
||||
prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "Object");
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Bevel Object", "Curve object name that defines the bevel shape");
|
||||
RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
|
||||
RNA_def_property_pointer_funcs(prop, "rna_Curve_bevelObject_get", "rna_Curve_bevelObject_set", NULL);
|
||||
|
||||
RNA_def_property_update(prop, 0, "rna_Curve_update_bevel");
|
||||
|
||||
prop= RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "Object");
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_ui_text(prop, "Taper Object", "Curve object name that defines the taper (width)");
|
||||
RNA_def_property_update(prop, 0, "rna_Curve_update_deps");
|
||||
RNA_def_property_pointer_funcs(prop, "rna_Curve_taperObject_get", "rna_Curve_taperObject_set", NULL);
|
||||
|
||||
RNA_def_property_update(prop, 0, "rna_Curve_update_taper");
|
||||
|
||||
/* Flags */
|
||||
|
||||
prop= RNA_def_property(srna, "dimensions", PROP_ENUM, PROP_NONE); /* as an enum */
|
||||
|
||||
Reference in New Issue
Block a user