Fix for invalid pointers within a copied line set.
Now the line set buffer is cleared when a new .blend file is opened, so that a line set may not be copied and pasted between two .blend files.
This commit is contained in:
@@ -52,6 +52,7 @@ extern "C" {
|
||||
// Rendering
|
||||
void FRS_initialize(void);
|
||||
void FRS_set_context(bContext* C);
|
||||
void FRS_read_file(bContext* C);
|
||||
int FRS_is_freestyle_enabled(struct SceneRenderLayer* srl);
|
||||
void FRS_init_stroke_rendering(struct Render* re);
|
||||
struct Render* FRS_do_stroke_rendering(struct Render* re, struct SceneRenderLayer* srl);
|
||||
|
||||
@@ -82,6 +82,10 @@ extern "C" {
|
||||
controller->setContext(C);
|
||||
}
|
||||
|
||||
void FRS_read_file(bContext* C) {
|
||||
lineset_copied = false;
|
||||
}
|
||||
|
||||
void FRS_exit() {
|
||||
delete pathconfig;
|
||||
delete controller;
|
||||
|
||||
@@ -31,6 +31,7 @@ set(INC
|
||||
../blenloader
|
||||
../editors/include
|
||||
../gpu
|
||||
../freestyle
|
||||
../imbuf
|
||||
../makesdna
|
||||
../makesrna
|
||||
|
||||
@@ -111,6 +111,8 @@
|
||||
#include "BPY_extern.h"
|
||||
#endif
|
||||
|
||||
#include "FRS_freestyle.h"
|
||||
|
||||
#include "WM_api.h"
|
||||
#include "WM_types.h"
|
||||
#include "wm.h"
|
||||
@@ -414,6 +416,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
|
||||
BPY_app_handlers_reset(FALSE);
|
||||
BPY_modules_load_user(C);
|
||||
#endif
|
||||
FRS_read_file(C);
|
||||
|
||||
/* important to do before NULL'ing the context */
|
||||
BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
|
||||
|
||||
Reference in New Issue
Block a user