|
@@ -22,6 +22,9 @@
|
|
|
extern LA MAIN;
|
|
|
extern struct _tnsMain *T;
|
|
|
|
|
|
+void tnsRemoveMaterial(tnsMaterial* mat);
|
|
|
+void tns_InvalidateMeshWithMaterial(tnsMaterial* m);
|
|
|
+
|
|
|
void la_ReadGLocation(tnsOffscreen* off, int x, int y,float* xyz0){
|
|
|
if(!off->pColor[2]){ tnsVectorSet3(xyz0,0,0,0); return; }
|
|
|
glBindFramebuffer(GL_READ_FRAMEBUFFER, off->FboHandle);
|
|
@@ -1929,7 +1932,7 @@ int OPINV_RemoveRootObject(laOperator *a, laEvent *e){
|
|
|
|
|
|
int OPINV_NewMaterial(laOperator *a, laEvent *e){
|
|
|
tnsMaterial* mat=tnsCreateMaterial("Material"); laNotifyUsers("tns.world.materials");
|
|
|
- if(!a->This && a->This->EndInstance) return;
|
|
|
+ if(!a->This && a->This->EndInstance) return LA_CANCELED;
|
|
|
laPropContainer* pc=la_EnsureSubTarget(a->This->LastPs->p,a->This->EndInstance);
|
|
|
if(pc==TNS_PC_OBJECT_MESH){
|
|
|
tnsMeshObject* mo=a->This->EndInstance; if(mo->CurrentMaterial){
|