bugs
This commit is contained in:
@@ -43,6 +43,7 @@ void Map::setBitmapPath(const QString & p) {
|
||||
void Map::load(TextureManager * tm) {
|
||||
_bitmap_hash = 0;
|
||||
if (!bitmap_path.isEmpty()) tm->loadTextureImage(bitmap_path, _type == mtNormal, bake_options, &_bitmap_hash);
|
||||
_changed = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -440,6 +440,7 @@ void Scene::prepareTree(ObjectBase * o) {
|
||||
case ObjectBase::glLight: {
|
||||
Light * l = globject_cast<Light *>(co);
|
||||
lights_used[l->light_type] << l;
|
||||
if (l->light_map._changed) need_reload_materials = true;
|
||||
} break;
|
||||
case ObjectBase::glMesh:
|
||||
if (co->mesh()) {
|
||||
|
||||
@@ -94,6 +94,8 @@ public:
|
||||
void destroy(QOpenGLExtraFunctions * f);
|
||||
void destroyUnused(QOpenGLExtraFunctions * f);
|
||||
|
||||
void setLightsChanged() { lights_changed = tree_changed = true; }
|
||||
|
||||
protected:
|
||||
void prepareTree(ObjectBase * o);
|
||||
void gatherSelection();
|
||||
@@ -107,7 +109,6 @@ protected:
|
||||
void setTreeChanged();
|
||||
void setTreeStructChanged();
|
||||
void setMaterialsChanged() { mat_changed = true; }
|
||||
void setLightsChanged() { lights_changed = tree_changed = true; }
|
||||
void setObjectMeshChanged(ObjectBase * o);
|
||||
|
||||
|
||||
|
||||
@@ -136,6 +136,13 @@ QList<Camera *> QGLView::selectedCameras() const {
|
||||
}
|
||||
|
||||
|
||||
void QGLView::reloadTextures() {
|
||||
renderer_.markReloadMaterials();
|
||||
renderer_.recreateMaterialThumbnails(true);
|
||||
scene_->setLightsChanged();
|
||||
}
|
||||
|
||||
|
||||
void QGLView::resizeEvent(QResizeEvent * e) {
|
||||
renderLater();
|
||||
mouse.resize();
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
ObjectBase * selectedObject() const { return scene_->selectedObject(); }
|
||||
|
||||
TextureManager * textureManager() { return renderer_.textures_manager; }
|
||||
void reloadTextures() { renderer_.markReloadTextures(); }
|
||||
void reloadTextures();
|
||||
|
||||
Scene * scene() { return scene_; }
|
||||
void focusOn(const Box3D & bb);
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
TexturesEditor::TexturesEditor(QWidget * parent): QWidget(parent) {
|
||||
ui = new Ui::TexturesEditor();
|
||||
ui->setupUi(this);
|
||||
ui->scrollArea->viewport()->setAutoFillBackground(false);
|
||||
ui->scrollAreaWidgetContents->setAutoFillBackground(false);
|
||||
ui->labelMissed->hide();
|
||||
view = 0;
|
||||
}
|
||||
|
||||
@@ -147,8 +147,65 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>435</width>
|
||||
<height>84</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelMissed">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Missed files:</string>
|
||||
</property>
|
||||
@@ -159,6 +216,10 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../../qad/libs/application/qad_application.qrc"/>
|
||||
<include location="../../../qad/libs/blockview/qad_blockview.qrc"/>
|
||||
|
||||
Reference in New Issue
Block a user