Frame selected object/Geometry not working
On 09/04/2014 at 14:20, xxxxxxxx wrote:
For my script purpose i need to frame the first object that i have merged in my scene before rendering.
this 2 commands c4d.CallCommand(12148) # Frame Geometry c4d.CallCommand(13038) # Frame Selected Elements do not frame the object in the viewport. It seem over-zoomed on the object...
If i paste one of these command in the console , there it frame wellthe object...
Any idea how to make it works?
for infile in glob.glob(scenesPath+"\*.c4d") :
fname, ext = os.path.splitext(infile)
doc = c4d.documents.GetActiveDocument()
c4d.CallCommand(12148) # Frame Geometry
c4d.CallCommand(13038) # Frame Selected Elements
On 17/04/2014 at 12:33, xxxxxxxx wrote:
It is not clear to me what your problem is. Could you narrow your problem down and provide
a script that can be pasted into the script manager that will demonstrate the problem?
On 18/04/2014 at 13:06, xxxxxxxx wrote:
i think i've found why it does not works properly. In fact when i load scene and merge with my python script, the viewport is "empty" untill my function finish. So the command "Frame selected object" apply to nothing. I should find a way to force the viewport to refresh and then call this command. I'm searching to make this not a dirty way... i will let you know if i find the solution, excetp if you tell me it before :D
On 21/04/2014 at 09:04, xxxxxxxx wrote:
Simple refresh is c4d.EventAdd()