Isotropix Forums

import project script Noob question

Clarisse Scripting related topics

import project script Noob question

Unread postby sfarci » Wed Mar 11, 2020 12:55 pm

Hey guys

I have a really, really, really stupid question.
I'm trying to simply import project trough script, but I'm incurring into a little problem.

first of all this is the line of code I'm using (the path is fictionary)

ix.import_project(v['/test/testimport/myfile.project']

problem I'm having is I can't really specify in which context where to import it.
I've tried, again trough script to first select the context and than importing it. In fact, it does select the clarisse context, but it does import the project in my actually latest manually selected context

here is what I did litterally

ix.selection.select("project://GEOM")
ix.import_project(v['/test/testimport/myfile.project']


Any way around it?

Sorry for the really really dumb question
sfarci
 
Posts: 11
Joined: Wed Oct 05, 2016 12:11 pm

Re: import project script Noob question

Unread postby dboude » Wed Mar 11, 2020 1:39 pm

Hi,

You should use

Code: Select all
ix.set_current_context("project://scene")


No dumb question here ;)

Cheers !
Démian
Isotropix
Technical Artist - Clarisse Specialist
User avatar
dboude
 
Posts: 1418
Joined: Mon Jul 03, 2017 10:51 am

Re: import project script Noob question

Unread postby sfarci » Wed Mar 11, 2020 1:43 pm

That does it Indeed. Thanks Demien

and also sorry

I'm an idiot. It was a stupid question

S.
sfarci
 
Posts: 11
Joined: Wed Oct 05, 2016 12:11 pm

Re: import project script Noob question

Unread postby dboude » Wed Mar 11, 2020 4:13 pm

No no no, I wanted to say there are no dumb questions ;)

Cheers
Démian
Isotropix
Technical Artist - Clarisse Specialist
User avatar
dboude
 
Posts: 1418
Joined: Mon Jul 03, 2017 10:51 am


Return to Scripting