Beispiel #1
0
/* after copying objects, copied data should get new pointers */
static void copy_object_set_idnew(bContext *C, int dupflag)
{
	Object *ob;
	Material *ma, *mao;
	ID *id;
#if 0 // XXX old animation system
	Ipo *ipo;
	bActionStrip *strip;
#endif // XXX old animation system
	int a;
	
	/* XXX check object pointers */
	CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
		ob= base->object;
		relink_constraints(&ob->constraints);
		if (ob->pose){
			bPoseChannel *chan;
			for (chan = ob->pose->chanbase.first; chan; chan=chan->next){
				relink_constraints(&chan->constraints);
			}
		}
		modifiers_foreachIDLink(ob, copy_object__forwardModifierLinks, NULL);
		ID_NEW(ob->parent);
		ID_NEW(ob->track);
		ID_NEW(ob->proxy);
		ID_NEW(ob->proxy_group);
		
#if 0 // XXX old animation system
		for(strip= ob->nlastrips.first; strip; strip= strip->next) {
			bActionModifier *amod;
			for(amod= strip->modifiers.first; amod; amod= amod->next)
				ID_NEW(amod->ob);
		}
#endif // XXX old animation system
	}
Beispiel #2
0
/* after copying objects, copied data should get new pointers */
static void copy_object_set_idnew(bContext *C, int dupflag)
{
	Main *bmain= CTX_data_main(C);
	Material *ma, *mao;
	ID *id;
	int a;
	
	/* XXX check object pointers */
	CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
		relink_constraints(&ob->constraints);
		if (ob->pose){
			bPoseChannel *chan;
			for (chan = ob->pose->chanbase.first; chan; chan=chan->next){
				relink_constraints(&chan->constraints);
			}
		}
		modifiers_foreachIDLink(ob, copy_object__forwardModifierLinks, NULL);
		ID_NEW(ob->parent);
		ID_NEW(ob->proxy);
		ID_NEW(ob->proxy_group);
	}