Results 1 to 4 of 4

Thread: Can i manipulate position and size of the limited Region with LWPy

  1. #1
    Registered User Diepgroen's Avatar
    Join Date
    Jul 2016
    Location
    Amsterdam
    Posts
    50

    Can i manipulate position and size of the limited Region with LWPy

    I've read some threads about split rendering ( which i want to automate for Octane Renders with Python) and the most promising seems to be Erikals technique to render-out chunks of a render using the Limited Region. As Octane also reads data from LightWave's Limited Region it will be very useful to control large print rendering with segmentation.

    Can i access and control Limited Region settings like the (x, y)Position and the (width, height)Size of the Limited Region with Python? I only know how to read the position and size of the limited region but not how to change them programmatically like in the Set Limited Region UI panel.

    Are they accessible ?

    example
    Click image for larger version. 

Name:	Screen Shot 2017-03-06 at 23.33.49.png 
Views:	110 
Size:	101.6 KB 
ID:	136215

  2. #2
    I think you can via lscript, at least that's what I believe after looking at the lscript documentation. So you'd want to call the Layout command via python.
    My opinions and comments do not represent those of my employer.
    www.ernestpchan.com
    www.zazzle.com/gopuggo

  3. #3
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,884
    Utilities > Cmd History
    Then use Limited Region tool,
    and read what command is listed in Cmd History window..
    Execute command from your code.
    This method will work with few others things, even not documented.

  4. #4
    Registered User Diepgroen's Avatar
    Join Date
    Jul 2016
    Location
    Amsterdam
    Posts
    50
    @ernpchan
    Quote Originally Posted by ernpchan View Post
    I think you can via lscript, at least that's what I believe after looking at the lscript documentation. So you'd want to call the Layout command via python.
    Thanks, I finally got the information, but got lost at first. Wishing there was a simple search mechanism for the lwsdk manual. Just for future referennce I'll lay them out here.

    LWSDK manual
    Code:
    lwsdk.command("MaskPosition nLeft ntop nwidth nheight"")
    lwsdk.command("MaskColor gred ggreen gblue")
    lwsdk.command("LimitedRegion") returns values 1 and 2
    LWPython manual
    Code:
    lwsdk.LWCameraInfo().regionLimits(LWItemID camera) return (x0, y0, x1, y1)
    lwsdk.LWCameraInfo().maskLimits(LWItemID camera) return (x0, y0, x1, y1)
    lwsdk.LWCameraInfo().maskColor(LWItemID camera) return ( color[3])
    @Sensei
    Quote Originally Posted by Sensei View Post
    Utilities > Cmd History
    Then use Limited Region tool,
    and read what command is listed in Cmd History window..
    Execute command from your code.
    This method will work with few others things, even not documented.
    Learned something new there!
    I've been gocking at the LS Commander for some time now to look for answers. But Cmd History! Now i never looked at this before. And there it was: an undocumented command property.

    Code:
    lwsdk.command("RegionPosition 10 10 631 354")
    Thank you guys!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •